gte-large-en-v1.5
by Alibaba-NLP
Alibaba's GTE v1.5 large: an English text embedding model that reads 8,192 tokens at once and returns 1,024-dimension vectors, Apache 2.0
Alibaba-NLP/gte-large-en-v1.5Deploy gte-large-en-v1.5
Single-tenantMixpeek has no managed extractor for this model. On a single-tenant deployment you upload the weights and a custom plugin serves them next to the rest of your pipeline.
Overview
gte-large-en-v1.5 is an English text embedding model from Alibaba's Tongyi Lab (Alibaba-NLP), part of the GTE v1.5 series released in April 2024 under the Apache 2.0 license. It has about 434M parameters and turns a passage of up to 8,192 tokens into one 1,024-dimension vector, so a long document section can be embedded whole, where models such as all-MiniLM-L6-v2 stop at 256 tokens and BGE at 512.
Its model card reports 65.39 on the English MTEB benchmark and 86.71 on the LoCo long-context retrieval tests; the smaller gte-base-en-v1.5 scores 64.11 and 87.44 at 137M parameters and 768 dimensions. It has about 1.9 million downloads a month on Hugging Face.
Architecture
A 24-layer encoder with hidden size 1,024, built on Alibaba's transformer++ backbone: BERT with rotary position embeddings (RoPE, base 160,000) and gated linear units, which is what lets it run at 8,192 tokens. Vocabulary 30,528 tokens. The sentence vector is the first ([CLS]) token's output, normalized for cosine similarity. Training was multi-stage, starting with masked-language pre-training on short texts and resampling toward longer ones before contrastive training. The custom architecture loads with trust_remote_code=True.
Mixpeek SDK Integration
# Embed long passages with gte-large-en-v1.5.
# pip install -U sentence-transformers
from sentence_transformers import SentenceTransformer
model = SentenceTransformer("Alibaba-NLP/gte-large-en-v1.5", trust_remote_code=True)
model.max_seq_length = 8192 # the model's full context
passages = [open("contract_section_4.txt").read(), open("contract_section_5.txt").read()]
doc_vecs = model.encode(passages, normalize_embeddings=True, batch_size=4) # (2, 1024)Capabilities
- 1,024-dimension English text embeddings
- Context length of 8,192 tokens per input
- Semantic search, retrieval for RAG, clustering and classification
- Loads with sentence-transformers, Hugging Face Transformers and transformers.js
- Apache 2.0 license
Use Cases on Mixpeek
Benchmarks
| Dataset | Metric | Score | Source |
|---|---|---|---|
| MTEB (English) | Average | 65.39 | Model card |
| LoCo | Long-context retrieval average | 86.71 | Model card |
Performance
Scores are from the model card; we have not measured it. Attention cost grows with input length, so an 8,192-token input is far slower than a 512-token one, and batch sizes have to shrink for long passages. The card recommends xformers with unpadding for speed. At 1,024 dimensions in float32 each vector is 4,096 bytes, about 4.1 GB per million before index overhead. English only; for other languages use a multilingual model.
Common Pipeline Companions
Frequently Asked Questions
What is gte-large-en-v1.5?
An English text embedding model from Alibaba-NLP with about 434M parameters, released in April 2024 under Apache 2.0. It turns up to 8,192 tokens of text into one 1,024-dimension vector, and its model card reports 65.39 on English MTEB and 86.71 on the LoCo long-context retrieval benchmark.
How long can the input to gte-large-en-v1.5 be?
8,192 tokens, set by its rotary position embeddings, against 512 for BGE large and 256 for all-MiniLM-L6-v2. Text past the limit is cut off without a warning, so count tokens with the model's own tokenizer. Long inputs cost more compute per vector, so 8,192 is a ceiling to use when a section has to stay whole, not a default chunk size.
Should I use gte-large-en-v1.5 or gte-base-en-v1.5?
Start with base if speed or index size matters. On the model card, large scores 65.39 on English MTEB against 64.11 for base, while base scores higher on LoCo long-context retrieval, 87.44 against 86.71. Base has 137M parameters and 768 dimensions, so it embeds faster and stores 3,072 bytes per vector against 4,096 for large.
Why does it need trust_remote_code?
Its architecture, Alibaba's transformer++ encoder with RoPE and gated linear units, is defined in code hosted on Hugging Face (Alibaba-NLP/new-impl) and not in the Transformers library itself. trust_remote_code=True lets Transformers or sentence-transformers download and run that code. Pin a revision in production so the code you run does not change under you.
How do I use it with Mixpeek?
Mixpeek's managed text extractor runs multilingual-e5-large-instruct, not this checkpoint. To use gte-large-en-v1.5, embed your text on your side as in the example on this page and upsert the vectors into a collection, or register it as a custom model on Enterprise. Keep queries on the same model as the stored vectors: a query from any other model returns ranked results with no error, and they are wrong.
Specification
Research Paper
Model paper or technical report
arxiv.orgBuild a pipeline with gte-large-en-v1.5
Add this model to a processing pipeline alongside other extractors. Combine with retrieval stages for end-to-end search.
Run it on your own data, free