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

Make embeddings computing async and add support for batching. #267

Merged
merged 1 commit into from
Feb 12, 2024

Conversation

drazvan
Copy link
Collaborator

@drazvan drazvan commented Jan 22, 2024

Enable batching when computing the embeddings. Initial tests show a 3x throughput increase.

@drazvan drazvan added this to the v0.8.0 milestone Jan 22, 2024
@drazvan drazvan self-assigned this Jan 22, 2024
Pouyanpi added a commit to Pouyanpi/NeMo-Guardrails that referenced this pull request Feb 7, 2024
Updated the BasicEmbeddingsIndex to use a more flexible cache configuration setup. We replaced the bool flag and the CacheEmbeddings instance with a single unified `cache_config` parameter that can accept either a dictionary or an
EmbeddingsCacheConfig instance for enhanced configurability. Additionally, the `_get_embeddings` method is now an asynchronous function to allow for non-blocking I/O operations per NVIDIA#267.
Pouyanpi added a commit to Pouyanpi/NeMo-Guardrails that referenced this pull request Feb 7, 2024
Enhanced the EmbeddingsIndex class by adding a 'cache_config' attribute for customizable cache management. Also, updated the '_get_embeddings' method to be asynchronous per NVIDIA#267.
@drazvan drazvan marked this pull request as ready for review February 12, 2024 21:13
@drazvan drazvan merged commit fb09f4a into develop Feb 12, 2024
3 checks passed
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.

1 participant