π Available Embedding Models
There are various embedding functions available out of the box with LanceDB to manage your embeddings implicitly. We're actively working on adding other popular embedding APIs and models. π
Before jumping on the list of available models, let's understand how to get an embedding model initialized and configured to use in our code:
!!! example "Example usage"
python model = get_registry() .get("openai") .create(name="text-embedding-ada-002")
Now let's understand the above syntax:
model = get_registry().get("model_id").create(...params)
Thisπ line effectively creates a configured instance of an embedding function with model of choice that is ready for use.
get_registry(): This function call returns an instance of aEmbeddingFunctionRegistryobject. This registry manages the registration and retrieval of embedding functions..get("model_id"): This method call on the registry object and retrieves the embedding models functions associated with the"model_id"(1) . { .annotate }- Hover over the names in table below to find out the
model_idof different embedding functions.
- Hover over the names in table below to find out the
.create(...params): This method call is on the object returned by thegetmethod. It instantiates an embedding model function using the specified parameters.
??? question "What parameters does the .create(...params) method accepts?"
Checkout the documentation of specific embedding models (links in the table belowπ) to know what parameters it takes.
!!! tip "Moving on" Now that we know how to get the desired embedding model and use it in our code, let's explore the comprehensive list of embedding models supported by LanceDB, in the tables below.
Text Embedding Functions π
These functions are registered by default to handle text embeddings.
π Embedding functions have an inbuilt rate limit handler wrapper for source and query embedding function calls that retry with exponential backoff.
π Each
EmbeddingFunctionimplementation automatically takesmax_retriesas an argument which has the default value of 7.
π Available Text Embeddings
Multi-modal Embedding FunctionsπΌοΈ
Multi-modal embedding functions allow you to query your table using both images and text. π¬πΌοΈ
π Available Multi-modal Embeddings
| Embedding :material-information-outline:{ title="Hover over the name to find out the model_id" } | Description | Documentation |
|---|---|---|
| OpenClip Embeddings | π¨ We support CLIP model embeddings using the open source alternative, open-clip which supports various customizations. | <img src="https://raw.githubusercontent.com/lancedb/assets/main/docs/assets/logos/openclip_github.png" alt="openclip Icon" width="150" height="35"> |
| Imagebind Embeddings | π We have support for imagebind model embeddings. You can download our version of the packaged model via - pip install imagebind-packaged==0.1.2. | <img src="https://raw.githubusercontent.com/lancedb/assets/main/docs/assets/logos/imagebind_meta.png" alt="imagebind Icon" width="150" height="35"> |
| Jina Multi-modal Embeddings | π Jina embeddings can also be used to embed both text and image data, only some of the models support image data and you can check the detailed documentation. π | <img src="https://raw.githubusercontent.com/lancedb/assets/main/docs/assets/logos/jina.png" alt="jina Icon" width="90" height="35"> |
!!! note If you'd like to request support for additional embedding functions, please feel free to open an issue on our LanceDB GitHub issue page.