SAVRN
Search Contact SAVRN

Open-weight model · Feature extraction

e5-mistral-7b-instruct-bnb-4bit

by Gábor Hosu gabor-hosu/e5-mistral-7b-instruct-bnb-4bit

This model is a quantized version of the original model intfloat/e5-mistral-7b-instruct. It's quantized using the BitsAndBytes library to 4-bit using the bnb-my-repo space.

Parameters7.3B
Context32,768
Weights3.9 GB
Licensemit
AccessOpen weights
Monthly Downloads1M

Runs On

What it takes to serve e5-mistral-7b-instruct-bnb-4bit (7.3B parameters): the memory its weights need at each precision, and the cheapest way to rent enough data-center GPUs to hold them.

PrecisionWeightsMemory neededCheapest setupPer hourAlso fits
16-bit 14.7 GB 17.6 GB 1x MI300X (192 GB)
Vultr
$1.85 1x H100 $1.99 · 1x MI325X $2.00
8-bit 7.3 GB 8.8 GB 1x MI300X (192 GB)
Vultr
$1.85 1x H100 $1.99 · 1x MI325X $2.00
4-bit 3.7 GB 4.4 GB 1x MI300X (192 GB)
Vultr
$1.85 1x H100 $1.99 · 1x MI325X $2.00

Memory is the weights at that precision plus 20% for the runtime and a short context; a long context needs more. Prices are the lowest on-demand hourly rates in the SAVRN Index, read Sep 18, 2026.

Model Card

By Gábor Hosu, published under mit, revision 0c0818ccf8b4.

This model is a quantized version of the original model intfloat/e5-mistral-7b-instruct. It's quantized using the BitsAndBytes library to 4-bit using the bnb-my-repo space. - bnb4bitquanttype: nf4 - bnb4bitusedoublequant: True - bnb4bitcomputedtype: bfloat16 - bnb4bitquantstorage: uint8 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. Below is an example to encode queries and passages from the MS-MARCO passage ranking dataset. Have a look at configsentencetransformers.json for the prompts that are pre-configured, such as websearchquery…

Read Gábor Hosu's full model card

intfloat/e5-mistral-7b-instruct (Quantized)

Description

This model is a quantized version of the original model intfloat/e5-mistral-7b-instruct.

It's quantized using the BitsAndBytes library to 4-bit using the bnb-my-repo space.

Quantization Details

  • Quantization Type: int4
  • bnb_4bit_quant_type: nf4
  • bnb_4bit_use_double_quant: True
  • bnb_4bit_compute_dtype: bfloat16
  • bnb_4bit_quant_storage: uint8

Original Model Information

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.

Configuration

Architecture
MistralModel
Context length (tokens)
32,768
Layers
32
Hidden size
4,096
Feed-forward size
14,336
Attention heads
32
Key/value heads
8
Vocabulary size
32,000
Sliding window (tokens)
4,096
RoPE base
10000
Stored precision
float16
Model type
mistral
Quantization
bitsandbytes

Identity and Version

Repository
gabor-hosu/e5-mistral-7b-instruct-bnb-4bit
Publisher
Gábor Hosu
Task
Feature extraction
Modality
Text
Library
sentence-transformers
Parameters
7.3B parameters
Languages
en
Revision
0c0818ccf8b430b69e8beb8a7f67f7f0f7940fe7
First published
2026-01-09
Last updated
2026-01-09

Files and Weights

7 files, 3.9 GB in total. The weights are 1 file totalling 3.9 GB in safetensors.

Weights1 file · 3.9 GB
Configuration2 files · 1.7 KB
Tokenizer2 files · 3.5 MB
Documentation1 file · 178.5 KB
Repository1 file · 1.5 KB
Every file
FileTypeSizeSHA-256
model.safetensorsWeights3.9 GB ba6537b894fd
config.jsonConfiguration1.1 KB
special_tokens_map.jsonConfiguration624 B
README.mdDocumentation178.5 KB
.gitattributesRepository1.5 KB
tokenizer.jsonTokenizer3.5 MB
tokenizer_config.jsonTokenizer1.1 KB

License and Download

License
mit
Access
Open weights, no gate
Download size
3.9 GB
Download from Gábor Hosu

Released by Gábor Hosu through its official repository on Hugging Face. Read the license.

Built From

Evaluations

