alt.freeweights.embed / multilingual-e5-base
From: intfloat <huggingface.co/intfloat>Newsgroups: alt.freeweights.embedSubject:

multilingual-e5-base

Date: 2026-11-14Commit: d128750Signed: 2DC28CC7B26A283B ✓

Sentence similarity model with 278M parameters. Onnx and openvino and safetensors weights, 5.32 GB in all. Published by intfloat under MIT.

278M params5.32GBmultilingual-e5-baseonnx openvino safetensorspermissive
FactsParams278MSize5.32 GBFormatsonnx, openvino, safetensorsTasksentence similarityLicenseMITFrom sourcepermissive
$ fw get intfloat/multilingual-e5-base
# manifest sha256 e6b83cd1e3fa… · 5.32 GB · 23 files
$ fw verify ./multilingual-e5-base intfloat/multilingual-e5-base
From sourceHosted (signed)intfloat/multilingual-e5-baseLast check: 2026-11-14 21:09 UTC

Get help: custom fine-tune or private deploy. We review your setup before we quote.

Works with

Evaluate with

Overview

Size
5.32 GB
Weights
1.11 GB (safetensors)
Parameters
278M
Formats
onnx, openvino, safetensors
Task
sentence similarity
License
MIT (permissive)
Files
23, each with a sha256
Publisher
intfloat
Added
2026-11-14
Section
alt.freeweights.embed
Lineage

Original release from the publisher.

Where these bytes come from
Publisher at the pinned commit→You

Sources are tried in order. A file counts only when its size and sha256 match the manifest. Sources are checked when you ask for them, not on a timer.

Sources
BadgeHostLast checkResult
From sourcehuggingface.co2026-11-14 21:09 UTCpassed

Model card

From the publisher at commit d128750. Shown as plain text with links; images open at the publisher.

Multilingual-E5-base#

Multilingual E5 Text Embeddings: A Technical Report. Liang Wang, Nan Yang, Xiaolong Huang, Linjun Yang, Rangan Majumder, Furu Wei, arXiv 2024

This model has 12 layers and the embedding size is 768.

Usage#

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-base')
model = AutoModel.from_pretrained('intfloat/multilingual-e5-base')

# 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())

Supported Languages#

This model is initialized from xlm-roberta-base and continually trained on a mixture of multilingual datasets. It supports 100 languages from xlm-roberta, but low-resource languages may see performance degradation.

Training Details#

Initialization: xlm-roberta-base

First stage: contrastive pre-training with weak supervision

DatasetWeak supervision# of text pairs
Filtered mC4(title, page content)1B
CC News(title, news content)400M
NLLBtranslation pairs2.4B
Wikipedia(hierarchical section title, passage)150M
Filtered Reddit(comment, response)800M
S2ORC(title, abstract) and citation pairs100M
Stackexchange(question, answer)50M
xP3(input prompt, response)80M
Miscellaneous unsupervised SBERT data-10M

Second stage: supervised fine-tuning

DatasetLanguage# of text pairs
MS MARCOEnglish500k
NQEnglish70k
Trivia QAEnglish60k
NLI from SimCSEEnglish<300k
ELI5English500k
DuReader RetrievalChinese86k
KILT FeverEnglish70k
KILT HotpotQAEnglish70k
SQuADEnglish87k
QuoraEnglish150k
Mr. TyDi11 languages50k
MIRACL16 languages40k

For all labeled datasets, we only use its training set for fine-tuning.

For other training details, please refer to our paper at https://arxiv.org/pdf/2402.05672.

Benchmark Results on Mr. TyDi#

ModelAvg MRR@10arbnenfiidjakoruswteth
BM2533.336.741.315.128.838.221.728.132.939.642.441.7
mDPR16.726.025.816.211.314.618.121.918.57.310.613.5
BM25 + mDPR41.749.153.528.436.545.535.536.242.740.542.049.2
multilingual-e5-small64.471.566.354.557.763.255.454.360.865.489.170.1
multilingual-e5-base65.972.365.058.560.864.956.655.862.769.086.672.7
multilingual-e5-large70.577.573.260.866.868.562.561.665.872.790.276.2

MTEB Benchmark Evaluation#

Check out unilm/e5 to reproduce evaluation results on the BEIR and MTEB benchmark.

Support for Sentence Transformers#

Below is an example for usage with sentence_transformers.

from sentence_transformers import SentenceTransformer
model = SentenceTransformer('intfloat/multilingual-e5-base')
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 i     s 46 grams per day. But, as you can see from this chart, you'll need to increase that if you're expecting or traini     ng 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、撒入香葱,即可出锅"
]
embeddings = model.encode(input_texts, normalize_embeddings=True)

Package requirements

pip install sentence_transformers~=2.2.2

Contributors: michaelfeil

FAQ#

1. Do I need to add the prefix "query: " and "passage: " to input texts?

