Model reference · open weights
multilingual-e5 is an open-weight embedding model from intfloat, listed in the AxForge catalogue. AxForge can bring it up on EU-owned hardware for you on request — with the licence handled where one is required.
About
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. 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 Second stage: supervised fine-tuning 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 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 sentencetransformers. Package requirements pip install sentencetransformers~=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 relati
Summarised from the published model card. Read the full card on the HuggingFace links below.
Specifications
| Maker | intfloat |
|---|---|
| Type | Embedding models |
| Parameters (lead) | 278M |
| Context | 514 tokens |
| Variants | 1 |
| Runs with | sentence-transformers |
| Released | 2023-05-19 |
| Popularity | 6.7M downloads / month |
| Likes | 383 |
| Licence | Open weights |
How it works
Variants
Open weights ship in several sizes and precisions. One page, all the variants — pick the one that fits your GPU. VRAM figures are estimates from model size.
| Variant | Params | Precision | VRAM | Fits 16 GB | Weights |
|---|---|---|---|---|---|
| multilingual-e5-base | 278M | BF16 | ~0.6 GB | ✓ | Weights ↗ |
Benchmarks
As published on the model card — the maker's own numbers, not measured by AxForge.
| Task | Dataset | Metric | Score |
|---|---|---|---|
| Classification | MTEB AmazonCounterfactualClassification (en) | accuracy | 78.97 |
| Classification | MTEB AmazonCounterfactualClassification (en) | ap | 43.694 |
| Classification | MTEB AmazonCounterfactualClassification (en) | f1 | 73.381 |
| Classification | MTEB AmazonCounterfactualClassification (de) | accuracy | 71.724 |
| Classification | MTEB AmazonCounterfactualClassification (de) | ap | 82.221 |
| Classification | MTEB AmazonCounterfactualClassification (de) | f1 | 69.955 |
| Classification | MTEB AmazonCounterfactualClassification (en-ext) | accuracy | 79.655 |
| Classification | MTEB AmazonCounterfactualClassification (en-ext) | ap | 28.508 |
| Classification | MTEB AmazonCounterfactualClassification (en-ext) | f1 | 66.845 |
| Classification | MTEB AmazonCounterfactualClassification (ja) | accuracy | 73.33 |
| Classification | MTEB AmazonCounterfactualClassification (ja) | ap | 20.72 |
| Classification | MTEB AmazonCounterfactualClassification (ja) | f1 | 59.78 |
| Classification | MTEB AmazonPolarityClassification | accuracy | 90.638 |
| Classification | MTEB AmazonPolarityClassification | ap | 87.223 |
| Classification | MTEB AmazonPolarityClassification | f1 | 90.604 |
| Classification | MTEB AmazonReviewsClassification (en) | accuracy | 44.546 |
| Classification | MTEB AmazonReviewsClassification (en) | f1 | 44.057 |
| Classification | MTEB AmazonReviewsClassification (de) | accuracy | 41.828 |
| Classification | MTEB AmazonReviewsClassification (de) | f1 | 41.271 |
| Classification | MTEB AmazonReviewsClassification (es) | accuracy | 40.534 |
| Classification | MTEB AmazonReviewsClassification (es) | f1 | 39.821 |
| Classification | MTEB AmazonReviewsClassification (fr) | accuracy | 39.684 |
| Classification | MTEB AmazonReviewsClassification (fr) | f1 | 39.111 |
| Classification | MTEB AmazonReviewsClassification (ja) | accuracy | 37.436 |
Using it via the API
Once AxForge deploys multilingual-e5 for you, it answers on the OpenAI-compatible API — the same base URL and keys as every other model. (multilingual-e5 below is illustrative; you get the exact model name on deployment.)
$ curl -sS https://api.axforge.ai/v1/embeddings \
-H "Authorization: Bearer $AXFORGE_API_KEY" \
-H "Content-Type: application/json" \
-d '{"model":"multilingual-e5","input":"text to embed"}'
Details
Languages
Tags
Papers
Licence
Open weights under mit — commercial use is permitted. Deploy it on AxForge EU hardware on request. Read the licence ↗
Explore