Each result is shown as reported, with the conditions its reporter stated. None is a SAVRN measurement. A comparison lines two results up only when their configuration, unit and setup are all stated and identical.

BenchmarkConditionsResultReported byRevisionDate
MTEB AFQMC Configuration defaultTask STSMetric cos_sim_pearsonComparison conditions not established 37.8632 gabor-hosu
Publisher reported
Evaluated revision not stated
MTEB AFQMC Configuration defaultTask STSMetric cos_sim_spearmanComparison conditions not established 38.9873 gabor-hosu
Publisher reported
Evaluated revision not stated
MTEB AFQMC Configuration defaultTask STSMetric euclidean_pearsonComparison conditions not established 37.5178 gabor-hosu
Publisher reported
Evaluated revision not stated
MTEB AFQMC Configuration defaultTask STSMetric euclidean_spearmanComparison conditions not established 38.9873 gabor-hosu
Publisher reported
Evaluated revision not stated
MTEB AFQMC Configuration defaultTask STSMetric manhattan_pearsonComparison conditions not established 37.2671 gabor-hosu
Publisher reported
Evaluated revision not stated
MTEB AFQMC Configuration defaultTask STSMetric manhattan_spearmanComparison conditions not established 38.7098 gabor-hosu
Publisher reported
Evaluated revision not stated
MTEB ATEC Configuration defaultTask STSMetric cos_sim_pearsonComparison conditions not established 43.3392 gabor-hosu
Publisher reported
Evaluated revision not stated
MTEB ATEC Configuration defaultTask STSMetric cos_sim_spearmanComparison conditions not established 42.8432 gabor-hosu
Publisher reported
Evaluated revision not stated
MTEB ATEC Configuration defaultTask STSMetric euclidean_pearsonComparison conditions not established 45.6271 gabor-hosu
Publisher reported
Evaluated revision not stated
MTEB ATEC Configuration defaultTask STSMetric euclidean_spearmanComparison conditions not established 42.8432 gabor-hosu
Publisher reported
Evaluated revision not stated
MTEB ATEC Configuration defaultTask STSMetric manhattan_pearsonComparison conditions not established 45.4787 gabor-hosu
Publisher reported
Evaluated revision not stated
MTEB ATEC Configuration defaultTask STSMetric manhattan_spearmanComparison conditions not established 42.6573 gabor-hosu
Publisher reported
Evaluated revision not stated
MTEB AmazonCounterfactualClassification (de) Configuration deTask ClassificationMetric accuracyComparison conditions not established 74.0471 gabor-hosu
Publisher reported
Evaluated revision not stated
MTEB AmazonCounterfactualClassification (de) Configuration deTask ClassificationMetric apComparison conditions not established 83.4262 gabor-hosu
Publisher reported
Evaluated revision not stated
MTEB AmazonCounterfactualClassification (de) Configuration deTask ClassificationMetric f1Comparison conditions not established 72.1439 gabor-hosu
Publisher reported
Evaluated revision not stated
MTEB AmazonCounterfactualClassification (en) Configuration enTask ClassificationMetric accuracyComparison conditions not established 78.6866 gabor-hosu
Publisher reported
Evaluated revision not stated
MTEB AmazonCounterfactualClassification (en) Configuration enTask ClassificationMetric apComparison conditions not established 41.7152 gabor-hosu
Publisher reported
Evaluated revision not stated
MTEB AmazonCounterfactualClassification (en) Configuration enTask ClassificationMetric f1Comparison conditions not established 72.3721 gabor-hosu
Publisher reported
Evaluated revision not stated
MTEB AmazonCounterfactualClassification (en-ext) Configuration en-extTask ClassificationMetric accuracyComparison conditions not established 77.931 gabor-hosu
Publisher reported
Evaluated revision not stated
MTEB AmazonCounterfactualClassification (en-ext) Configuration en-extTask ClassificationMetric apComparison conditions not established 26.0393 gabor-hosu
Publisher reported
Evaluated revision not stated
MTEB AmazonCounterfactualClassification (en-ext) Configuration en-extTask ClassificationMetric f1Comparison conditions not established 64.8109 gabor-hosu
Publisher reported
Evaluated revision not stated
MTEB AmazonCounterfactualClassification (ja) Configuration jaTask ClassificationMetric accuracyComparison conditions not established 77.2163 gabor-hosu
Publisher reported
Evaluated revision not stated
MTEB AmazonCounterfactualClassification (ja) Configuration jaTask ClassificationMetric apComparison conditions not established 24.8765 gabor-hosu
Publisher reported
Evaluated revision not stated
MTEB AmazonCounterfactualClassification (ja) Configuration jaTask ClassificationMetric f1Comparison conditions not established 63.8773 gabor-hosu
Publisher reported
Evaluated revision not stated
MTEB AmazonPolarityClassification Configuration defaultTask ClassificationMetric accuracyComparison conditions not established 95.9068 gabor-hosu
Publisher reported
Evaluated revision not stated
MTEB AmazonPolarityClassification Configuration defaultTask ClassificationMetric apComparison conditions not established 94.3236 gabor-hosu
Publisher reported
Evaluated revision not stated
MTEB AmazonPolarityClassification Configuration defaultTask ClassificationMetric f1Comparison conditions not established 95.9049 gabor-hosu
Publisher reported
Evaluated revision not stated
MTEB AmazonReviewsClassification (de) Configuration deTask ClassificationMetric accuracyComparison conditions not established 53.26 gabor-hosu
Publisher reported
Evaluated revision not stated
MTEB AmazonReviewsClassification (de) Configuration deTask ClassificationMetric f1Comparison conditions not established 52.1562 gabor-hosu
Publisher reported
Evaluated revision not stated
MTEB AmazonReviewsClassification (en) Configuration enTask ClassificationMetric accuracyComparison conditions not established 55.786 gabor-hosu
Publisher reported
Evaluated revision not stated
MTEB AmazonReviewsClassification (en) Configuration enTask ClassificationMetric f1Comparison conditions not established 55.3121 gabor-hosu
Publisher reported
Evaluated revision not stated
MTEB AmazonReviewsClassification (es) Configuration esTask ClassificationMetric accuracyComparison conditions not established 50.33 gabor-hosu
Publisher reported
Evaluated revision not stated
MTEB AmazonReviewsClassification (es) Configuration esTask ClassificationMetric f1Comparison conditions not established 49.195 gabor-hosu
Publisher reported
Evaluated revision not stated
MTEB AmazonReviewsClassification (fr) Configuration frTask ClassificationMetric accuracyComparison conditions not established 49.3 gabor-hosu
Publisher reported
Evaluated revision not stated
MTEB AmazonReviewsClassification (fr) Configuration frTask ClassificationMetric f1Comparison conditions not established 48.4345 gabor-hosu
Publisher reported
Evaluated revision not stated
MTEB AmazonReviewsClassification (ja) Configuration jaTask ClassificationMetric accuracyComparison conditions not established 48.686 gabor-hosu
Publisher reported
Evaluated revision not stated
MTEB AmazonReviewsClassification (ja) Configuration jaTask ClassificationMetric f1Comparison conditions not established 47.6268 gabor-hosu
Publisher reported
Evaluated revision not stated
MTEB AmazonReviewsClassification (zh) Configuration zhTask ClassificationMetric accuracyComparison conditions not established 46.238 gabor-hosu
Publisher reported
Evaluated revision not stated
MTEB AmazonReviewsClassification (zh) Configuration zhTask ClassificationMetric f1Comparison conditions not established 45.014 gabor-hosu
Publisher reported
Evaluated revision not stated
MTEB ArguAna Configuration defaultTask RetrievalMetric map_at_1Comparison conditions not established 36.486 gabor-hosu
Publisher reported
Evaluated revision not stated

