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

Add features to improve memory usage #63

Merged
merged 14 commits into from
Oct 6, 2024
Merged

Add features to improve memory usage #63

merged 14 commits into from
Oct 6, 2024

Conversation

xhluca
Copy link
Owner

@xhluca xhluca commented Oct 6, 2024

  • Improve README with example of memory usage optimization
  • Add a Results.merge method allowing merging list of results
  • Make get_max_memory_usage compatible with mac os
  • Refactor examples/index_nq.py to use numba, new tokenizer, simplify loading dataset
  • Refactor examples/retrieve_nq.py to use numba, and to record memory usage
  • Create examples/retrieve_nq_with_batching.py which is a batched version of retrieval that clears memory after every use
  • Add BM25.load_scores that allows loading only the scores of the object
  • Add a load_vocab parameter set to True by default in BM25.load, allowing the vocabulary to not be always loaded.

@xhluca xhluca merged commit 0296bf6 into main Oct 6, 2024
2 checks passed
@xhluca xhluca deleted the improve-memory-usage branch October 6, 2024 20:56
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

Successfully merging this pull request may close these issues.

None yet

1 participant