Model reference · open weights
mxbai-colbert-large is an open-weight embedding model from mixedbread-ai. AxForge deploys and operates it for you on dedicated EU-owned hardware — with the licence handled where one is required.
Available as managed deployment — configured and operated for you on dedicated EU hardware, quoted per deployment.
What it is
| Maker | mixedbread-ai |
|---|---|
| Type | Embedding models |
| Task | Embeddings |
| Parameters (lead) | 335M |
| Context | 512 tokens |
| Runs with | sentence-transformers |
| Released | 2024-03-18 |
| Popularity | 6k downloads / month |
| Licence | Open weights |
About
This is our first English ColBERT model, which is built upon our sentence embedding model mixedbread-ai/mxbai-embed-large-v1. You can learn more about the models in our blog post.
This checkpoint also loads with Sentence Transformers as a multi-vector (ColBERT-style late interaction) retriever via the MultiVectorEncoder.
pip install "sentence-transformers>=6.0.0"
from sentence_transformers import MultiVectorEncoder
model = MultiVectorEncoder("mixedbread-ai/mxbai-colbert-large-v1")
query = "Who wrote 'To Kill a Mockingbird'?"
documents = [
"'To Kill a Mockingbird' is a novel by Harper Lee published in 1960. It was immediately successful, winning the Pulitzer Prize, and has become a classic of modern American literature.",
"The novel 'Moby-Dick' was written by Herman Melville and first published in 1851. It is considered a masterpiece of American literature and deals with complex themes of obsession, revenge, and the conflict between good and evil.",
"Harper Lee, an American novelist widely known for her novel 'To Kill a Mockingbird', was born in 1926 in Monroeville, Alabama. She received the Pulitzer Prize for Fiction in 1961.",
"Jane Austen was an English novelist known primarily for her six major novels, which interpret, critique and comment upon the British landed gentry at the end of the 18th century.",
]
query_embeddings = model.encode_query([query])
document_embeddings = model.encode_document(documents)
print(query_embeddings[0].shape, document_embeddings[0].shape)
# (128, 128) (34, 128)
# MaxSim late-interaction scoring
scores = model.similarity(query_embeddings, document_embeddings)
print(scores)
# tensor([[119.3276, 95.9337, 114.1252, 76.5609]])
This model can also be used with RAGatouille:
pip install ragatouille
from ragatouille import RAGPretrainedModel
# Let's create a ragatouille instance
RAG = RAGPretrainedModel.from_pretrained("mixedbread-ai/mxbai-colbert-large-v1")
documents = [
"'To Kill a Mockingbird' is a novel by Harper Lee published in 1960. It was immediately successful, winning the Pulitzer Prize, and has become a classic of modern American literature.",
"The novel 'Moby-Dick' was written by Herman Melville and first published in 1851. It is considered a masterpiece of American literature and deals with complex themes of obsession, revenge, and the conflict between good and evil.",
"Harper Lee, an American novelist widely known for her novel 'To Kill a Mockingbird', was born in 1926 in Monroeville, Alabama. She received the Pulitzer Prize for Fiction in 1961.",
"Jane Austen was an English novelist known primarily for her six major novels, which interpret, critique and comment upon the British landed gentry at the end of the 18th century.",
"The 'Harry Potter' series, which consists of seven fantasy novels written by British author J.K. Rowling, is among the most popular and critically acclaimed books of the modern era.",
"'The Great Gatsby', a novel written by American author F. Scott Fitzgerald, was published in 1925. The story is set in the Jazz Age and follows the life of millionaire Jay Gatsby and his pursuit of Daisy Buchanan."
]
# index documents
RAG.index(documents, index_name="mockingbird")
# search
query = "Who wrote 'To Kill a Mockingbird'?"
results = RAG.search(query)
The result looks like this:
[
{
'content': "'To Kill a Mockingbird' is a novel by Harper Lee published in 1960. It was immediately successful, winning the Pulitzer Prize, and has become a classic of modern American literature.",
'score': 28.453125,
'rank': 1,
'document_id': '9d564e82-f14f-433a-ab40-b10bda9dc370',
'passage_id': 0
},
{
'content': "Harper Lee, an American novelist widely known for her novel 'To Kill a Mockingbird', was born in 1926 in Monroeville, Alabama. She received the Pulitzer Prize for Fiction in 1961.",
'score': 27.03125,
'rank': 2,
'document_id': 'a35a89c3-b610-4e2e-863e-fa1e7e0710a6',
'passage_id': 2
},
...
]
Setup: we use BM25 as the first-stage retrieval model, and then use ColBERT for reranking. We evaluate the out-of-domain performance on 13 public BEIR datasets. Following common practice, we report NDCG@10 as the metrics.
Here, we compare our model with two widely used ColBERT models, as follows:
| Dataset | ColBERTv2 | Jina-ColBERT-v1 | mxbai-colbert-large-v1 |
|---|---|---|---|
| ArguAna | 29.99 | 33.42 | 33.11 |
| ClimateFEVER | 16.51 | 20.66 | 20.85 |
| DBPedia | 31.80 | 42.16 | 40.61 |
| FEVER | 65.13 | 81.07 | 80.75 |
| FiQA | 23.61 | 35.60 | 35.86 |
| HotPotQA | 63.30 | 68.84 | 67.62 |
| NFCorpus | 33.75 | 36.69 | 36.37 |
| NQ | 30.55 | 51.27 | 51.43 |
| Quora | 78.86 | 85.18 | 86.95 |
| SCIDOCS | 14.90 | 15.39 | 16.98 |
| SciFact | 67.89 | 70.2 | 71.48 |
| TREC-COVID | 59.47 | 75.00 | 81.04 |
| Webis-touché2020 | 44.22 | 32.12 | 31.70 |
| Average | 43.08 | 49.82 | 50.37 |
Find more in our blog-post.
From the published model card. Full card on the HuggingFace links in the sidebar.
Using it via the API
Once AxForge deploys mxbai-colbert-large for you, it answers on the OpenAI-compatible API — the same base URL and keys as every other model. (mxbai-colbert-large below is illustrative; you get the exact model name on deployment.)
$ curl -sS https://api.axforge.ai/v1/embeddings \
-H "Authorization: Bearer $AXFORGE_API_KEY" \
-H "Content-Type: application/json" \
-d '{"model":"mxbai-colbert-large","input":"text to embed"}'
Create an account — your API key is available in the console. 5M tokens/month currently included with every new account at launch.