Memory Requirements

PrecisionWeights in memory
As published3.9 GB
16-bit14.7 GB
8-bit7.3 GB
4-bit3.7 GB

Weights only, from the published parameter count; the key-value cache and runtime add to this.

Questions About e5-mistral-7b-instruct-bnb-4bit

How much GPU memory does e5-mistral-7b-instruct-bnb-4bit need?

About 17.6 GB at 16-bit and 4.4 GB at 4-bit: the weights (7.3B parameters) plus a working margin. A long context needs more.

What is the cheapest GPU to run e5-mistral-7b-instruct-bnb-4bit on?

At 16-bit, 1x MI300X from $1.85 an hour; at 4-bit, 1x MI300X from $1.85 an hour, at the lowest on-demand prices the SAVRN Index lists.

Can I use e5-mistral-7b-instruct-bnb-4bit commercially?

Yes. e5-mistral-7b-instruct-bnb-4bit is released under MIT License. The MIT License is a short permissive license. It permits commercial use, modification and redistribution, provided the copyright notice and permission notice are included.

What is e5-mistral-7b-instruct-bnb-4bit's context length?

32,768 tokens, from the maximum position embeddings in its published configuration.

Similar Models

Model · Feature extraction

Qwen3-Embedding-8B

Qwen

The Qwen3 Embedding model series is the latest proprietary model of the Qwen family, specifically designed for text embedding and ranking tasks. Building upon the dense foundational models of the Qwen3 series, it provides a comprehensive range of text embeddings and reranking models in various sizes (0.6B, 4B, and 8B). This series inherits the exceptional multilingual capabilities, long-text understanding, and reasoning skills of its foundational model. The Qwen3 Embedding series represents significant advancements in multiple text embedding and ranking tasks, including text retrieval, code retrieval, text classification, text clustering, and bitext mining. Exceptional Versatility: The…

