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

multilingual-e5-large-instruct

Date: 2026-11-14Commit: 274baa4Signed: 2DC28CC7B26A283B ✓

Feature extraction model with 560M parameters. Onnx and safetensors weights, 3.40 GB in all. Published by intfloat under MIT.

560M params3.40GBmultilingual-e5-large-instructonnx safetensorspermissive
FactsParams560MSize3.40 GBFormatsonnx, safetensorsTaskfeature extractionLicenseMITFrom sourcepermissive
$ fw get intfloat/multilingual-e5-large-instruct
# manifest sha256 9a3eae7f9846… · 3.40 GB · 19 files
$ fw verify ./multilingual-e5-large-instruct intfloat/multilingual-e5-large-instruct
From sourceHosted (signed)intfloat/multilingual-e5-large-instructLast 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
3.40 GB
Weights
1.12 GB (safetensors)
Parameters
560M
Formats
onnx, safetensors
Task
feature extraction
License
MIT (permissive)
Files
19, 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 274baa4. Shown as plain text with links; images open at the publisher.

Multilingual-E5-large-instruct#

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.

Usage#

Below are examples to encode queries and passages from the MS-MARCO passage ranking dataset.

Transformers#
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]

def get_detailed_instruct(task_description: str, query: str) -> str:
    return f'Instruct: {task_description}\nQuery: {query}'

# Each query must come with a one-sentence instruction that describes the task
task = 'Given a web search query, retrieve relevant passages that answer the query'
queries = [
    get_detailed_instruct(task, 'how much protein should a female eat'),
    get_detailed_instruct(task, '南瓜的家常做法')
]
# No need to add instruction for retrieval documents
documents = [
    "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.",
    "1.清炒南瓜丝 原料:嫩南瓜半个 调料:葱、盐、白糖、鸡精 做法: 1、南瓜用刀薄薄的削去表面一层皮,用勺子刮去瓤 2、擦成细丝(没有擦菜板就用刀慢慢切成细丝) 3、锅烧热放油,入葱花煸出香味 4、入南瓜丝快速翻炒一分钟左右,放盐、一点白糖和鸡精调味出锅 2.香葱炒南瓜 原料:南瓜1只 调料:香葱、蒜末、橄榄油、盐 做法: 1、将南瓜去皮,切成片 2、油锅8成热后,将蒜末放入爆香 3、爆香后,将南瓜片放入,翻炒 4、在翻炒的同时,可以不时地往锅里加水,但不要太多 5、放入盐,炒匀 6、南瓜差不多软和绵了之后,就可以关火 7、撒入香葱,即可出锅"
]
input_texts = queries + documents

tokenizer = AutoTokenizer.from_pretrained('intfloat/multilingual-e5-large-instruct')
model = AutoModel.from_pretrained('intfloat/multilingual-e5-large-instruct')

# 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())
# => [[91.92852783203125, 67.580322265625], [70.3814468383789, 92.1330795288086]]
Sentence Transformers#
from sentence_transformers import SentenceTransformer

def get_detailed_instruct(task_description: str, query: str) -> str:
    return f'Instruct: {task_description}\nQuery: {query}'

# Each query must come with a one-sentence instruction that describes the task
task = 'Given a web search query, retrieve relevant passages that answer the query'
queries = [
    get_detailed_instruct(task, 'how much protein should a female eat'),
    get_detailed_instruct(task, '南瓜的家常做法')
]
# No need to add instruction for retrieval documents
documents = [
    "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.",
    "1.清炒南瓜丝 原料:嫩南瓜半个 调料:葱、盐、白糖、鸡精 做法: 1、南瓜用刀薄薄的削去表面一层皮,用勺子刮去瓤 2、擦成细丝(没有擦菜板就用刀慢慢切成细丝) 3、锅烧热放油,入葱花煸出香味 4、入南瓜丝快速翻炒一分钟左右,放盐、一点白糖和鸡精调味出锅 2.香葱炒南瓜 原料:南瓜1只 调料:香葱、蒜末、橄榄油、盐 做法: 1、将南瓜去皮,切成片 2、油锅8成热后,将蒜末放入爆香 3、爆香后,将南瓜片放入,翻炒 4、在翻炒的同时,可以不时地往锅里加水,但不要太多 5、放入盐,炒匀 6、南瓜差不多软和绵了之后,就可以关火 7、撒入香葱,即可出锅"
]
input_texts = queries + documents

model = SentenceTransformer('intfloat/multilingual-e5-large-instruct')

embeddings = model.encode(input_texts, convert_to_tensor=True, normalize_embeddings=True)
scores = (embeddings[:2] @ embeddings[2:].T) * 100
print(scores.tolist())
# [[91.92853546142578, 67.5802993774414], [70.38143157958984, 92.13307189941406]]
Infinity#

Usage with Infinity:

docker run --gpus all -v $PWD/data:/app/.cache -e HF_TOKEN=$HF_TOKEN -p "7997":"7997" \
michaelf34/infinity:0.0.68 \
v2 --model-id intfloat/multilingual-e5-large-instruct --revision "main" --dtype float16 --batch-size 32 --engine torch --port 7997

Supported Languages#

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.

Training Details#

Initialization: xlm-roberta-large

First stage: contrastive pre-training with 1 billion weakly supervised text pairs.

Second stage: fine-tuning on datasets from the E5-mistral paper.

MTEB Benchmark Evaluation#

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

FAQ#

1. Do I need to add instructions to the query?

