Model reference · open weights

mxbai-embed-xsmall

Embeddings mixedbread-ai Embeddings 1 build Open weights 20k dl/mo

mxbai-embed-xsmall is an open-weight embedding model from mixedbread-ai. mxbai-embed-xsmall-v1 (FP16) weighs 52 MB; the smallest configuration that runs it is RTX 3060 12 GB.

  • mxbai-embed-xsmall is an open-source English embedding model developed by mixedbread-ai for feature extraction and retrieval tasks.
  • It contains 24 million parameters, supports a context length of 4096 tokens, and is licensed under Apache 2.0.
  • The model is built upon sentence-transformers/all-MiniLM-L6-v2 and supports binary quantization and Matryoshka Representation Learning.

Summary of the mixedbread-ai/mxbai-embed-xsmall-v1 model card, 2026-10-01

What it is

Released bymixedbread-ai
Released2024-09-13
Parameters24M
VRAM52 MB for the weights

What it runs on

Memory and cards for mxbai-embed-xsmall-v1 (FP16)

52 MBweights, file size
1.1 GBruntime overhead
CardRunsMemory
RTX 3060 12 GBfits11.6 GB
RTX 4060 Ti 16 GBfits15.4 GB
RTX 3090 24 GBfits23.4 GB
RTX 4090 24 GBfits23.4 GB
RTX 5090 32 GBfits31.0 GB
L40S 48 GBfits44.0 GB
A100 80 GBfits78.2 GB
H100 80 GBfits78.1 GB
RTX PRO 6000 Blackwell 96 GBfits93.8 GB
DGX Spark (GB10) 128 GB unifiedfits107 GB
H200 141 GBfits138 GB
B200 180 GBfits176 GB

From the model card

What mixedbread-ai says about mxbai-embed-xsmall

Read the model card

This model is an open-source English embedding model developed by Mixedbread. It's built upon sentence-transformers/all-MiniLM-L6-v2 and trained with the AnglE loss and Espresso. Read more details in our blog post.

In a bread loaf:

Performance

Binary Quantization and Matryoshka

Our model supports both binary quantization and Matryoshka Representation Learning (MRL), allowing for significant efficiency gains:

  • Binary quantization: Retains 93.9% of performance while increasing efficiency by a factor of 32
  • MRL: A 33% reduction in vector size still leaves 96.2% of model performance

These optimizations can lead to substantial reductions in infrastructure costs for cloud computing and vector databases. Read more here.

Quickstart

Here are several ways to produce German sentence embeddings using our model.

pip install -U angle-emb
from angle_emb import AnglE
from angle_emb.utils import cosine_similarity

# 1. Specify preferred dimensions
dimensions = 384

# 2. Load model and set pooling strategy to avg
model = AnglE.from_pretrained(
    "mixedbread-ai/mxbai-embed-xsmall-v1",
    pooling_strategy='avg').cuda()

query = 'A man is eating a piece of bread'

docs = [
    query,
    "A man is eating food.",
    "A man is eating pasta.",
    "The girl is carrying a baby.",
    "A man is riding a horse.",
]

# 3. Encode
embeddings = model.encode(docs, embedding_size=dimensions)

for doc, emb in zip(docs[1:], embeddings[1:]):
    print(f'{query} ||| {doc}', cosine_similarity(embeddings[0], emb))
python -m pip install -U sentence-transformers
from sentence_transformers import SentenceTransformer
from sentence_transformers.util import cos_sim

# 1. Specify preferred dimensions
dimensions = 384

# 2. Load model
model = SentenceTransformer("mixedbread-ai/mxbai-embed-xsmall-v1", truncate_dim=dimensions)

query = 'A man is eating a piece of bread'

docs = [
    query,
    "A man is eating food.",
    "A man is eating pasta.",
    "The girl is carrying a baby.",
    "A man is riding a horse.",
]

# 3. Encode
embeddings = model.encode(docs)

similarities = cos_sim(embeddings[0], embeddings[1:])
print('similarities:', similarities)
pip install -U transformers
from typing import Dict

