alt.freeweights.embed / e5-mistral-7b-instruct
From: intfloat <huggingface.co/intfloat>Newsgroups: alt.freeweights.embedSubject:

e5-mistral-7b-instruct

Date: 2026-11-14Commit: d62cc44Signed: 2DC28CC7B26A283B ✓

Feature extraction model with 7.1B parameters. Safetensors weights, 28.6 GB in all. Published by intfloat under MIT.

7.1B params28.6GBe5-mistral-7b-instructsafetensorspermissive
FactsParams7.1BSize28.6 GBFormatssafetensorsTaskfeature extractionLicenseMITFrom sourcepermissive
$ fw get intfloat/e5-mistral-7b-instruct
# manifest sha256 06ab8fab66ca… · 28.6 GB · 21 files
$ fw verify ./e5-mistral-7b-instruct intfloat/e5-mistral-7b-instruct
From sourceHosted (signed)intfloat/e5-mistral-7b-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
28.6 GB
Weights
14.2 GB (safetensors)
Parameters
7.1B
Formats
safetensors
Task
feature extraction
License
MIT (permissive)
Files
21, 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 d62cc44. Shown as plain text with links; images open at the publisher.

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#
from sentence_transformers import SentenceTransformer

model = SentenceTransformer("intfloat/e5-mistral-7b-instruct")
# In case you want to reduce the maximum sequence length:
model.max_seq_length = 4096

queries = [
    "how much protein should a female eat",
    "summit define",
]
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.",
    "Definition of summit for English Language Learners. : 1  the highest point of a mountain : the top of a mountain. : 2  the highest level. : 3  a meeting or series of meetings between the leaders of two or more governments."
]

query_embeddings = model.encode(queries, prompt_name="web_search_query")
document_embeddings = model.encode(documents)

scores = (query_embeddings @ document_embeddings.T) * 100
print(scores.tolist())

Have a look at config_sentence_transformers.json for the prompts that are pre-configured, such as web_search_query, sts_query, and summarization_query. 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#
import torch
import torch.nn.functional as F

from torch import Tensor
from transformers import AutoTokenizer, AutoModel


def last_token_pool(last_hidden_states: Tensor,
                 attention_mask: Tensor) -> Tensor:
    left_padding = (attention_mask[:, -1].sum() == attention_mask.shape[0])
    if left_padding:
        return last_hidden_states[:, -1]
    else:
        sequence_lengths = attention_mask.sum(dim=1) - 1
        batch_size = last_hidden_states.shape[0]
        return last_hidden_states[torch.arange(batch_size, device=last_hidden_states.device), sequence_lengths]


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, 'summit define')
]
# 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.",
    "Definition of summit for English Language Learners. : 1  the highest point of a mountain : the top of a mountain. : 2  the highest level. : 3  a meeting or series of meetings between the leaders of two or more governments."
]
input_texts = queries + documents

tokenizer = AutoTokenizer.from_pretrained('intfloat/e5-mistral-7b-instruct')
model = AutoModel.from_pretrained('intfloat/e5-mistral-7b-instruct')

max_length = 4096
# Tokenize the input texts
batch_dict = tokenizer(input_texts, max_length=max_length, padding=True, truncation=True, return_tensors='pt')

outputs = model(**batch_dict)
embeddings = last_token_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 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:

@article{wang2023improving,
  title={Improving Text Embeddings with Large Language Models},
  author={Wang, Liang and Yang, Nan and Huang, Xiaolong and Yang, Linjun and Majumder, Rangan and Wei, Furu},
  journal={arXiv preprint arXiv:2401.00368},
  year={2023}
}

@article{wang2022text,
  title={Text Embeddings by Weakly-Supervised Contrastive Pre-training},
  author={Wang, Liang and Yang, Nan and Huang, Xiaolong and Jiao, Binxing and Yang, Linjun and Jiang, Daxin and Majumder, Rangan and Wei, Furu},
  journal={arXiv preprint arXiv:2212.03533},
  year={2022}
}

Limitations#

Using this model for inputs longer than 4096 tokens is not recommended.

This model's multilingual capability is still inferior to multilingual-e5-large for some cases.

Files