Yes, this is how the model is trained, otherwise you will see a performance degradation. The task definition should be a one-sentence instruction that describes the task. This is a way to customize text embeddings for different scenarios through natural language instructions.

Please check out unilm/e5/utils.py for instructions we used for evaluation.

On the other hand, there is no need to add instructions to the document side.

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

19 files · 3.40 GBWeights 1.12 GB (safetensors). Sizes and sha256 from the signed manifest.
Hide all 19 files with their sha256
FileSizesha256
.gitattributes1.63 KB7363a8ebd782ede400e72bb3e88c19248478eb6f280a7376d398fc2f22707b9a
1_Pooling/config.json271 Baa629215c1d83e73d9c51184e566f2c53456bc742f936984355a2990c8c8d046
README.md140 KB41676700d80691ac2f4397ee2b546ef58f9e3236af2f3d0770ab0fa61940ce51
config.json690 Bd185df634c872f06fc6dcb3bad4375d3c447234baea8a6e548103f653b595a35
config_sentence_transformers.json128 B7e16d286cc304f7d34ffb4e21fa1a11f227cf2b6d49cb615aa44d87723d17e28
model.safetensors1.12 GBdd6b6e4f52db0a7aff83a13d10e6c5342ef9f6ab799bad3221f4b35ef390fa85
modules.json349 B84e40c8e006c9b1d6c122e02cba9b02458120b5fb0c87b746c41e0207cf642cf
onnx/config.json763 B3762389b621283a0466d96f699fc1a0f160de49c4b50adcc87b537931e458ba3
onnx/model.onnx686 KBe3aeea5355352d826bd952a9a96fab206c6c72d1a429c8773c9da5ac16e44af5
onnx/model.onnx_data2.24 GB4c13ca44e40a7ee86b461398cdee003d656e39f3fa87e1b3152fbada3e61b506
onnx/sentencepiece.bpe.model5.07 MBcfc8146abe2a0488e9e2a0c56de7952f7c11ab059eca145a0a727afce0db2865
onnx/special_tokens_map.json964 B8c785abebea9ae3257b61681b4e6fd8365ceafde980c21970d001e834cf10835
onnx/tokenizer.json17.1 MBf59925fcb90c92b894cb93e51bb9b4a6105c5c249fe54ce1c704420ac39b81af
onnx/tokenizer_config.json1.18 KB49f06d15a18f81855c338f8ab6241ca2e502a65b62968be69b74f094489f8175
sentence_xlm-roberta_config.json53 Bec8e29d6dcb61b611b7d3fdd2982c4524e6ad985959fa7194eacfb655a8d0d51
sentencepiece.bpe.model5.07 MBcfc8146abe2a0488e9e2a0c56de7952f7c11ab059eca145a0a727afce0db2865
special_tokens_map.json964 B8c785abebea9ae3257b61681b4e6fd8365ceafde980c21970d001e834cf10835
tokenizer.json17.1 MBf59925fcb90c92b894cb93e51bb9b4a6105c5c249fe54ce1c704420ac39b81af
tokenizer_config.json1.18 KB49f06d15a18f81855c338f8ab6241ca2e502a65b62968be69b74f094489f8175
VersionsEach time the pinned upstream commit or file list changed in this repo. Newest first.
Upstream commitDateContents
274baa43b0 pinned now manifest updated, same commit2026-11-14 21:09 UTC19 files · 3.40 GB
274baa43b02026-11-14 21:09 UTC19 files · 3.40 GB

Use it

$ fw get intfloat/multilingual-e5-large-instruct
# manifest sha256 9a3eae7f9846… · 3.40 GB · 19 files
$ fw verify ./multilingual-e5-large-instruct intfloat/multilingual-e5-large-instruct
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-large-instruct.json --dir ./multilingual-e5-large-instruct $ python3 fw.py verify ./multilingual-e5-large-instruct ./intfloat__multilingual-e5-large-instruct.json
hfThe Hugging Face CLI with one setting. Same repo id.
$ HF_ENDPOINT=https://freeweights.allternit.com hf download intfloat/multilingual-e5-large-instruct --revision 274baa43b0e13e37fafa6428dbc7938e62e5c439 --local-dir ./multilingual-e5-large-instruct
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-large-instruct", revision="274baa43b0e13e37fafa6428dbc7938e62e5c439") model = AutoModel.from_pretrained("intfloat/multilingual-e5-large-instruct", revision="274baa43b0e13e37fafa6428dbc7938e62e5c439", 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-large-instruct", revision="274baa43b0e13e37fafa6428dbc7938e62e5c439") 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
41676700d80691ac2f4397ee2b546ef58f9e3236af2f3d0770ab0fa61940ce51
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-large-instructDate: 2026-11-14Commit: 274baa4Signed: 2DC28CC7B26A283B ✓
Upstream
intfloat/multilingual-e5-large-instruct
Pinned commit
274baa43b0e13e37fafa6428dbc7938e62e5c439
Manifest
multilingual-e5-large-instruct.json · .minisig
Manifest sha256
9a3eae7f9846e6f24782a7913132f43579a7241fb17628b7557683e93861e816
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-large-instruct.json $ curl -O https://freeweights.allternit.com/manifests/intfloat/multilingual-e5-large-instruct.json.minisig $ minisign -Vm multilingual-e5-large-instruct.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

No related models in this catalog.Nothing here lists this model as its parent, and it names no parent.
Get it
Download
$ HF_ENDPOINT=https://freeweights.allternit.com hf download intfloat/multilingual-e5-large-instruct
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-large-instruct.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