import torch
import numpy as np
from transformers import AutoModel, AutoTokenizer
from sentence_transformers.util import cos_sim

def pooling(outputs: torch.Tensor, inputs: Dict) -> np.ndarray:
    outputs = torch.sum(
      outputs * inputs["attention_mask"][:, :, None], dim=1) / torch.sum(inputs["attention_mask"])
    return outputs.detach().cpu().numpy()

# 1. Load model
model_id = 'mixedbread-ai/mxbai-embed-xsmall-v1'
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModel.from_pretrained(model_id).cuda()

query = 'A man is eating a piece of bread'

docs = [
    query,
    "A man is eating food.",
    "A man is eating pasta.",
    "The girl is carrying a baby.",
    "A man is riding a horse.",
]

# 2. Encode
inputs = tokenizer(docs, padding=True, return_tensors='pt')
for k, v in inputs.items():
    inputs[k] = v.cuda()
outputs = model(**inputs).last_hidden_state
embeddings = pooling(outputs, inputs)

# 3. Compute similarity scores
similarities = cos_sim(embeddings[0], embeddings[1:])
print('similarities:', similarities)
python -m pip install batched
import uvicorn
import batched
from fastapi import FastAPI
from fastapi.responses import ORJSONResponse
from sentence_transformers import SentenceTransformer
from pydantic import BaseModel

app = FastAPI()

model = SentenceTransformer('mixedbread-ai/mxbai-embed-xsmall-v1')
model.encode = batched.aio.dynamically(model.encode)

class EmbeddingsRequest(BaseModel):
    input: str | list[str]

@app.post("/embeddings")
async def embeddings(request: EmbeddingsRequest):
    return ORJSONResponse({"embeddings": await model.encode(request.input)})

if __name__ == "__main__":
    uvicorn.run(app, host="0.0.0.0", port=8000)

Community

License

Apache 2.0

Citation

@online{xsmall2024mxbai,
  title={Every Byte Matters: Introducing mxbai-embed-xsmall-v1},
  author={Sean Lee and Julius Lipp and Rui Huang and Darius Koenig},
  year={2024},
  url={https://www.mixedbread.ai/blog/mxbai-embed-xsmall-v1},
}

Quoted from the model card on Hugging Face. The full card is behind the Hugging Face link above.

Benchmarks

Reported results

As published on the model card: the maker's own numbers, not measured by AxForge.

TaskDatasetMetricScore
RetrievalMTEB ArguAnandcg_at_125.180
RetrievalMTEB ArguAnandcg_at_339.220
RetrievalMTEB ArguAnandcg_at_543.930
RetrievalMTEB ArguAnandcg_at_1049.580
RetrievalMTEB ArguAnandcg_at_3053.410
RetrievalMTEB ArguAnandcg_at_10054.110
RetrievalMTEB ArguAnamap_at_125.180
RetrievalMTEB ArguAnamap_at_335.660
RetrievalMTEB ArguAnamap_at_538.250
RetrievalMTEB ArguAnamap_at_1040.580
RetrievalMTEB ArguAnamap_at_3041.600
RetrievalMTEB ArguAnamap_at_10041.690
RetrievalMTEB ArguAnarecall_at_125.180
RetrievalMTEB ArguAnarecall_at_349.570
RetrievalMTEB ArguAnarecall_at_561.090
RetrievalMTEB ArguAnarecall_at_1078.590
RetrievalMTEB ArguAnarecall_at_3094.030
RetrievalMTEB ArguAnarecall_at_10097.940
RetrievalMTEB ArguAnaprecision_at_125.180
RetrievalMTEB ArguAnaprecision_at_316.520
RetrievalMTEB ArguAnaprecision_at_512.220
RetrievalMTEB ArguAnaprecision_at_107.860
RetrievalMTEB ArguAnaprecision_at_303.130
RetrievalMTEB ArguAnaprecision_at_1000.980
© 2026 AxForge · EU-hosted AI infrastructure Pricing Docs Trust Privacy Terms