skip to content
gigarouter gigarouter

Multilingual E5 Large Instruct

intfloat/multilingual-e5-large-instruct

published Feb 2024 · updated Jul 2025

Multilingual E5 Large Instruct is a feature-extraction model that generates multilingual text embeddings for tasks like retrieval, using instruction-tuned query prefixes.

price
$0.0167
/ 1M tokens

specs

TaskFeature Extraction
ArchitectureTransformer (xlm-roberta-large)
Embedding Dimension1024
Max Tokens512
Languages100

about this model

intfloat/multilingual-e5-large-instruct is a feature-extraction (text embedding) model that produces 1024-dimensional multilingual embeddings and is optimized for retrieval tasks via instruction tuning. It is initialized from xlm-roberta-large and supports 100 languages, with performance degradation possible for low-resource languages.

Training and Usage

The model was trained in two stages: contrastive pre-training on 1 billion weakly supervised multilingual text pairs, followed by fine-tuning on labeled datasets from the E5-mistral paper. For retrieval, each query must be prefixed with a one-sentence task instruction (e.g., "Given a web search query, retrieve relevant passages that answer the query"); documents do not require an instruction. Pooling is performed via average pooling of the last hidden states, followed by L2 normalization.

Benchmark Performance

On the BEIR benchmark, multilingual-e5-large-instruct achieves a score of 52.5, the highest among the multilingual E5 model family:

ModelBEIR Score
multilingual-e5-small46.6
multilingual-e5-base48.9
multilingual-e5-large51.4
multilingual-e5-large-instruct52.5

The instruction-tuned model is reported to be on par with state-of-the-art English-only models of similar size. Detailed evaluation instructions for each task are defined in the official E5 repository.

Limitations

Input texts longer than 512 tokens are truncated. The model uses a low temperature (0.01) for InfoNCE loss, resulting in cosine similarity scores typically between 0.7 and 1.0; only the relative order of scores is meaningful.

best for

FAQ

Do I need to add instructions to the query?

Yes, prepend a one-sentence task description to each query. Documents do not need instructions.

Why are my reproduced results slightly different from the model card?

Differences in versions of transformers and PyTorch can cause negligible non-zero performance differences.

Why do cosine similarity scores distribute around 0.7 to 1.0?

The model uses a low temperature of 0.01 for InfoNCE contrastive loss; relative order matters, not absolute values.

What is the maximum input length?

Long texts are truncated to at most 512 tokens.

How do I call this model via the API on gigarouter?

Use the gigarouter OpenAI-compatible endpoint with your API key.

call it
# OpenAI client - just change base_url
from openai import OpenAI
client = OpenAI(base_url="https://gigarouter.ai/v1", api_key=KEY)
v = client.embeddings.create(model="intfloat/multilingual-e5-large-instruct", input=["hello world"])
print(v.data[0].embedding[:4])

try it live

runs the real hosted model on a shared demo allowance · get your own key + $25 free →