Model reference · open weights
multilingual-e5-large is an open-weight embedding model from intfloat. multilingual-e5-large (FP32) weighs 1.1 GB; the smallest configuration that runs it is RTX 3060 12 GB.
Summary of the intfloat/multilingual-e5-large model card, 2026-10-01
What it is
| Released by | intfloat |
|---|---|
| Released | 2023-06-30 |
| Parameters | 560M |
| VRAM | 1.1 GB for the weights |
What it runs on
| Card | Runs | Memory |
|---|---|---|
| RTX 3060 12 GB | fits | 11.6 GB |
| RTX 4060 Ti 16 GB | fits | 15.4 GB |
| RTX 3090 24 GB | fits | 23.4 GB |
| RTX 4090 24 GB | fits | 23.4 GB |
| RTX 5090 32 GB | fits | 31.0 GB |
| L40S 48 GB | fits | 44.0 GB |
| A100 80 GB | fits | 78.2 GB |
| H100 80 GB | fits | 78.1 GB |
| RTX PRO 6000 Blackwell 96 GB | fits | 93.8 GB |
| DGX Spark (GB10) 128 GB unified | fits | 107 GB |
| H200 141 GB | fits | 138 GB |
| B200 180 GB | fits | 176 GB |
Builds
| Build | Params | Precision | Weights | Smallest setup |
|---|---|---|---|---|
| multilingual-e5-large (above) ↗ | 560M | FP32 | 1.1 GB | RTX 3060 12 GB |
| multilingual-e5-large-instruct ↗ | 560M | FP16 | 1.1 GB | RTX 3060 12 GB |
From the model card
Multilingual E5 Text Embeddings: A Technical Report. Liang Wang, Nan Yang, Xiaolong Huang, Linjun Yang, Rangan Majumder, Furu Wei, arXiv 2024
This model has 24 layers and the embedding size is 1024.
Below is an example to encode queries and passages from the MS-MARCO passage ranking dataset.
import torch.nn.functional as F
from torch import Tensor
from transformers import AutoTokenizer, AutoModel
def average_pool(last_hidden_states: Tensor,
attention_mask: Tensor) -> Tensor:
last_hidden = last_hidden_states.masked_fill(~attention_mask[..., None].bool(), 0.0)
return last_hidden.sum(dim=1) / attention_mask.sum(dim=1)[..., None]
# Each input text should start with "query: " or "passage: ", even for non-English texts.
# For tasks other than retrieval, you can simply use the "query: " prefix.
input_texts = ['query: how much protein should a female eat',
'query: 南瓜的家常做法',
"passage: As a general guideline, the CDC's average requirement of protein for women ages 19 to 70 is 46 grams per day. But, as you can see from this chart, you'll need to increase that if you're expecting or training for a marathon. Check out the chart below to see how much protein you should be eating each day.",
"passage: 1.清炒南瓜丝 原料:嫩南瓜半个 调料:葱、盐、白糖、鸡精 做法: 1、南瓜用刀薄薄的削去表面一层皮,用勺子刮去瓤 2、擦成细丝(没有擦菜板就用刀慢慢切成细丝) 3、锅烧热放油,入葱花煸出香味 4、入南瓜丝快速翻炒一分钟左右,放盐、一点白糖和鸡精调味出锅 2.香葱炒南瓜 原料:南瓜1只 调料:香葱、蒜末、橄榄油、盐 做法: 1、将南瓜去皮,切成片 2、油锅8成热后,将蒜末放入爆香 3、爆香后,将南瓜片放入,翻炒 4、在翻炒的同时,可以不时地往锅里加水,但不要太多 5、放入盐,炒匀 6、南瓜差不多软和绵了之后,就可以关火 7、撒入香葱,即可出锅"]
tokenizer = AutoTokenizer.from_pretrained('intfloat/multilingual-e5-large')
model = AutoModel.from_pretrained('intfloat/multilingual-e5-large')
# Tokenize the input texts
batch_dict = tokenizer(input_texts, max_length=512, padding=True, truncation=True, return_tensors='pt')
outputs = model(**batch_dict)
embeddings = average_pool(outputs.last_hidden_state, batch_dict['attention_mask'])
# normalize embeddings
embeddings = F.normalize(embeddings, p=2, dim=1)
scores = (embeddings[:2] @ embeddings[2:].T) * 100
print(scores.tolist())
This model is initialized from xlm-roberta-large and continually trained on a mixture of multilingual datasets. It supports 100 languages from xlm-roberta, but low-resource languages may see performance degradation.
Initialization: xlm-roberta-large
First stage: contrastive pre-training with weak supervision
| Dataset | Weak supervision | # of text pairs |
|---|---|---|
| Filtered mC4 | (title, page content) | 1B |
| CC News | (title, news content) | 400M |
| NLLB | translation pairs | 2.4B |
| Wikipedia | (hierarchical section title, passage) | 150M |
| Filtered Reddit | (comment, response) | 800M |
| S2ORC | (title, abstract) and citation pairs | 100M |
| Stackexchange | (question, answer) | 50M |
| xP3 | (input prompt, response) | 80M |
| Miscellaneous unsupervised SBERT data | - | 10M |
Second stage: supervised fine-tuning
| Dataset | Language | # of text pairs |
|---|---|---|
| MS MARCO | English | 500k |
| NQ | English | 70k |
| Trivia QA | English | 60k |
| NLI from SimCSE | English | <300k |
| ELI5 | English | 500k |
| DuReader Retrieval | Chinese | 86k |
| KILT Fever | English | 70k |
| KILT HotpotQA | English | 70k |
| SQuAD | English | 87k |
| Quora | English | 150k |
| [Mr. TyDi](htt |
Quoted from the model card on Hugging Face. The full card is behind the Hugging Face link above.
Benchmarks
As published on the model card: the maker's own numbers, not measured by AxForge.
| Task | Dataset | Metric | Score |
|---|---|---|---|
| Classification | MTEB AmazonCounterfactualClassification (en) | accuracy | 79.060 |
| Classification | MTEB AmazonCounterfactualClassification (en) | ap | 43.487 |
| Classification | MTEB AmazonCounterfactualClassification (en) | f1 | 73.327 |
| Classification | MTEB AmazonCounterfactualClassification (de) | accuracy | 71.221 |
| Classification | MTEB AmazonCounterfactualClassification (de) | ap | 81.558 |
| Classification | MTEB AmazonCounterfactualClassification (de) | f1 | 69.283 |
| Classification | MTEB AmazonCounterfactualClassification (en-ext) | accuracy | 80.420 |
| Classification | MTEB AmazonCounterfactualClassification (en-ext) | ap | 29.349 |
| Classification | MTEB AmazonCounterfactualClassification (en-ext) | f1 | 67.625 |
| Classification | MTEB AmazonCounterfactualClassification (ja) | accuracy | 77.837 |
| Classification | MTEB AmazonCounterfactualClassification (ja) | ap | 26.558 |
| Classification | MTEB AmazonCounterfactualClassification (ja) | f1 | 64.966 |
| Classification | MTEB AmazonPolarityClassification | accuracy | 93.490 |
| Classification | MTEB AmazonPolarityClassification | ap | 90.988 |
| Classification | MTEB AmazonPolarityClassification | f1 | 93.486 |
| Classification | MTEB AmazonReviewsClassification (en) | accuracy | 47.564 |
| Classification | MTEB AmazonReviewsClassification (en) | f1 | 46.751 |
| Classification | MTEB AmazonReviewsClassification (de) | accuracy | 45.400 |
| Classification | MTEB AmazonReviewsClassification (de) | f1 | 44.172 |
| Classification | MTEB AmazonReviewsClassification (es) | accuracy | 43.068 |
| Classification | MTEB AmazonReviewsClassification (es) | f1 | 42.382 |
| Classification | MTEB AmazonReviewsClassification (fr) | accuracy | 41.890 |
| Classification | MTEB AmazonReviewsClassification (fr) | f1 | 40.844 |
| Classification | MTEB AmazonReviewsClassification (ja) | accuracy | 40.120 |