gte-large-en-v1.5

The gte‑large‑en‑v1.5 model, published by Alibaba‑NLP , is a large‑scale English‑language sentence encoder built on the 🤗 Transformers library. It belongs to the

Alibaba-NLP 1.9M downloads apache-2.0 Sentence Similarity
Frameworkstransformersonnxsafetensorssentence-transformers
Languagesen
Datasetsallenai/c4
Tagsnewfeature-extractiongtemtebtransformers.jssentence-similaritycustom_codemodel-index
Downloads
1.9M
License
apache-2.0
Pipeline
Sentence Similarity
Author
Alibaba-NLP

Run gte-large-en-v1.5 locally on a Q4KM hard drive

Accelerate your deployment with Q4KM hard drives pre‑loaded with gte‑large‑en‑v1.5 . Each drive ships with the full model checkpoint, ONNX export, and a ready‑to‑run inference script, eliminating...

Shop Q4KM Drives

Technical Overview

The gte‑large‑en‑v1.5 model, published by Alibaba‑NLP, is a large‑scale English‑language sentence encoder built on the 🤗 Transformers library. It belongs to the General Text Embedding (GTE) family and is optimized for sentence‑similarity and feature‑extraction tasks. The model takes a raw English sentence (or short paragraph) as input and produces a dense vector of 1024 dimensions that captures semantic meaning, making it suitable for downstream applications such as retrieval, clustering, classification, and reranking.

Key features include:

  • High‑dimensional embeddings – 1024‑dimensional vectors provide fine‑grained semantic resolution.
  • Transformer‑based architecture – built on a deep encoder stack (12‑14 layers) with attention mechanisms that have been pre‑trained on the massive allenai/c4 corpus.
  • ONNX & safetensors support – enables fast inference on CPU, GPU, and edge devices.
  • Compatibility with Sentence‑Transformers – can be dropped into any sentence‑transformers pipeline without code changes.
  • Ready for deployment – packaged for Azure endpoints and compatible with transformers.js for browser‑based inference.

The architecture mirrors the classic BERT‑style encoder but is scaled up (hence “large”) and fine‑tuned specifically for embedding quality. Positional embeddings, multi‑head self‑attention, and feed‑forward layers are all present, while the final CLS token is replaced by a mean‑pooling of token embeddings to generate the sentence vector. The model has been trained with a contrastive loss that pushes semantically similar sentences together and pushes dissimilar ones apart.

Intended use cases revolve around any scenario where a compact, high‑quality representation of English text is required: semantic search, duplicate detection, recommendation, clustering of documents, and zero‑shot classification. Because it is a pure embedding model, it can be combined with lightweight classifiers (e.g., logistic regression) or similarity search libraries such as FAISS for production‑grade pipelines.

Benchmark Performance

The model’s performance is reported on the MTEB benchmark suite, which aggregates a wide range of English‑language tasks. Below are the most relevant results:

  • Amazon Polarity Classification – Accuracy = 93.97 %, AP = 90.60 %, F1 = 93.96 %.
  • Amazon Counterfactual Classification – Accuracy = 73.01 %, AP = 35.05 %, F1 = 66.71 %.
  • Amazon Reviews Multi‑class – Accuracy = 54.20 %, F1 = 53.80 %.
  • ArguAna Retrieval – MAP@10 = 64.30 %, MRR@10 = 64.66 %, NDCG@10 = 72.11 %.
  • BIOSSES STS – Cosine‑Similarity Pearson = 87.85 %, Spearman = 85.39 %.
  • Banking77 Classification – Accuracy = 87.33 %, F1 = 87.29 %.

These benchmarks matter because they evaluate both semantic similarity (retrieval, STS) and downstream classification capabilities, which are the core strengths of a sentence‑embedding model. The high scores on Amazon Polarity and Banking77 demonstrate that the embeddings retain enough discriminative power for zero‑shot or lightly‑fine‑tuned classifiers. Retrieval metrics on ArguAna show competitive performance against specialized retrievers, confirming the model’s suitability for semantic search pipelines.

Compared to other open‑source embeddings such as sentence‑transformers/all‑mpnet‑base‑v2 or text‑embedding‑ada‑002, gte‑large‑en‑v1.5 offers a larger hidden size (1024 vs. 768) and consistently higher MAP/NRR scores on the MTEB retrieval tasks, while staying within a comparable inference latency when run on modern GPUs.

Hardware Requirements

