Skip to content

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

Merged
drazvan merged 1 commit into
developfrom
feature/batch-embeddings-computations
Feb 12, 2024
Merged

Make embeddings computing async and add support for batching.#267
drazvan merged 1 commit into
developfrom
feature/batch-embeddings-computations

Conversation

@drazvan

@drazvan drazvan commented Jan 22, 2024

Copy link
Copy Markdown
Collaborator

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-NeMo#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-NeMo#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
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