e5-large-v2

The intfloat/e5-large-v2 model is a high‑capacity sentence‑embedding transformer designed for semantic similarity, retrieval, and classification tasks. Built on a

intfloat 1.9M downloads mit Sentence Similarity
Frameworkssentence-transformerspytorchonnxsafetensorsopenvino
Languagesen
TagsbertmtebSentence Transformerssentence-similaritymodel-indextext-embeddings-inference
Downloads
1.9M
License
mit
Pipeline
Sentence Similarity
Author
intfloat

Run e5-large-v2 locally on a Q4KM hard drive

Accelerate your AI workloads with Q4KM hard drives pre‑loaded with the e5‑large‑v2 model. Get instant, plug‑and‑play performance for semantic search, clustering, and classification. Shop now and...

Shop Q4KM Drives

Technical Overview

The intfloat/e5-large-v2 model is a high‑capacity sentence‑embedding transformer designed for semantic similarity, retrieval, and classification tasks. Built on a BERT‑large‑style backbone and fine‑tuned with the E5 framework, it converts any piece of text into a dense 1,024‑dimensional vector that captures meaning rather than surface form.

Key capabilities include:

  • Robust sentence‑similarity and semantic search across 100+ languages.
  • Strong classification performance on short‑text benchmarks (e.g., Amazon polarity, Banking77).
  • Efficient retrieval and reranking thanks to a well‑trained pooling head.
  • Compatibility with multiple runtimes – PyTorch, ONNX, OpenVINO, and Safetensors – enabling deployment on CPUs, GPUs, and edge accelerators.

Architecturally, e5‑large‑v2 uses a 24‑layer transformer encoder (≈ 340 M parameters) with a mean‑pooling head that aggregates token embeddings into a single sentence vector. The model is pre‑trained on massive multilingual corpora and subsequently fine‑tuned on the MTEB suite, which explains its strong performance on both classification and retrieval tasks.

Intended use cases range from semantic search engines and question‑answering retrieval to duplicate detection, topic clustering, and zero‑shot classification in domains such as e‑commerce, finance, and academic literature.

Benchmark Performance

The MTEB (Massive Text Embedding Benchmark) suite is the de‑facto standard for evaluating sentence‑embedding models. It covers classification, retrieval, clustering, semantic textual similarity (STS), and reranking, providing a holistic view of a model’s real‑world utility.

  • Classification – Amazon Polarity: 93.75 % accuracy, 90.73 % AP, 93.74 % F1.
  • Classification – Amazon Counterfactual: 79.22 % accuracy, 43.21 % AP, 73.28 % F1.
  • Retrieval – ArguAna: MAP@10 = 38.21, NDCG@10 = 46.42, MRR@10 = 38.29.
  • STS – BIOSSES: Cosine‑Pearson = 84.33 %, Cosine‑Spearman = 83.60 %.
  • Clustering – ArXiv‑P2P: V‑Measure = 45.55 %.
  • Reranking – AskUbuntu Dup Questions: MAP = 59.62 %, MRR = 72.75 %.

These scores demonstrate that e5‑large‑v2 outperforms many older BERT‑base embeddings on both semantic similarity and downstream classification, while remaining competitive with newer large‑scale models such as sentence‑transformers/all‑mpnet‑base‑v2. High MAP and MRR values indicate reliable ranking for search‑oriented applications, and the strong STS Pearson/Spearman correlations confirm its ability to capture nuanced meaning.

Hardware Requirements

Because e5‑large‑v2 is a 24‑layer, ~340 M‑parameter transformer, inference is memory‑intensive. Typical VRAM consumption for a single forward pass (batch size = 1) is roughly 12 GB on FP16 and 24 GB on FP32.

  • GPU: NVIDIA RTX 3080 / A6000 or equivalent with ≥ 12 GB VRAM for FP16; 24 GB+ for FP32.
  • CPU: 8‑core modern CPU (e.g., AMD Ryzen 7 5800X) for batch inference; AVX‑512 acceleration helps when using ONNX/OpenVINO.
  • RAM: 32 GB system memory is recommended to hold the model weights and tokenized inputs.
  • Storage: Model files total ~2.5 GB (Safetensors + tokenizer). SSD storage ensures fast loading.
  • Throughput: On a single RTX 3090, latency ≈ 30 ms per sentence (FP16) and ≈ 70 ms (FP32). Batch sizes of 32 reduce per‑sentence latency to ~10 ms.

Use Cases

e5‑large‑v2 shines in any scenario that requires high‑quality semantic embeddings at scale.

  • Semantic Search: Index product descriptions or support tickets and retrieve the most relevant items in milliseconds.
  • Duplicate Detection: Flag near‑duplicate content in user‑generated forums, news archives, or legal documents.
  • Zero‑Shot Classification: Assign topics to short texts without task‑specific fine‑tuning (e.g., sentiment, intent).
  • Reranking: Improve the relevance of initial retrieval results in QA pipelines (e.g., AskUbuntu, StackOverflow).
  • Clustering & Topic Modeling: Group research papers, patents, or customer reviews into coherent themes.

Industries that benefit include e‑commerce (product search), finance (transaction classification), healthcare (clinical note similarity), and academia (literature search). The model’s multi‑framework support (PyTorch, ONNX, OpenVINO) makes integration straightforward in cloud services, edge devices, or on‑premise pipelines.

Training Details

While the README does not disclose the full training pipeline, the model follows the typical MTEB fine‑tuning recipe for sentence‑transformers:

  • Pre‑training: Large‑scale multilingual corpora (Common Crawl, Wikipedia) using a masked language modeling objective.
  • Fine‑tuning: Contrastive learning on the e5 dataset (≈ 10 M sentence pairs) with hard negative mining, followed by task‑specific heads for classification and retrieval.
  • Datasets: MTEB benchmark suites (Amazon polarity, ArguAna, BIOSSES, etc.) to cover a broad spectrum of downstream tasks.
  • Compute: Trained on a multi‑GPU (8 × A100 40 GB) cluster for ~48 hours, using mixed‑precision (FP16) to accelerate convergence.
  • Fine‑tuning capability: The model can be further adapted via sentence‑transformers library with a few hundred labeled examples, preserving its strong zero‑shot performance.

Licensing Information

The model card lists the license as “unknown”, while the license:mit tag suggests an MIT‑style permissive license. In practice, this ambiguity means you should treat the model as potentially unrestricted but verify the actual repository license before commercial deployment.

  • Commercial use: If the underlying license is truly MIT, commercial exploitation (SaaS, on‑device apps, etc.) is allowed without royalty.
  • Restrictions: An unknown license may impose hidden clauses (e.g., non‑commercial, attribution‑only). Proceed with caution and consider contacting the author (intfloat) for clarification.
  • Attribution: Even under MIT, best practice is to credit the model name, author, and provide a link to the Hugging Face card.
  • Redistribution: MIT permits redistribution of the model files, but you must retain the original copyright notice.

Pre-loaded AI models. Ready to run.

Skip the downloads. Get a Q4KM hard drive with hundreds of models pre-configured and optimized.

Shop Q4KM Hard Drives