Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Decouple vocabulary from BMX, BM25 models #1

Open
juliuslipp opened this issue Aug 13, 2024 · 0 comments
Open

Decouple vocabulary from BMX, BM25 models #1

juliuslipp opened this issue Aug 13, 2024 · 0 comments

Comments

@juliuslipp
Copy link
Contributor

Problem

  • Sparse index models (BMX, BM25) maintain the vocabulary to map tokens to token ids, while building sparse matrices only needs token ids.
  • BaseSparseIndex stores the corpus tokens for index rebuilding. It takes up a lot of memory if the corpus is big.

Suggestion

  • Maintain the vocabulary and perform token mapping in BaseSparseIndex to simplify the model logic.
  • Save token ids for corpus instead of tokens for index rebuilding to save up memory, as only token ids are necessary for matrix construction.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant