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

multilingual-e5-base-ONNX

Date: 2026-11-15Commit: d15bb63Signed: 2DC28CC7B26A283B ✓

Sentence similarity model. Onnx weights, 4.60 GB in all. Published by onnx-community under MIT.

embed4.60GBmultilingual-e5-base-ONNXonnxpermissive
FactsParamsnot statedSize4.60 GBFormatsonnxTasksentence similarityLicenseMITFrom sourcepermissive
$ fw get onnx-community/multilingual-e5-base-ONNX
# manifest sha256 584c7862cc69… · 4.60 GB · 14 files
$ fw verify ./multilingual-e5-base-ONNX onnx-community/multilingual-e5-base-ONNX
From sourceHosted (signed)onnx-community/multilingual-e5-base-ONNXLast check: 2026-11-15 05:18 UTC

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

Quantized of multilingual-e5-base.

Works with

Runs with

Ranked by fit to this model (onnx), then by GitHub stars.

Convert with

Evaluate with

Scan with

Overview

Size
4.60 GB
Weights
278 MB (smallest of 8 ONNX variants)
Parameters
not stated
Formats
onnx
Task
sentence similarity
License
MIT (permissive)
Files
14, each with a sha256
Publisher
onnx-community
Added
2026-11-15
Section
alt.freeweights.embed
Lineage

Original release from the publisher.

Base model: intfloat/multilingual-e5-base

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-15 05:18 UTCpassed

Model card

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

multilingual-e5-base (ONNX)#

This is an ONNX version of intfloat/multilingual-e5-base. It was automatically converted and uploaded using this Hugging Face Space.

Usage with Transformers.js#

See the pipeline documentation for sentence-similarity: https://huggingface.co/docs/transformers.js/api/pipelines


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

14 files · 4.60 GBWeights 278 MB (smallest of 8 ONNX variants). Sizes and sha256 from the signed manifest.
Hide all 14 files with their sha256
FileSizesha256
.gitattributes1.57 KB34448b82c17d60fec9b65b1f093c115ddbaadc04beb1b0140b6bfed2e012a930
README.md180 KB6924d9326d286e1b60faec7396b90c8c7006e9648e9079f8cfb2154f3750dbe5
config.json656 Bac7aff5828f41e25b0a7bd9f950424e6d3dd9bb08c6142cb892e81a638156ca9
onnx/model.onnx1.11 GB7b9ef5d6454d7dae6e1c0d0a567efdf3df587b9f311020f5070b50d6127a5cc7
onnx/model_bnb4.onnx823 MB3f1a063a2fd98d4acff43145f641207825caacb177050b6078cb80a220a2ec55
onnx/model_fp16.onnx555 MBec80e92aa606d7b21e453c6ad07355f8ef3de53dd1a1bb74f4c26cb73cf3ce1a
onnx/model_int8.onnx278 MB9d653d5a5ca4e61af7fb43275bdec6c0501d8d002400bec506b814a6b198f48c
onnx/model_q4.onnx823 MB3f1a063a2fd98d4acff43145f641207825caacb177050b6078cb80a220a2ec55
onnx/model_q4f16.onnx433 MBe672be85bcc2be71358d6d17a675b9091f0ac33b787872c2c31ad0c6959e7c0b
onnx/model_quantized.onnx278 MB9d653d5a5ca4e61af7fb43275bdec6c0501d8d002400bec506b814a6b198f48c
onnx/model_uint8.onnx278 MB3098e90d5d2b2c425d9c6af4932a58db7c7dfc5da814802115c0e37a7f028784
special_tokens_map.json964 B8c785abebea9ae3257b61681b4e6fd8365ceafde980c21970d001e834cf10835
tokenizer.json17.1 MB3a56def25aa40facc030ea8b0b87f3688e4b3c39eb8b45d5702b3a1300fe2a20
tokenizer_config.json1.18 KBdfb4021b23969fc942e96b2c4ac906d94712b4b96ef7081cb66a0ea211896d51
VersionsEach time the pinned upstream commit or file list changed in this repo. Newest first.
Upstream commitDateContents
d15bb63d14 pinned now2026-11-15 05:18 UTC14 files · 4.60 GB

Use it

$ fw get onnx-community/multilingual-e5-base-ONNX
# manifest sha256 584c7862cc69… · 4.60 GB · 14 files
$ fw verify ./multilingual-e5-base-ONNX onnx-community/multilingual-e5-base-ONNX
fw.pyChecks the signature and every sha256, tries each source in order, resumes.
$ python3 fw.py get https://freeweights.allternit.com/manifests/onnx-community/multilingual-e5-base-ONNX.json --dir ./multilingual-e5-base-ONNX $ python3 fw.py verify ./multilingual-e5-base-ONNX ./onnx-community__multilingual-e5-base-ONNX.json
hfThe Hugging Face CLI with one setting. Same repo id.
$ HF_ENDPOINT=https://freeweights.allternit.com hf download onnx-community/multilingual-e5-base-ONNX --revision d15bb63d1494d49ff653bb0105592a2696e7a8b6 --local-dir ./multilingual-e5-base-ONNX

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-15
Text in
README.md
Text sha256
6924d9326d286e1b60faec7396b90c8c7006e9648e9079f8cfb2154f3750dbe5
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: onnx-community <huggingface.co/onnx-community>Newsgroups: alt.freeweights.embedSubject: multilingual-e5-base-ONNXDate: 2026-11-15Commit: d15bb63Signed: 2DC28CC7B26A283B ✓
Upstream
onnx-community/multilingual-e5-base-ONNX
Pinned commit
d15bb63d1494d49ff653bb0105592a2696e7a8b6
Manifest
multilingual-e5-base-ONNX.json · .minisig
Manifest sha256
584c7862cc6903524336e6770ca86f71f161f8d61560eeb068850290e7676152
Signature
minisign, Ed25519, key 2DC28CC7B26A283B
Created
2026-11-15 05:18 UTC
Generator
freeweights-manifest/0.1.0
Takedowns
None.

How to verify

$ curl -O https://freeweights.allternit.com/manifests/onnx-community/multilingual-e5-base-ONNX.json $ curl -O https://freeweights.allternit.com/manifests/onnx-community/multilingual-e5-base-ONNX.json.minisig $ minisign -Vm multilingual-e5-base-ONNX.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

Parent

intfloat/multilingual-e5-base · this model is a quantization of it

No model in the catalog names this one as its parent.

Get it
Download
$ HF_ENDPOINT=https://freeweights.allternit.com hf download onnx-community/multilingual-e5-base-ONNX
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-ONNX.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