Yes, this is how the model is trained, otherwise you will see a performance degradation.

Here are some rules of thumb:

  • Use "query: " and "passage: " correspondingly for asymmetric tasks such as passage retrieval in open QA, ad-hoc information retrieval.
  • Use "query: " prefix for symmetric tasks such as semantic similarity, bitext mining, paraphrase retrieval.
  • Use "query: " prefix if you want to use embeddings as features, such as linear probing classification, clustering.

2. Why are my reproduced results slightly different from reported in the model card?

Different versions of transformers and pytorch could cause negligible but non-zero performance differences.

3. Why does the cosine similarity scores distribute around 0.7 to 1.0?

This is a known and expected behavior as we use a low temperature 0.01 for InfoNCE contrastive loss.

For text embedding tasks like text retrieval or semantic similarity, what matters is the relative order of the scores instead of the absolute values, so this should not be an issue.

Citation#

If you find our paper or models helpful, please consider cite as follows:

@article{wang2024multilingual,
  title={Multilingual E5 Text Embeddings: A Technical Report},
  author={Wang, Liang and Yang, Nan and Huang, Xiaolong and Yang, Linjun and Majumder, Rangan and Wei, Furu},
  journal={arXiv preprint arXiv:2402.05672},
  year={2024}
}

Limitations#

Long texts will be truncated to at most 512 tokens.

Files

23 files · 5.32 GBWeights 1.11 GB (safetensors). Sizes and sha256 from the signed manifest.
Show all 23 files with their sha256
FileSizesha256
.eval_results/ArguAna.yaml575 Bb895847eff3a3c0108713d8c50f1ba993267fdeb81c80804258febe201723a3a
.gitattributes1.53 KB312a78ec7da89bec73d75fa3dcc2f19f2c75abc18189812f18f49f9ac525a5f2
1_Pooling/config.json200 Bf586ab6c734af7b8d14d898bfa7faa886f23b46f86dd1730514309893af13d75
README.md179 KB9d129cb0b912b55c7b5378f976a9c35ae4796c80466b659ad63930d8ca090fca
config.json694 B9dab198f24c8c0879e481cf7822005d5ecbceedbacb390ffafa594e28d31bac4
model.safetensors1.11 GBa18a44fad1d0b46ded15928144138cff1135d5cc8233bdd90be5f18822de09a7
modules.json387 Bc6e29747481e8b5dd2b58401966aeac910de39092f90cda9a704b1545f902b04
onnx/config.json686 B4c27930e59106027abab56f7531c1fa6b14bbf31e8229ec36d68affa4e869bcd
onnx/model.onnx1.11 GB84a4d426f7e87a6bf5bf195f0bae2c4a7d15f675b23ca96f42fab8326d7a77aa
onnx/model_O4.onnx555 MBf60256a833caee5c75a3903e589116752ee016ca7bc16f9b96e4db09984c5703
onnx/model_qint8_avx512_vnni.onnx279 MB2523551878658b305550d8759443822dbfda9ed9c8012ef2c354ba2c5b9de503
onnx/sentencepiece.bpe.model5.07 MBcfc8146abe2a0488e9e2a0c56de7952f7c11ab059eca145a0a727afce0db2865
onnx/special_tokens_map.json280 B06e405a36dfe4b9604f484f6a1e619af1a7f7d09e34a8555eb0b77b66318067f
onnx/tokenizer.json17.1 MB62c24cdc13d4c9952d63718d6c9fa4c287974249e16b7ade6d5a85e7bbb75626
onnx/tokenizer_config.json418 Befb5c0d09722e5fe59a462cd2a9976ee216d55b037597d997cd3fe833216da15
openvino/openvino_model.bin1.11 GB116c03a2814daff8b5dd1894edef0405cffa552b6df71f7dd933a451c8aa0ea4
openvino/openvino_model.xml368 KB78fe22227275852cdda83bcbce44e7658d2075cb96453504b46eddd58c59d660
pytorch_model.bin1.11 GBf061cb7641880f52895cbacab7c4ab39b0844e2e6b73794f2798de460d9fa418
sentence_bert_config.json57 B948201d8329907aae938fa62f9ceeed53f5694dacc2b87b9f3b78b37ee986529
sentencepiece.bpe.model5.07 MBcfc8146abe2a0488e9e2a0c56de7952f7c11ab059eca145a0a727afce0db2865
special_tokens_map.json280 B06e405a36dfe4b9604f484f6a1e619af1a7f7d09e34a8555eb0b77b66318067f
tokenizer.json17.1 MB62c24cdc13d4c9952d63718d6c9fa4c287974249e16b7ade6d5a85e7bbb75626
tokenizer_config.json418 Befb5c0d09722e5fe59a462cd2a9976ee216d55b037597d997cd3fe833216da15
VersionsEach time the pinned upstream commit or file list changed in this repo. Newest first.
Upstream commitDateContents
d128750597 pinned now manifest updated, same commit2026-11-14 21:09 UTC23 files · 5.32 GB
d1287505972026-11-14 21:09 UTC23 files · 5.32 GB

