mxbai-edge-colbert-v0-32m

20.8K
41
8K
GPT-3 class
1 language
license:apache-2.0
by
mixedbread-ai
Embedding Model
OTHER
Fair
21K downloads
Community-tested
Edge AI:
Mobile
Laptop
Server
Unknown
Mobile
Laptop
Server
Quick Summary

The crispy, lightweight ColBERT family from Mixedbread .

Code Examples

Usagebash
# uv
uv add pylate
# uv + pip
uv pip install pylate
Usagebash
# pip
pip install -U pylate
uv + pippython
from pylate import indexes, models, retrieve

# Step 1: Load the model
model = models.ColBERT(
    model_name_or_path="mixedbread-ai/mxbai-edge-colbert-v0-32m",
)


# Step 2: Initialize an index (here, PLAID, for larger document collections)
index = indexes.PLAID(
    index_folder="pylate-index",
    index_name="index",
    override=True,  # This overwrites the existing index if any
)

# Step 3: Encode your documents
documents_ids = ["1", "2", "3"]
documents = ["document 1 text", "document 2 text", "document 3 text"]

documents_embeddings = model.encode(
    documents,
    batch_size=32,
    is_query=False,  # Ensure that it is set to False to indicate that these are documents, not queries
    show_progress_bar=True,
)

# Step 4: Add document embeddings to the index by providing embeddings and corresponding ids
index.add_documents(
    documents_ids=documents_ids,
    documents_embeddings=documents_embeddings,
)

Deploy This Model

Production-ready deployment in minutes

Together.ai

Instant API access to this model

Fastest API

Production-ready inference API. Start free, scale to millions.

Try Free API

Replicate

One-click model deployment

Easiest Setup

Run models in the cloud with simple API. No DevOps required.

Deploy Now

Disclosure: We may earn a commission from these partners. This helps keep LLMYourWay free.