Model reference · open weights

mxbai-embed-2d-large

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

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

  • mxbai-embed-2d-large is a 335M parameter feature-extraction model by mixedbread-ai designed for generating sentence embeddings.
  • It supports adaptive transformer layers and embedding sizes, with a recommended layer range of 20 to 24, and has a context length of 512 tokens.
  • The model is licensed under Apache 2.0 and supports the English language.

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

What it is

Released bymixedbread-ai
Released2024-03-04
Parameters335M
VRAM670 MB for the weights

What it runs on

Memory and cards for mxbai-embed-2d-large-v1 (FP16)

670 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-2d-large

Read the model card

This is our 2DMSE sentence embedding model. It supports the adaptive transformer layer and embedding size. Find out more in our blog post.

TLDR: 2D-🪆 allows you to shrink the model and the embeddings layer. Shrinking only the embeddings model yields competetive results to other models like nomics embeddings model. Shrinking the model to ~50% maintains upto 85% of the performance without further training.

Quickstart

Here, we provide several ways to produce sentence embeddings with adaptive layers and embedding sizes. For this version, it is recommended to set adaptive layers from 20 to 24.

sentence-transformers

Currently, the best way to use our models is with the most recent version of sentence-transformers.

python -m pip install -U sentence-transformers
from sentence_transformers import models, SentenceTransformer
from sentence_transformers.util import cos_sim

# 1. load model with `cls` pooling
model = SentenceTransformer("mixedbread-ai/mxbai-embed-2d-large-v1")

# 2. set adaptive layer and embedding size.
# it is recommended to set layers from 20 to 24.
new_num_layers = 22  # 1D: set layer size
model[0].auto_model.encoder.layer = model[0].auto_model.encoder.layer[:new_num_layers]

new_embedding_size = 768  # 2D: set embedding size

# 3. encode
embeddings = model.encode(
    [
        'Who is german and likes bread?',
        'Everybody in Germany.'
    ]
)

# Similarity of the first sentence with the other two
similarities = cos_sim(embeddings[0, :new_embedding_size], embeddings[1, :new_embedding_size])

print('similarities:', similarities)

angle-emb

You can also use the lastest angle-emb for inference, as follows:

python -m pip install -U angle-emb
from angle_emb import AnglE
from sentence_transformers.util import cos_sim

# 1. load model
model = AnglE.from_pretrained("mixedbread-ai/mxbai-embed-2d-large-v1", pooling_strategy='cls').cuda()

# 2. set adaptive layer and embedding size.
# it is recommended to set layers from 20 to 24.
layer_index = 22  # 1d: layer
embedding_size = 768  # 2d: embedding size

# 3. encode
embeddings = model.encode([
    'Who is german and likes bread?',
    'Everybody in Germany.'
], layer_index=layer_index, embedding_size=embedding_size)

similarities = cos_sim(embeddings[0], embeddings[1:])
print('similarities:', similarities)

Transformers.js

If you haven't already, you can install the Transformers.js JavaScript library from NPM using:

npm i @xenova/transformers

You can then use the model to compute embeddings as follows:

import { pipeline, cos_sim } from '@xenova/transformers';
// Create a feature-extraction pipeline
const extractor = await pipeline('feature-extraction', 'mixedbread-ai/mxbai-embed-2d-large-v1', {
    quantized: false, // (Optional) remove this line to use the 8-bit quantized model
});

// Compute sentence embeddings (with `cls` pooling)
const sentences = ['Who is german and likes bread?', 'Everybody in Germany.' ];
const output = await extractor(sentences, { pooling: 'cls' });

// Set embedding size and truncate embeddings
const new_embedding_size = 768;
const truncated = output.slice(null, [0, new_embedding_size]);

// Compute cosine similarity
console.log(cos_sim(truncated[0].data, truncated[1].data)); // 0.6979532021425204

Using API

You can use the model via our API as follows:

from mixedbread_ai.client import MixedbreadAI
from sklearn.metrics.pairwise import cosine_similarity
import os

mxbai = MixedbreadAI(api_key="{MIXEDBREAD_API_KEY}")

english_sentences = [
    'What is the capital of Australia?',
    'Canberra is the capital of Australia.'
]

res = mxbai.embeddings(
     input=english_sentences,
     model="mixedbread-ai/mxbai-embed-2d-large-v1",
     dimensions=512,
)
embeddings = [entry.embedding for entry in res.data]

similarities = cosine_similarity([embeddings[0]], [embeddings[1]])
print(similarities)

The API comes with native INT8 and binary quantization support! Check out the docs for more information.

Evaluation

Please find more information in our blog post.

Community

License

Apache 2.0

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
ClassificationMTEB AmazonCounterfactualClassification (en)accuracy74.761
ClassificationMTEB AmazonCounterfactualClassification (en)ap37.906
ClassificationMTEB AmazonCounterfactualClassification (en)f168.808
ClassificationMTEB AmazonPolarityClassificationaccuracy93.256
ClassificationMTEB AmazonPolarityClassificationap90.069
ClassificationMTEB AmazonPolarityClassificationf193.248
ClassificationMTEB AmazonReviewsClassification (en)accuracy46.162
ClassificationMTEB AmazonReviewsClassification (en)f145.670
RetrievalMTEB ArguAnamap_at_137.980
RetrievalMTEB ArguAnamap_at_1054.918
RetrievalMTEB ArguAnamap_at_10055.401
RetrievalMTEB ArguAnamap_at_100055.403
RetrievalMTEB ArguAnamap_at_350.249
RetrievalMTEB ArguAnamap_at_553.400
RetrievalMTEB ArguAnamrr_at_138.834
RetrievalMTEB ArguAnamrr_at_1055.240
RetrievalMTEB ArguAnamrr_at_10055.737
RetrievalMTEB ArguAnamrr_at_100055.738
RetrievalMTEB ArguAnamrr_at_350.581
RetrievalMTEB ArguAnamrr_at_553.710
RetrievalMTEB ArguAnandcg_at_137.980
RetrievalMTEB ArguAnandcg_at_1063.629
RetrievalMTEB ArguAnandcg_at_10065.567
RetrievalMTEB ArguAnandcg_at_100065.614
© 2026 AxForge · EU-hosted AI infrastructure Pricing Docs Trust Privacy Terms