Model reference · open weights

dunzhang-stella_en

Embeddings Marqo Embeddings 1 build Open weights 71 dl/mo

dunzhang-stella_en is an open-weight embedding model from Marqo. dunzhang-stella_en_400M_v5 (FP32) weighs 870 MB; the smallest configuration that runs it is RTX 3060 12 GB.

  • dunzhang-stella_en is a sentence-similarity model developed by Marqo that features a fused matryoshka layer to reduce computational overhead for generating embeddings.
  • The model contains 435M parameters, supports a context length of 8192 tokens, and is distributed under the MIT licence.

Summary of the Marqo/dunzhang-stella_en_400M_v5 model card, 2026-10-01

What it is

Released byMarqo
Released2024-09-25
Parameters435M
VRAM870 MB for the weights

What it runs on

Memory and cards for dunzhang-stella_en_400M_v5 (FP32)

870 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 Marqo says about dunzhang-stella_en

Read the model card

Marqo Stella v2

This model is similar to the original Dunzhang stella 400m model, with a fused matryoshka layer. The hierarchical structuring from a Matryoshka Layer reduces the computational overhead for generating embeddings, while leaving relevance metrics unchanged.

Transformers

import os
import torch
from transformers import AutoModel, AutoTokenizer, AutoConfig
from sklearn.preprocessing import normalize

query_prompt = "Instruct: Given a web search query, retrieve relevant passages that answer the query.\nQuery: "
queries = [
    "What are some ways to reduce stress?",
    "What are the benefits of drinking green tea?",
]
queries = [query_prompt + query for query in queries]
# docs do not need any prompts
docs = [
    "There are many effective ways to reduce stress. Some common techniques include deep breathing, meditation, and physical activity. Engaging in hobbies, spending time in nature, and connecting with loved ones can also help alleviate stress. Additionally, setting boundaries, practicing self-care, and learning to say no can prevent stress from building up.",
    "Green tea has been consumed for centuries and is known for its potential health benefits. It contains antioxidants that may help protect the body against damage caused by free radicals. Regular consumption of green tea has been associated with improved heart health, enhanced cognitive function, and a reduced risk of certain types of cancer. The polyphenols in green tea may also have anti-inflammatory and weight loss properties.",
]

# The path of your model after cloning it
model_dir = "Marqo/dunzhang-stella_en_400M_v5"
model = AutoModel.from_pretrained(model_dir, trust_remote_code=True).cuda().eval()
tokenizer = AutoTokenizer.from_pretrained(model_dir, trust_remote_code=True)

with torch.no_grad():
    input_data = tokenizer(queries, padding="longest", truncation=True, max_length=512, return_tensors="pt")
    input_data = {k: v.cuda() for k, v in input_data.items()}
    attention_mask = input_data["attention_mask"]
    last_hidden_state = model(**input_data)[0]
    last_hidden = last_hidden_state.masked_fill(~attention_mask[..., None].bool(), 0.0)
    query_vectors = last_hidden.sum(dim=1) / attention_mask.sum(dim=1)[..., None]
    query_vectors = normalize(query_vectors.cpu().numpy())

# Embed the documents
with torch.no_grad():
    input_data = tokenizer(docs, padding="longest", truncation=True, max_length=512, return_tensors="pt")
    input_data = {k: v.cuda() for k, v in input_data.items()}
    attention_mask = input_data["attention_mask"]
    last_hidden_state = model(**input_data)[0]
    last_hidden = last_hidden_state.masked_fill(~attention_mask[..., None].bool(), 0.0)
    docs_vectors = last_hidden.sum(dim=1) / attention_mask.sum(dim=1)[..., None]
    docs_vectors = normalize(docs_vectors.cpu().numpy())

print(query_vectors.shape, docs_vectors.shape)
# (2, 1024) (2, 1024)

similarities = query_vectors @ docs_vectors.T
print(similarities)
# [[0.8397531  0.29900077]
#  [0.32818374 0.80954516]]

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)accuracy92.358
ClassificationMTEB AmazonCounterfactualClassification (en)ap70.813
ClassificationMTEB AmazonCounterfactualClassification (en)ap_weighted70.813
ClassificationMTEB AmazonCounterfactualClassification (en)f188.951
ClassificationMTEB AmazonCounterfactualClassification (en)f1_weighted92.686
ClassificationMTEB AmazonCounterfactualClassification (en)main_score92.358
ClassificationMTEB AmazonPolarityClassificationaccuracy97.195
ClassificationMTEB AmazonPolarityClassificationap96.082
ClassificationMTEB AmazonPolarityClassificationap_weighted96.082
ClassificationMTEB AmazonPolarityClassificationf197.194
ClassificationMTEB AmazonPolarityClassificationf1_weighted97.194
ClassificationMTEB AmazonPolarityClassificationmain_score97.195
ClassificationMTEB AmazonReviewsClassification (en)accuracy59.528
ClassificationMTEB AmazonReviewsClassification (en)f159.210
ClassificationMTEB AmazonReviewsClassification (en)f1_weighted59.210
ClassificationMTEB AmazonReviewsClassification (en)main_score59.528
RetrievalMTEB ArguAnamain_score64.240
RetrievalMTEB ArguAnamap_at_140.398
RetrievalMTEB ArguAnamap_at_1056.215
RetrievalMTEB ArguAnamap_at_10056.834
RetrievalMTEB ArguAnamap_at_100056.835
RetrievalMTEB ArguAnamap_at_2056.747
RetrievalMTEB ArguAnamap_at_352.181
RetrievalMTEB ArguAnamap_at_554.628
© 2026 AxForge · EU-hosted AI infrastructure Pricing Docs Trust Privacy Terms