Elffuss BraidHub

kikocis/lancedb public

main Β· 14.7 KiBSourceRawPermalink

πŸ“š 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.

??? 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.

🌟 Available Text Embeddings

Embedding :material-information-outline:{ title="Hover over the name to find out the model_id" }DescriptionDocumentation
Sentence Transformers🧠 SentenceTransformers is a Python framework for state-of-the-art sentence, text, and image embeddings.<img src="https://raw.githubusercontent.com/lancedb/assets/main/docs/assets/logos/sbert_2.png" alt="Sentence Transformers Icon" width="90" height="35">
Huggingface ModelsπŸ€— We offer support for all Huggingface models. The default model is colbert-ir/colbertv2.0.<img src="https://raw.githubusercontent.com/lancedb/assets/main/docs/assets/logos/hugging_face.png" alt="Huggingface Icon" width="130" height="35">
Ollama EmbeddingsπŸ” Generate embeddings via the Ollama python library. Ollama supports embedding models, making it possible to build RAG apps.<img src="https://raw.githubusercontent.com/lancedb/assets/main/docs/assets/logos/Ollama.png" alt="Ollama Icon" width="110" height="35">
OpenAI EmbeddingsπŸ”‘ OpenAI’s text embeddings measure the relatedness of text strings. LanceDB supports state-of-the-art embeddings from OpenAI.<img src="https://raw.githubusercontent.com/lancedb/assets/main/docs/assets/logos/openai.png" alt="OpenAI Icon" width="100" height="35">
Instructor EmbeddingsπŸ“š Instructor: An instruction-finetuned text embedding model that can generate text embeddings tailored to any task and domains by simply providing the task instruction, without any finetuning.<img src="https://raw.githubusercontent.com/lancedb/assets/main/docs/assets/logos/instructor_embedding.png" alt="Instructor Embedding Icon" width="140" height="35">
Gemini Embeddings🌌 Google’s Gemini API generates state-of-the-art embeddings for words, phrases, and sentences.<img src="https://raw.githubusercontent.com/lancedb/assets/main/docs/assets/logos/gemini.png" alt="Gemini Icon" width="95" height="35">
Cohere EmbeddingsπŸ’¬ This will help you get started with Cohere embedding models using LanceDB. Using cohere API requires cohere package. Install it via pip.<img src="https://raw.githubusercontent.com/lancedb/assets/main/docs/assets/logos/cohere.png" alt="Cohere Icon" width="140" height="35">
Jina EmbeddingsπŸ”— World-class embedding models to improve your search and RAG systems. You will need jina api key.<img src="https://raw.githubusercontent.com/lancedb/assets/main/docs/assets/logos/jina.png" alt="Jina Icon" width="90" height="35">
AWS Bedrock Functions☁️ AWS Bedrock supports multiple base models for generating text embeddings. You need to setup the AWS credentials to use this embedding function.<img src="https://raw.githubusercontent.com/lancedb/assets/main/docs/assets/logos/aws_bedrock.png" alt="AWS Bedrock Icon" width="120" height="35">
IBM Watsonx.aiπŸ’‘ Generate text embeddings using IBM's watsonx.ai platform. Note: watsonx.ai library is an optional dependency.<img src="https://raw.githubusercontent.com/lancedb/assets/main/docs/assets/logos/watsonx.png" alt="Watsonx Icon" width="140" height="35">

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" }DescriptionDocumentation
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.