21 files · 28.6 GBWeights 14.2 GB (safetensors). Sizes and sha256 from the signed manifest.
Show all 21 files with their sha256
FileSizesha256
.eval_results/ArguAna.yaml575 Bd2ca95ee9cfc8469cef35ba66c2420f6d515defa18badeea43c1c73e10182049
.gitattributes1.52 KB11ad7efa24975ee4b0c3c3a38ed18737f0658a5f75a0a96787b576a78a023361
1_Pooling/config.json297 B164747a384fd802c55f6091ddd29fe6451998bf6c0c979af8fe10f8d528be146
README.md178 KBb7d281627ee7bf6a1b784a976c59dbffb3baddd0945309684a2bc3d6dc70f1bd
added_tokens.json42 Bd606246b713e31b1b43dfe913554dd47819089b9e44b9ebaa294eda2589a6b4c
config.json629 Bbfa2364116ee2abb1a9706e8702f09a48d013eed3c321ec4a905497a50dcee00
config_sentence_transformers.json557 B556401868279abb4e0e563726e0bbadf0d1164a169ddccab332f5d2f0ce9b3e9
lora/adapter_config.json533 Bcd67511bd88318bc702d52841ce12e0aa1b3eae649dcd76769a6a658a10bfb82
lora/adapter_model.bin168 MB392e207aa4cf17c50ac8f2f50d6ffc6241f8aca5cb2bbdc9611e6786b37ad4cd
model-00001-of-00002.safetensors9.94 GBe64034d49db4a20999bf89f01d0532e30a1f91455632c942f6a70633b1003319
model-00002-of-00002.safetensors4.28 GBeb61a47325ced7639d02d8ab1b8ca94e6e5efc83c87ba90888ac01801757cbf0
model.safetensors.index.json23.3 KBea064453dff10569279cc9bc862f726dbade27ae9050bb0a160261b03c2a153e
modules.json349 B84e40c8e006c9b1d6c122e02cba9b02458120b5fb0c87b746c41e0207cf642cf
pytorch_model-00001-of-00002.bin9.94 GBdb75942d7777c9bbae5eb1bc7f712d099875e6d6bbccb8522b91b2782977ce52
pytorch_model-00002-of-00002.bin4.28 GB143df9048bac75b444ff6faba463220a7d109630ffdffd8bc90ac6f3ba5ddc0a
pytorch_model.bin.index.json22.2 KB62c26da9490cfe68688eda8b6954ea25923f09402a1f74bc1f6a11c41bbc05d6
sentence_bert_config.json55 B1140b92d307aec9383d897169c9f489f3a568787b80bf760f5d7cc9d25169a65
special_tokens_map.json168 B9921edfd5322dd354ec44f825329e1c6c6b89b357bf3ce49377be325b23eaa34
tokenizer.json1.80 MBfc4f0bd70b3709312d9d1d9e5ba674794b6bc5abc17429897a540f93882f25fc
tokenizer.model493 KBdadfd56d766715c61d2ef780a525ab43b8e6da4de6865bda3d95fdef5e134055
tokenizer_config.json981 B66349eabf13ba871e41d17be5168d1871773ec2eba580172107e300879d7a6a7
VersionsEach time the pinned upstream commit or file list changed in this repo. Newest first.
Upstream commitDateContents
d62cc4417b pinned now manifest updated, same commit2026-11-14 21:09 UTC21 files · 28.6 GB
d62cc4417b2026-11-14 21:09 UTC21 files · 28.6 GB

Use it

$ fw get intfloat/e5-mistral-7b-instruct
# manifest sha256 06ab8fab66ca… · 28.6 GB · 21 files
$ fw verify ./e5-mistral-7b-instruct intfloat/e5-mistral-7b-instruct
fw.pyChecks the signature and every sha256, tries each source in order, resumes.
$ python3 fw.py get https://freeweights.allternit.com/manifests/intfloat/e5-mistral-7b-instruct.json --dir ./e5-mistral-7b-instruct $ python3 fw.py verify ./e5-mistral-7b-instruct ./intfloat__e5-mistral-7b-instruct.json
hfThe Hugging Face CLI with one setting. Same repo id.
$ HF_ENDPOINT=https://freeweights.allternit.com hf download intfloat/e5-mistral-7b-instruct --revision d62cc4417be0e3289c03dd459d1ef2d137e2554e --local-dir ./e5-mistral-7b-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/e5-mistral-7b-instruct", revision="d62cc4417be0e3289c03dd459d1ef2d137e2554e") model = AutoModel.from_pretrained("intfloat/e5-mistral-7b-instruct", revision="d62cc4417be0e3289c03dd459d1ef2d137e2554e", 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/e5-mistral-7b-instruct", revision="d62cc4417be0e3289c03dd459d1ef2d137e2554e") 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
b7d281627ee7bf6a1b784a976c59dbffb3baddd0945309684a2bc3d6dc70f1bd
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: e5-mistral-7b-instructDate: 2026-11-14Commit: d62cc44Signed: 2DC28CC7B26A283B ✓
Upstream
intfloat/e5-mistral-7b-instruct
Pinned commit
d62cc4417be0e3289c03dd459d1ef2d137e2554e
Manifest
e5-mistral-7b-instruct.json · .minisig
Manifest sha256
06ab8fab66ca7c47bed1ea5407b680054aeb961caa49feac0ff4952fa5aa5754
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/e5-mistral-7b-instruct.json $ curl -O https://freeweights.allternit.com/manifests/intfloat/e5-mistral-7b-instruct.json.minisig $ minisign -Vm e5-mistral-7b-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/e5-mistral-7b-instruct
Open in Freeweights Studio

Pull, verify and run it in the Allternit app on Desktop, web or phone.

Signed manifest
minisign, key 2DC28CC7B26A283B. e5-mistral-7b-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