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

multilingual-e5-small

Date: 2026-11-14Commit: 614241fSigned: 2DC28CC7B26A283B ✓

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

118M params2.28GBmultilingual-e5-smallonnx openvino safetensorspermissive
FactsParams118MSize2.28 GBFormatsonnx, openvino, safetensorsTasksentence similarityLicenseMITFrom sourcepermissive
$ fw get intfloat/multilingual-e5-small
# manifest sha256 6217548d69e7… · 2.28 GB · 43 files
$ fw verify ./multilingual-e5-small intfloat/multilingual-e5-small
From sourceHosted (signed)intfloat/multilingual-e5-smallLast 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
2.28 GB
Weights
471 MB (safetensors)
Parameters
118M
Formats
onnx, openvino, safetensors
Task
sentence similarity
License
MIT (permissive)
Files
43, 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 614241f. Shown as plain text with links; images open at the publisher.

Multilingual-E5-small#

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 384.

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

# 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 microsoft/Multilingual-MiniLM-L12-H384 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: microsoft/Multilingual-MiniLM-L12-H384

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-small')
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

43 files · 2.28 GBWeights 471 MB (safetensors). Sizes and sha256 from the signed manifest.
Show all 43 files with their sha256
FileSizesha256
.eval_results/ArguAna.yaml575 B53c1be5a451d915708a64756b626b7a8772ce8a785d6f4be5a7652709092371c
.eval_results/BrightAopsRetrieval.yaml641 B6027ed1058e852c2c0a9d34fbce4c10d18252681de802a6082282f363651e599
.eval_results/BrightBiologyLongRetrieval.yaml651 Bf4ebcfd606c3f1283907d8b4b434fa32848e0e4a122556e701919a95da75b439
.eval_results/BrightBiologyRetrieval.yaml647 Ba68fca027604de4c877e7d86b1858c5025c64029c1cddfd351e5d05e010f15d4
.eval_results/BrightEarthScienceLongRetrieval.yaml663 B4256206ca8f244b911a94858b8a7d32854fcad90f701e814bfa808d252fb9a68
.eval_results/BrightEarthScienceRetrieval.yaml659 B5dd5cae91c338408a31ba5a5b824edb36e0d3b0d913e38ef678240deb274209b
.eval_results/BrightEconomicsLongRetrieval.yaml655 B891ee9ad5db6ef7708cc2f73f56bd498ba8ea4ad4b6e061eb33472642f5e9f4b
.eval_results/BrightEconomicsRetrieval.yaml651 B7f0c33852f1da36d56e041479ef085c0ef53ecf786bbe972fe4a7e4f1f7b51d9
.eval_results/BrightLeetcodeRetrieval.yaml651 B7d163f441cf3f929d684af2c9c9933e1d6090b25926d18f467e1b168c5123823
.eval_results/BrightPonyLongRetrieval.yaml645 B502c6c13dd57ae95f4eda6f19f88550b971e7fdb46f13b2873c65d796496e0ab
.eval_results/BrightPonyRetrieval.yaml641 B5b99465cbd9eb7df09b34dde9895f478a88abaa3b5ff4474b49a5d0f5155a72c
.eval_results/BrightPsychologyLongRetrieval.yaml655 B4ad33f80d26bb613e2def7584455f975c7466cdf61335348cf2159fff877dddd
.eval_results/BrightPsychologyRetrieval.yaml653 Bfd43e8a64eb654e8773aa3ecbc947026edf42f92c629bdd9da87b8b56d12a137
.eval_results/BrightRoboticsLongRetrieval.yaml653 B9dcdf92946535dcf14304cb906cdec0d9db7bd4412a4a0158103cdb1435c64a3
.eval_results/BrightRoboticsRetrieval.yaml647 B71fdf00946b422675b53f598a22db9d3353cee4c4a153103f7cf7c2011b82f4f
.eval_results/BrightStackoverflowLongRetrieval.yaml665 Bd7e90b118eae1abb7b55579913a8da02cf1d337b032c0c998777325910deadf2
.eval_results/BrightStackoverflowRetrieval.yaml659 B9dc868231ebc0a78b94b3f4e681d476d67fb9e9c630626832e0af21e840a5aae
.eval_results/BrightSustainableLivingLongRetrieval.yaml673 B7ddd8840466a84effef1df193ef79e1a6457567925b4e3b28b034832a6d6a45a
.eval_results/BrightSustainableLivingRetrieval.yaml667 B91644839f8ef7ebd5844b2f8ce6719f63af14656e2acef2403895c8b1f859c28
.eval_results/BrightTheoremQAQuestionsRetrieval.yaml669 B00408cfa91d8677d9c6eefd98d37786d4a6a03b2a8cbb9c8d8364633377d797c
.eval_results/BrightTheoremQATheoremsRetrieval.yaml667 Becb1a69acecd2cb165ff9cd94aec3da58c63fcecd8972258b446f0dbcf5251f1
.gitattributes1.57 KB34448b82c17d60fec9b65b1f093c115ddbaadc04beb1b0140b6bfed2e012a930
1_Pooling/config.json200 B987f7a67a38fa564c849bb5d277c52ab9088a84368fc0be31a354125aebb12a0
README.md498 KB0038de97aee16258cecbad7ffda4b4febd6953e747a00e0ddbc8e6ed241e9c1c
config.json655 B69137736cab8b8903a07fe8afaafdda25aac55415a12a55d1bffa9f581abf959
model.safetensors471 MB1a55775f53449dac10a2bcbc312469fac40b96d53198c407081a831f81c98477
modules.json387 Bc6e29747481e8b5dd2b58401966aeac910de39092f90cda9a704b1545f902b04
onnx/config.json653 Bbbb7c1333fc4b3e27fbc9cd5d2070aabcc1d4dfb99917c3633e772f97545a6b6
onnx/model.onnx470 MBca456c06b3a9505ddfd9131408916dd79290368331e7d76bb621f1cba6bc8665
onnx/model_O4.onnx235 MB4654c156f3e4171abc9c716cdb771bf9116455d15ac1aab364aeeede0e3205b0
onnx/model_qint8_avx512_vnni.onnx118 MBdd476dd0c2514e9b9be83aeb3853fac0763e0bdf4a71645407587d77c48a2d88
onnx/sentencepiece.bpe.model5.07 MBcfc8146abe2a0488e9e2a0c56de7952f7c11ab059eca145a0a727afce0db2865
onnx/special_tokens_map.json167 Bd05497f1da52c5e09554c0cd874037a083e1dc1b9cfd48034d1c717f1afc07a7
onnx/tokenizer.json17.1 MB0b44a9d7b51c3c62626640cda0e2c2f70fdacdc25bbbd68038369d14ebdf4c39
onnx/tokenizer_config.json443 Ba1d6bc8734a6f635dc158508bef000f8e2e5a759c7d92f984b2c86e5ff53425b
openvino/openvino_model.bin470 MB22f5a10ec005a1606ec42758dedd52b59dfcb6e3d85de0b6b86946d0bc6cf232
openvino/openvino_model.xml363 KBd5268b47f8d05ca885ffbc77f136c3406ac6acdf85c482caec66eebab7fa5176
pytorch_model.bin471 MBf0ccb64a2edc689fce7b1895f25146740e4075c3da28c8d0e672a8ba49c51167
sentence_bert_config.json57 B948201d8329907aae938fa62f9ceeed53f5694dacc2b87b9f3b78b37ee986529
sentencepiece.bpe.model5.07 MBcfc8146abe2a0488e9e2a0c56de7952f7c11ab059eca145a0a727afce0db2865
special_tokens_map.json167 Bd05497f1da52c5e09554c0cd874037a083e1dc1b9cfd48034d1c717f1afc07a7
tokenizer.json17.1 MB0b44a9d7b51c3c62626640cda0e2c2f70fdacdc25bbbd68038369d14ebdf4c39
tokenizer_config.json443 Ba1d6bc8734a6f635dc158508bef000f8e2e5a759c7d92f984b2c86e5ff53425b
VersionsEach time the pinned upstream commit or file list changed in this repo. Newest first.
Upstream commitDateContents
614241f622 pinned now manifest updated, same commit2026-11-14 21:09 UTC43 files · 2.28 GB
614241f6222026-11-14 21:09 UTC43 files · 2.28 GB

Use it

$ fw get intfloat/multilingual-e5-small
# manifest sha256 6217548d69e7… · 2.28 GB · 43 files
$ fw verify ./multilingual-e5-small intfloat/multilingual-e5-small
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-small.json --dir ./multilingual-e5-small $ python3 fw.py verify ./multilingual-e5-small ./intfloat__multilingual-e5-small.json
hfThe Hugging Face CLI with one setting. Same repo id.
$ HF_ENDPOINT=https://freeweights.allternit.com hf download intfloat/multilingual-e5-small --revision 614241f622f53c4eeff9890bdc4f31cfecc418b3 --local-dir ./multilingual-e5-small
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-small", revision="614241f622f53c4eeff9890bdc4f31cfecc418b3") model = AutoModel.from_pretrained("intfloat/multilingual-e5-small", revision="614241f622f53c4eeff9890bdc4f31cfecc418b3", 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-small", revision="614241f622f53c4eeff9890bdc4f31cfecc418b3") 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
0038de97aee16258cecbad7ffda4b4febd6953e747a00e0ddbc8e6ed241e9c1c
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-smallDate: 2026-11-14Commit: 614241fSigned: 2DC28CC7B26A283B ✓
Upstream
intfloat/multilingual-e5-small
Pinned commit
614241f622f53c4eeff9890bdc4f31cfecc418b3
Manifest
multilingual-e5-small.json · .minisig
Manifest sha256
6217548d69e7eae1f264ef6103cad62af1376e568df6bfbeb9fcc68864197434
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-small.json $ curl -O https://freeweights.allternit.com/manifests/intfloat/multilingual-e5-small.json.minisig $ minisign -Vm multilingual-e5-small.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.

Fine-tunes
1
Get it
Download
$ HF_ENDPOINT=https://freeweights.allternit.com hf download intfloat/multilingual-e5-small
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-small.json. Provenance. Takedown history: none.
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