News (May 2023): please switch to e5-base-v2, which has better performance and same method of usage. Liang Wang, Nan Yang, Xiaolong Huang, Binxing Jiao, Linjun Yang, Daxin Jiang, Rangan Majumder, Furu Wei, arXiv 2022 This model has 12 layers and the embedding size is 768. Below is an example to encode queries and passages from the MS-MARCO passage ranking dataset. Please refer to our paper at https://arxiv.org/pdf/2212.03533.pdf. Check out unilm/e5 to reproduce evaluation results on the BEIR and MTEB benchmark. Below is an example for usage with sentencetransformers. Package requirements pip install sentencetransformers~=2.2.2 1. Do I need to add the prefix "query: " and "passage: " to…
Liang Wang, Nan Yang, Xiaolong Huang, Binxing Jiao, Linjun Yang, Daxin Jiang, Rangan Majumder, Furu Wei, arXiv 2022 This model has 12 layers and the embedding size is 768.
Runs On
What it takes to serve e5-base-v2 (109M parameters): the memory its weights need at each precision, and the cheapest way to rent enough data-center GPUs to hold them.
| Precision | Weights | Memory needed | Cheapest setup | Per hour | Also fits |
|---|---|---|---|---|---|
| 16-bit | 0.2 GB | 0.3 GB | 1x MI300X (192 GB) Vultr |
$1.85 | 1x H100 $1.99 · 1x MI325X $2.00 |
| 8-bit | 0.1 GB | 0.1 GB | 1x MI300X (192 GB) Vultr |
$1.85 | 1x H100 $1.99 · 1x MI325X $2.00 |
| 4-bit | 0.1 GB | 0.1 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.
SAVRN's Notes on e5-base-v2
Every passage this embedding model sees is capped at 512 tokens, so chunking comes before hardware. Liang Wang published it as a 109 million parameter BertModel with 12 layers and a 768-wide embedding, built for sentence similarity; it runs in 0.3 GB of memory at 16-bit and 0.1 GB at 8-bit. The cheapest setup on our Index is one MI300X with 192 GB at $1.85 per hour, so the card is bought for throughput, not weights. The 2.19 GB download across 24 files carries four formats, safetensors, ONNX, OpenVINO and PyTorch, so load one.
MIT terms allow commercial use, modification and redistribution with the notices kept, so an index built on it can ship inside a product. Note that the benchmark results in the file are publisher reported, such as 92.81 accuracy on MTEB AmazonPolarityClassification, and the method sits in arXiv:2212.03533; test retrieval on your own corpus.
Model Card
By Liang Wang, published under mit, revision f52bf8ec8c71.
Text Embeddings by Weakly-Supervised Contrastive Pre-training. Liang Wang, Nan Yang, Xiaolong Huang, Binxing Jiao, Linjun Yang, Daxin Jiang, Rangan Majumder, Furu Wei, arXiv 2022
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.
Configuration
- Architecture
- BertModel
- Context length (tokens)
- 512
- Layers
- 12
- Hidden size
- 768
- Feed-forward size
- 3,072
- Attention heads
- 12
- Vocabulary size
- 30,522
- Stored precision
- float32
- Model type
- bert
Identity and Version
- Repository
- intfloat/e5-base-v2
- Publisher
- Liang Wang
- Task
- Sentence similarity
- Modality
- Text
- Library
- sentence-transformers
- Parameters
- 109M parameters
- Languages
- en
- Revision
- f52bf8ec8c7124536f0efb74aca902b2995e5bcd
- First published
- 2023-05-19
- Last updated
- 2025-02-17
Files and Weights
24 files, 2.2 GB in total. The weights are 7 files totalling 2.2 GB in bin, onnx, safetensors.
Every file
| File | Type | Size | SHA-256 |
|---|---|---|---|
| model.safetensors | Weights | 438.0 MB | d0d559c47d5f |
| onnx/model.onnx | Weights | 435.8 MB | 157f97ef1957 |
| onnx/model_O4.onnx | Weights | 217.8 MB | af23dd830162 |
| onnx/model_qint8_avx512_vnni.onnx | Weights | 110.1 MB | f2ff55f62dfc |
| openvino/openvino_model.bin | Weights | 435.6 MB | 813bf62987ce |
| openvino/openvino_model_qint8_quantized.bin | Weights | 110.0 MB | 2d6045bf41cd |
| pytorch_model.bin | Weights | 438.0 MB | 5b119cd34c66 |
| 1_Pooling/config.json | Configuration | 200 B | — |
| config.json | Configuration | 650 B | — |
| modules.json | Configuration | 387 B | — |
| onnx/config.json | Configuration | 632 B | — |
| onnx/special_tokens_map.json | Configuration | 125 B | — |
| sentence_bert_config.json | Configuration | 57 B | — |
| special_tokens_map.json | Configuration | 125 B | — |
| README.md | Documentation | 67.6 KB | — |
| openvino/openvino_model.xml | Other | 363.1 KB | — |
| openvino/openvino_model_qint8_quantized.xml | Other | 663.8 KB | — |
| .gitattributes | Repository | 1.5 KB | — |
| onnx/tokenizer.json | Tokenizer | 711.4 KB | — |
| onnx/tokenizer_config.json | Tokenizer | 314 B | — |
| onnx/vocab.txt | Tokenizer | 231.5 KB | — |
| tokenizer.json | Tokenizer | 711.4 KB | — |
| tokenizer_config.json | Tokenizer | 314 B | — |
| vocab.txt | Tokenizer | 231.5 KB | — |
License and Download
- License
- mit
- Access
- Open weights, no gate
- Download size
- 2.2 GB
Released by Liang Wang through its official repository on Hugging Face. Read the license.
Built From
- Described by arXiv:2104.08663
- Described by arXiv:2210.07316
- Described by arXiv:2212.03533
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.
| Benchmark | Conditions | Result | Reported by | Revision | Date |
|---|---|---|---|---|---|
| MTEB AmazonCounterfactualClassification (en) | Configuration enTask ClassificationMetric accuracyComparison conditions not established | 77.7761 | intfloat Publisher reported |
Evaluated revision not stated | — |
| MTEB AmazonCounterfactualClassification (en) | Configuration enTask ClassificationMetric apComparison conditions not established | 42.0527 | intfloat Publisher reported |
Evaluated revision not stated | — |
| MTEB AmazonCounterfactualClassification (en) | Configuration enTask ClassificationMetric f1Comparison conditions not established | 72.1204 | intfloat Publisher reported |
Evaluated revision not stated | — |
| MTEB AmazonPolarityClassification | Configuration defaultTask ClassificationMetric accuracyComparison conditions not established | 92.8101 | intfloat Publisher reported |
Evaluated revision not stated | — |
| MTEB AmazonPolarityClassification | Configuration defaultTask ClassificationMetric apComparison conditions not established | 89.4214 | intfloat Publisher reported |
Evaluated revision not stated | — |
| MTEB AmazonPolarityClassification | Configuration defaultTask ClassificationMetric f1Comparison conditions not established | 92.8039 | intfloat Publisher reported |
Evaluated revision not stated | — |
| MTEB AmazonReviewsClassification (en) | Configuration enTask ClassificationMetric accuracyComparison conditions not established | 46.712 | intfloat Publisher reported |
Evaluated revision not stated | — |
| MTEB AmazonReviewsClassification (en) | Configuration enTask ClassificationMetric f1Comparison conditions not established | 46.1154 | intfloat Publisher reported |
Evaluated revision not stated | — |
| MTEB ArguAna | Configuration defaultTask RetrievalMetric map_at_1Comparison conditions not established | 23.186 | intfloat Publisher reported |
Evaluated revision not stated | — |
| MTEB ArguAna | Configuration defaultTask RetrievalMetric map_at_10Comparison conditions not established | 36.633 | intfloat Publisher reported |
Evaluated revision not stated | — |
| MTEB ArguAna | Configuration defaultTask RetrievalMetric map_at_100Comparison conditions not established | 37.842 | intfloat Publisher reported |
Evaluated revision not stated | — |
| MTEB ArguAna | Configuration defaultTask RetrievalMetric map_at_1000Comparison conditions not established | 37.865 | intfloat Publisher reported |
Evaluated revision not stated | — |
| MTEB ArguAna | Configuration defaultTask RetrievalMetric map_at_3Comparison conditions not established | 32.278 | intfloat Publisher reported |
Evaluated revision not stated | — |
| MTEB ArguAna | Configuration defaultTask RetrievalMetric map_at_5Comparison conditions not established | 34.761 | intfloat Publisher reported |
Evaluated revision not stated | — |
| MTEB ArguAna | Configuration defaultTask RetrievalMetric mrr_at_1Comparison conditions not established | 23.4 | intfloat Publisher reported |
Evaluated revision not stated | — |
| MTEB ArguAna | Configuration defaultTask RetrievalMetric mrr_at_10Comparison conditions not established | 36.721 | intfloat Publisher reported |
Evaluated revision not stated | — |
| MTEB ArguAna | Configuration defaultTask RetrievalMetric mrr_at_100Comparison conditions not established | 37.937 | intfloat Publisher reported |
Evaluated revision not stated | — |
| MTEB ArguAna | Configuration defaultTask RetrievalMetric mrr_at_1000Comparison conditions not established | 37.96 | intfloat Publisher reported |
Evaluated revision not stated | — |
| MTEB ArguAna | Configuration defaultTask RetrievalMetric mrr_at_3Comparison conditions not established | 32.302 | intfloat Publisher reported |
Evaluated revision not stated | — |
| MTEB ArguAna | Configuration defaultTask RetrievalMetric mrr_at_5Comparison conditions not established | 34.894 | intfloat Publisher reported |
Evaluated revision not stated | — |
| MTEB ArguAna | Configuration defaultTask RetrievalMetric ndcg_at_1Comparison conditions not established | 23.186 | intfloat Publisher reported |
Evaluated revision not stated | — |
| MTEB ArguAna | Configuration defaultTask RetrievalMetric ndcg_at_10Comparison conditions not established | 44.49 | intfloat Publisher reported |
Evaluated revision not stated | — |
| MTEB ArguAna | Configuration defaultTask RetrievalMetric ndcg_at_100Comparison conditions not established | 50.065 | intfloat Publisher reported |
Evaluated revision not stated | — |
| MTEB ArguAna | Configuration defaultTask RetrievalMetric ndcg_at_1000Comparison conditions not established | 50.63 | intfloat Publisher reported |
Evaluated revision not stated | — |
| MTEB ArguAna | Configuration defaultTask RetrievalMetric ndcg_at_3Comparison conditions not established | 35.461 | intfloat Publisher reported |
Evaluated revision not stated | — |
| MTEB ArguAna | Configuration defaultTask RetrievalMetric ndcg_at_5Comparison conditions not established | 39.969 | intfloat Publisher reported |
Evaluated revision not stated | — |
| MTEB ArguAna | Configuration defaultTask RetrievalMetric precision_at_1Comparison conditions not established | 23.186 | intfloat Publisher reported |
Evaluated revision not stated | — |
| MTEB ArguAna | Configuration defaultTask RetrievalMetric precision_at_10Comparison conditions not established | 6.97 | intfloat Publisher reported |
Evaluated revision not stated | — |
| MTEB ArguAna | Configuration defaultTask RetrievalMetric precision_at_100Comparison conditions not established | 0.951 | intfloat Publisher reported |
Evaluated revision not stated | — |
| MTEB ArguAna | Configuration defaultTask RetrievalMetric precision_at_1000Comparison conditions not established | 0.099 | intfloat Publisher reported |
Evaluated revision not stated | — |
| MTEB ArguAna | Configuration defaultTask RetrievalMetric precision_at_3Comparison conditions not established | 14.912 | intfloat Publisher reported |
Evaluated revision not stated | — |
| MTEB ArguAna | Configuration defaultTask RetrievalMetric precision_at_5Comparison conditions not established | 11.152 | intfloat Publisher reported |
Evaluated revision not stated | — |
| MTEB ArguAna | Configuration defaultTask RetrievalMetric recall_at_1Comparison conditions not established | 23.186 | intfloat Publisher reported |
Evaluated revision not stated | — |
| MTEB ArguAna | Configuration defaultTask RetrievalMetric recall_at_10Comparison conditions not established | 69.701 | intfloat Publisher reported |
Evaluated revision not stated | — |
| MTEB ArguAna | Configuration defaultTask RetrievalMetric recall_at_100Comparison conditions not established | 95.092 | intfloat Publisher reported |
Evaluated revision not stated | — |
| MTEB ArguAna | Configuration defaultTask RetrievalMetric recall_at_1000Comparison conditions not established | 99.431 | intfloat Publisher reported |
Evaluated revision not stated | — |
| MTEB ArguAna | Configuration defaultTask RetrievalMetric recall_at_3Comparison conditions not established | 44.737 | intfloat Publisher reported |
Evaluated revision not stated | — |
| MTEB ArguAna | Configuration defaultTask RetrievalMetric recall_at_5Comparison conditions not established | 55.761 | intfloat Publisher reported |
Evaluated revision not stated | — |
| MTEB ArxivClusteringP2P | Configuration defaultTask ClusteringMetric v_measureComparison conditions not established | 46.1031 | intfloat Publisher reported |
Evaluated revision not stated | — |
| MTEB ArxivClusteringS2S | Configuration defaultTask ClusteringMetric v_measureComparison conditions not established | 39.6728 | intfloat Publisher reported |
Evaluated revision not stated | — |
Memory Requirements
| Precision | Weights in memory |
|---|---|
| As published | 2.2 GB |
| 16-bit | 0.2 GB |
| 8-bit | 0.1 GB |
| 4-bit | 0.1 GB |
Weights only, from the published parameter count; the key-value cache and runtime add to this.
Compare e5-base-v2
Questions About e5-base-v2
How much GPU memory does e5-base-v2 need?
About 0.3 GB at 16-bit and 0.1 GB at 4-bit: the weights (109M parameters) plus a working margin. A long context needs more.
What is the cheapest GPU to run e5-base-v2 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-base-v2 commercially?
Yes. e5-base-v2 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-base-v2's context length?
512 tokens, from the maximum position embeddings in its published configuration.
Similar Models
This is a sentence-transformers model finetuned from BAAI/bge-base-en-v1.5. It maps sentences & paragraphs to a 768-dimensional dense vector space and can be used for semantic textual similarity, semantic search, paraphrase mining, text classification, clustering, and more. First install the Sentence Transformers library: Then you can load this model and run inference. Approximate statistics based on the first 45 samples: Approximate statistics based on the first 5 samples: - evalstrategy: steps - perdevicetrainbatchsize: 16 - perdeviceevalbatchsize: 16 - learningrate: 3e-06 - maxsteps: 24 - warmupratio: 0.1 - batchsampler: noduplicates - overwriteoutputdir: False - dopredict: False…
This is a PubMedBERT-base model fined-tuned using sentence-transformers. It maps sentences & paragraphs to a 768 dimensional dense vector space and can be used for tasks like clustering or semantic search. The training dataset was generated using a random sample of PubMed title-abstract pairs along with similar title pairs. PubMedBERT Embeddings produces higher quality embeddings than generalized models for medical literature. Further fine-tuning for a medical subdomain will result in even better performance. This model can be used to build embeddings databases with txtai for semantic search and/or as a knowledge source for retrieval augmented generation (RAG). Alternatively, the model can…
This is a LinkTransformer model. At its core this model this is a sentence transformer model sentence-transformers model- it just wraps around the class. It is designed for quick and easy record linkage (entity-matching) through the LinkTransformer package. The tasks include clustering, deduplication, linking, aggregation and more. Notwithstanding that, it can be used for any sentence similarity task within the sentence-transformers framework as well. It maps sentences & paragraphs to a 768 dimensional dense vector space and can be used for tasks like clustering or semantic search. Take a look at the documentation of sentence-transformers if you want to use this model for more than what we…
This is a LinkTransformer model. At its core this model this is a sentence transformer model sentence-transformers model- it just wraps around the class. It is designed for quick and easy record linkage (entity-matching) through the LinkTransformer package. The tasks include clustering, deduplication, linking, aggregation and more. Notwithstanding that, it can be used for any sentence similarity task within the sentence-transformers framework as well. It maps sentences & paragraphs to a 768 dimensional dense vector space and can be used for tasks like clustering or semantic search. Take a look at the documentation of sentence-transformers if you want to use this model for more than what we…
This is a LinkTransformer model. At its core this model this is a sentence transformer model sentence-transformers model- it just wraps around the class. It is designed for quick and easy record linkage (entity-matching) through the LinkTransformer package. The tasks include clustering, deduplication, linking, aggregation and more. Notwithstanding that, it can be used for any sentence similarity task within the sentence-transformers framework as well. It maps sentences & paragraphs to a 768 dimensional dense vector space and can be used for tasks like clustering or semantic search. Take a look at the documentation of sentence-transformers if you want to use this model for more than what we…