Open weights apache-2.0 7.6B parameters 40,960 tokens sentence-transformers

Model · Feature extraction

Qwen3-Embedding-4B-W4A16-G128

Mou Geren

GPTQ Quantized Qwen/Qwen3-Embedding-4B with THUIR/T2Ranking and m-a-p/COIG-CQIA for calibration set. ~0.72% lost in C-MTEB. Evaluation performed with official code. pip install compressed-tensors optimum and auto-gptq / gptqmodel, then goto the official usage guide.

Open weights apache-2.0 4.1B parameters 40,960 tokens sentence-transformers

Model · Feature extraction

Qwen3-Embedding-4B

Qwen

The Qwen3 Embedding model series is the latest proprietary model of the Qwen family, specifically designed for text embedding and ranking tasks. Building upon the dense foundational models of the Qwen3 series, it provides a comprehensive range of text embeddings and reranking models in various sizes (0.6B, 4B, and 8B). This series inherits the exceptional multilingual capabilities, long-text understanding, and reasoning skills of its foundational model. The Qwen3 Embedding series represents significant advancements in multiple text embedding and ranking tasks, including text retrieval, code retrieval, text classification, text clustering, and bitext mining. Exceptional Versatility: The…

Open weights apache-2.0 4B parameters 40,960 tokens sentence-transformers

Model · Feature extraction

tiny-audio-granite-qwen

Alex Kroman

This is the model card of a transformers model that has been pushed on the Hub. Users (both direct and downstream) should be made aware of the risks, biases and limitations of the model. Use the code below to get started with the model. Carbon emissions can be estimated using the Machine Learning Impact calculator presented in Lacoste et al. (2019).

Open weights 1.9B parameters transformers

Model · Feature extraction

Vela-1.0-Omni-Mini

vLLM Semantic Router

Vela Omni Mini maps text, images, and speech into a shared embedding space for multimodal search, routing, and use a 0–100 scale; higher is better. All applicable models use the same examples and retrieval pools. N/A denotes a modality the text-only model does not support. Bold Vela scores improve on multi-modal-embed-large. Macro-F1 gives equal weight to every intent class (77 for Banking77 and 60 for MASSIVE), complementing the query-weighted accuracy; undefined class F1 is zero. Text evaluation uses fixed class prototypes: 3,080 Banking77 and 2,972 MASSIVE English queries. Vela Omni is adapted using training examples and intent labels from these two datasets; comparison models are…

Open weights apache-2.0 1B parameters pytorch

Model · Feature extraction

Qwen3-Embedding-0.6B

Qwen

The Qwen3 Embedding model series is the latest proprietary model of the Qwen family, specifically designed for text embedding and ranking tasks. Building upon the dense foundational models of the Qwen3 series, it provides a comprehensive range of text embeddings and reranking models in various sizes (0.6B, 4B, and 8B). This series inherits the exceptional multilingual capabilities, long-text understanding, and reasoning skills of its foundational model. The Qwen3 Embedding series represents significant advancements in multiple text embedding and ranking tasks, including text retrieval, code retrieval, text classification, text clustering, and bitext mining. Exceptional Versatility: The…

Open weights apache-2.0 596M parameters 32,768 tokens sentence-transformers