Model reference · open weights
e5-mistral 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
E5-mistral-7b-instruct Improving Text Embeddings with Large Language Models. Liang Wang, Nan Yang, Xiaolong Huang, Linjun Yang, Rangan Majumder, Furu Wei, arXiv 2024 This model has 32 layers and the embedding size is 4096. Usage Below is an example to encode queries and passages from the MS-MARCO passage ranking dataset. Sentence Transformers Have a look at configsentencetransformers.json for the prompts that are pre-configured, such as websearchquery, stsquery, and summarizationquery. Additionally, check out unilm/e5/utils.py for prompts we used for evaluation. You can use these via e.g. model.encode(queries, prompt="Instruct: Given a claim, find documents that refute the claim\nQuery: "). Transformers Supported Languages This model is initialized from Mistral-7B-v0.1 and fine-tuned on a mixture of multilingual datasets. As a result, it has some multilingual capability. However, since Mistral-7B-v0.1 is mainly trained on English data, we recommend using this model for English only. For multilingual use cases, please refer to multilingual-e5-large. 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. Where are the LoRA-only weights? You can find the LoRA-only weights at https://huggingface.co/intfloat/e5-mistral-7b-instruct/tree/main/lora. Citation If you find our paper or models helpful, please consider cite as follows: Limitations Using this model for inputs longer than 4096 tokens is not recommended. This model's multilingual capability is
Summarised from the published model card. Read the full card on the HuggingFace links below.
Specifications
| Maker | intfloat |
|---|---|
| Type | Embedding models |
| Parameters (lead) | 7.1B |
| Context | 32k tokens |
| Variants | 1 |
| Runs with | sentence-transformers |
| Released | 2023-12-20 |
| Popularity | 546k downloads / month |
| Likes | 569 |
| 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 |
|---|---|---|---|---|---|
| e5-mistral-7b-instruct | 7.1B | BF16 | ~16.4 GB | ✓ | Weights ↗ |
Benchmarks
As published on the model card — the maker's own numbers, not measured by AxForge.
| Task | Dataset | Metric | Score |
|---|---|---|---|
| STS | MTEB AFQMC | cos_sim_pearson | 37.863 |
| STS | MTEB AFQMC | cos_sim_spearman | 38.987 |
| STS | MTEB AFQMC | euclidean_pearson | 37.518 |
| STS | MTEB AFQMC | euclidean_spearman | 38.987 |
| STS | MTEB AFQMC | manhattan_pearson | 37.267 |
| STS | MTEB AFQMC | manhattan_spearman | 38.71 |
| STS | MTEB ATEC | cos_sim_pearson | 43.339 |
| STS | MTEB ATEC | cos_sim_spearman | 42.843 |
| STS | MTEB ATEC | euclidean_pearson | 45.627 |
| STS | MTEB ATEC | euclidean_spearman | 42.843 |
| STS | MTEB ATEC | manhattan_pearson | 45.479 |
| STS | MTEB ATEC | manhattan_spearman | 42.657 |
| Classification | MTEB AmazonCounterfactualClassification (en) | accuracy | 78.687 |
| Classification | MTEB AmazonCounterfactualClassification (en) | ap | 41.715 |
| Classification | MTEB AmazonCounterfactualClassification (en) | f1 | 72.372 |
| Classification | MTEB AmazonCounterfactualClassification (de) | accuracy | 74.047 |
| Classification | MTEB AmazonCounterfactualClassification (de) | ap | 83.426 |
| Classification | MTEB AmazonCounterfactualClassification (de) | f1 | 72.144 |
| Classification | MTEB AmazonCounterfactualClassification (en-ext) | accuracy | 77.931 |
| Classification | MTEB AmazonCounterfactualClassification (en-ext) | ap | 26.039 |
| Classification | MTEB AmazonCounterfactualClassification (en-ext) | f1 | 64.811 |
| Classification | MTEB AmazonCounterfactualClassification (ja) | accuracy | 77.216 |
| Classification | MTEB AmazonCounterfactualClassification (ja) | ap | 24.876 |
| Classification | MTEB AmazonCounterfactualClassification (ja) | f1 | 63.877 |
Using it via the API
Once AxForge deploys e5-mistral for you, it answers on the OpenAI-compatible API — the same base URL and keys as every other model. (e5-mistral 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":"e5-mistral","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