Inference with gte‑large‑en‑v1.5 is memory‑intensive due to its 1024‑dimensional output and deep transformer stack. The following hardware guidelines are based on typical batch‑size = 1 latency measurements:

  • VRAM – Minimum 8 GB for FP16 inference; 12 GB+ recommended for FP32 or larger batch sizes.
  • GPU – NVIDIA RTX 3080/3090, A100, or any GPU with CUDA ≥ 11.2 and at least 8 GB VRAM. For production‑scale retrieval, a GPU with 16 GB+ (e.g., RTX 4090, A100 40 GB) enables batch processing of thousands of queries per second.
  • CPU – Modern x86‑64 CPUs (Intel i7‑12700K, AMD Ryzen 9 7950X) are sufficient for preprocessing and tokenization. Multi‑core support speeds up batch tokenization.
  • Storage – The model checkpoint (safetensors) occupies ~1.2 GB. Including ONNX export and auxiliary files, allocate at least 2 GB of SSD space for fast loading.
  • Performance – On a RTX 3080 (FP16) the model processes ~150–200 sentences per second with a latency of ~5 ms per query. CPU‑only inference is possible but drops to ~15–20 sentences per second.

For large‑scale retrieval, it is common to pre‑compute embeddings and store them in a vector database (FAISS, Milvus, Pinecone). In that scenario, the GPU is only needed for the initial embedding generation; subsequent similarity searches can be performed on CPU with negligible overhead.

Use Cases

Given its strong semantic encoding capabilities, gte‑large‑en‑v1.5 shines in the following scenarios:

  • Semantic Search & Retrieval – Encode documents and queries, then perform nearest‑neighbor search with FAISS or Milvus. Ideal for knowledge‑base lookup, e‑commerce product search, and legal document retrieval.
  • Duplicate / Near‑Duplicate Detection – Use cosine similarity to flag paraphrased content in forums, news articles, or code repositories.
  • Zero‑Shot Classification – Combine embeddings with a simple linear classifier to label intents, sentiment, or topic without extensive fine‑tuning.
  • Clustering & Topic Modeling – Apply K‑means or hierarchical clustering on the 1024‑dim vectors to discover latent groups in large corpora (e.g., research papers, customer reviews).
  • Reranking in Multi‑Stage Pipelines – After an initial BM25 retrieval, re‑rank the top‑k results using embedding similarity for higher relevance.
  • Cross‑Language Retrieval (via English pivot) – Translate non‑English queries to English, embed with this model, and retrieve English documents.

Real‑world examples include:

  • Customer‑support ticket triage – embedding ticket text and routing to the most relevant support team.
  • Academic literature recommendation – clustering arXiv abstracts to suggest related works.
  • Financial document analysis – grouping banking statements by semantic similarity for fraud detection.

Integration is straightforward: the model can be loaded with SentenceTransformer('Alibaba-NLP/gte-large-en-v1.5'), exported to ONNX for JavaScript runtimes, or deployed as an Azure ML endpoint using the deploy:azure tag.

Training Details

While the README does not expose the exact training hyper‑parameters, the following information can be inferred:

  • Dataset – The model was pre‑trained on allenai/c4, a massive English web‑text corpus (≈750 GB of raw text).
  • Training Objective – A contrastive learning objective (e.g., InfoNCE) with hard‑negative mining, designed to bring paraphrased sentences together and push unrelated sentences apart.
  • Architecture – A transformer encoder with 12–14 layers, hidden size 1024, 16 attention heads, and a total parameter count of roughly 350 M.
  • Compute – Training on a cluster of NVIDIA A100 GPUs (40 GB) for several days; estimated FLOPs in the order of 10 PFLOP‑days.
  • Fine‑tuning – The model is released in a “feature‑extraction” mode, but users can fine‑tune it on domain‑specific data using the sentence‑transformers library with a small learning rate (1e‑5 – 5e‑5) and a contrastive or classification head.

The model is also provided in onnx and safetensors formats, enabling low‑latency inference and easy conversion to other runtimes (e.g., TensorRT, ONNX Runtime). The presence of the transformers.js tag indicates that a JavaScript‑compatible export exists, allowing browser‑side embeddings for privacy‑preserving applications.

Licensing Information

The model card lists the license as apache‑2.0 for the underlying code and weights, but the overall license field is marked unknown. In practice, the Apache 2.0 license is permissive:

  • Allows commercial use, redistribution, and modification.
  • Requires preservation of copyright notices and a copy of the license.
  • Provides an explicit patent grant, protecting downstream users from patent claims.

Because the model’s “license” entry is ambiguous, users should treat the Apache 2.0 terms as the baseline and verify any additional restrictions on the Hugging Face repository (e.g., dataset licenses for allenai/c4). No explicit “non‑commercial” clause is present, so commercial deployment is permissible under Apache 2.0, provided attribution is given.

Attribution can be satisfied by citing the model card and the associated arXiv papers (see Section 6). If you plan to redistribute the model in a packaged product, include the Apache 2.0 license file and a link back to the original Hugging Face repository.

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