From 235a87d7f6560f2ec107dc8362a66bbbde4df83b Mon Sep 17 00:00:00 2001 From: Anush008 Date: Wed, 10 Apr 2024 13:29:22 +0530 Subject: [PATCH 1/2] docs: FastEmbed embedding function --- docs/embeddings.md | 1 + docs/embeddings/fastembed.md | 28 ++++++++++++++++++++++++++++ 2 files changed, 29 insertions(+) create mode 100644 docs/embeddings/fastembed.md diff --git a/docs/embeddings.md b/docs/embeddings.md index 680efb5..4b4a951 100644 --- a/docs/embeddings.md +++ b/docs/embeddings.md @@ -21,6 +21,7 @@ Chroma provides lightweight wrappers around popular embedding providers, making | [Hugging Face Embedding Server](/embeddings/hugging-face-embedding-server) | ✅ | ✅ | | [Jina AI](/embeddings/jinaai) | ✅ | ✅ | | [Roboflow](/embeddings/roboflow-api) | ✅ | ➖ | +| [FastEmbed](/embeddings/fastembed) | ✅ | ➖ | We welcome pull requests to add new Embedding Functions to the community. diff --git a/docs/embeddings/fastembed.md b/docs/embeddings/fastembed.md new file mode 100644 index 0000000..0377179 --- /dev/null +++ b/docs/embeddings/fastembed.md @@ -0,0 +1,28 @@ +--- +--- + +# FastEmbed + +[FastEmbed](https://qdrant.github.io/fastembed/) is a lightweight, CPU-first Python library built for embedding generation. + +This embedding function requires the `fastembed` package. To install it, run + +```pip install fastembed```. + +You can find a list of all the supported models [here](https://qdrant.github.io/fastembed/examples/Supported_Models/). + +## Example usage: + +Using the default BAAI/bge-small-en-v1.5 model. + +```python +from chromadb.utils.embedding_functions import FastEmbedEmbeddingFunction +ef = FastEmbedEmbeddingFunction() +``` + +Additionally, you can also configure the cache directory, number of threads and other FastEmbed options. + +```python +from chromadb.utils.embedding_functions import FastEmbedEmbeddingFunction +ef = FastEmbedEmbeddingFunction(model_name="nomic-ai/nomic-embed-text-v1.5", cache_dir="models_cache", threads=5) +``` From 7ecb205d60c06375b964fc1bc8e0925e5903917e Mon Sep 17 00:00:00 2001 From: Anush Date: Wed, 10 Apr 2024 15:28:18 +0530 Subject: [PATCH 2/2] docs: FastEmbed sidebars.js --- sidebars.js | 1 + 1 file changed, 1 insertion(+) diff --git a/sidebars.js b/sidebars.js index 0f613ab..2c4aeb9 100644 --- a/sidebars.js +++ b/sidebars.js @@ -95,6 +95,7 @@ const sidebars = { 'embeddings/roboflow-api', 'embeddings/hugging-face-embedding-server', 'embeddings/jinaai', + 'embeddings/fastembed', ], }, ],