Use it

$ fw get intfloat/multilingual-e5-base
# manifest sha256 e6b83cd1e3fa… · 5.32 GB · 23 files
$ fw verify ./multilingual-e5-base intfloat/multilingual-e5-base
fw.pyChecks the signature and every sha256, tries each source in order, resumes.
$ python3 fw.py get https://freeweights.allternit.com/manifests/intfloat/multilingual-e5-base.json --dir ./multilingual-e5-base $ python3 fw.py verify ./multilingual-e5-base ./intfloat__multilingual-e5-base.json
hfThe Hugging Face CLI with one setting. Same repo id.
$ HF_ENDPOINT=https://freeweights.allternit.com hf download intfloat/multilingual-e5-base --revision d128750597153bb5987e10b1c3493a34e5a4502a --local-dir ./multilingual-e5-base
transformersLoad the weights in Python.
import os os.environ["HF_ENDPOINT"] = "https://freeweights.allternit.com" from transformers import AutoModel, AutoTokenizer tok = AutoTokenizer.from_pretrained("intfloat/multilingual-e5-base", revision="d128750597153bb5987e10b1c3493a34e5a4502a") model = AutoModel.from_pretrained("intfloat/multilingual-e5-base", revision="d128750597153bb5987e10b1c3493a34e5a4502a", device_map="auto")
sentence-transformersEmbed text with sentence-transformers.
import os os.environ["HF_ENDPOINT"] = "https://freeweights.allternit.com" from sentence_transformers import SentenceTransformer model = SentenceTransformer("intfloat/multilingual-e5-base", revision="d128750597153bb5987e10b1c3493a34e5a4502a") vectors = model.encode(["Hello"])

License

Name
MIT License
Id
MIT
Class
Permissive
Redistribution
yes
Listing
Hosted (signed)
Decided
License as declared by the publisher. No person read it. 2026-11-14
Text in
README.md
Text sha256
9d129cb0b912b55c7b5378f976a9c35ae4796c80466b659ad63930d8ca090fca
Terms gate
No extra terms beyond the license.

Read the license text

Licenses are checked against the license table. A custom license passes only after a person reads it.

Provenance

From: intfloat <huggingface.co/intfloat>Newsgroups: alt.freeweights.embedSubject: multilingual-e5-baseDate: 2026-11-14Commit: d128750Signed: 2DC28CC7B26A283B ✓
Upstream
intfloat/multilingual-e5-base
Pinned commit
d128750597153bb5987e10b1c3493a34e5a4502a
Manifest
multilingual-e5-base.json · .minisig
Manifest sha256
e6b83cd1e3fabffbcacaf6736f31150fab3b3bd78208c5bc7fb025a31ee978e1
Signature
minisign, Ed25519, key 2DC28CC7B26A283B
Created
2026-11-14 21:09 UTC
Generator
freeweights-manifest/0.1.0
Takedowns
None.

How to verify

$ curl -O https://freeweights.allternit.com/manifests/intfloat/multilingual-e5-base.json $ curl -O https://freeweights.allternit.com/manifests/intfloat/multilingual-e5-base.json.minisig $ minisign -Vm multilingual-e5-base.json -P RWQ7KGqyx4zCLXtUFOqvfv8L3g+8fpKJ1FsuxPyOYMF+4KufbUxKq1Oq $ shasum -a 256 <file> # compare with the Files tab

A manifest whose signature fails must be rejected. A file whose size or sha256 does not match must be discarded. Verify a download

Model tree

1 model in the catalog name this one as their parent.

Quantizations
1
Get it
Download
$ HF_ENDPOINT=https://freeweights.allternit.com hf download intfloat/multilingual-e5-base
Open in Freeweights Studio

Pull, verify and run it in the Allternit app on Desktop, web or phone.

Signed manifest
minisign, key 2DC28CC7B26A283B. multilingual-e5-base.json. Provenance. Takedown history: none.

Variants

1 quantized or adapter build of multilingual-e5-base. Each has its own license check and page.

From: sentence-transformers <huggingface.co/sentence-transformers>Subject: all-MiniLM-L6-v1
From: unsloth <huggingface.co/unsloth>Subject: all-MiniLM-L6-v2
From: mlx-community <huggingface.co/mlx-community>Subject: all-MiniLM-L6-v2-4bit
From: sentence-transformers <huggingface.co/sentence-transformers>Subject: all-mpnet-base-v1
From: sentence-transformers <huggingface.co/sentence-transformers>Subject: allenai-specter
From: sentence-transformers <huggingface.co/sentence-transformers>Subject: bert-base-nli-max-tokens