GTE rerankers
Alibaba’s two GTE rerankers are small encoder cross-encoders, not LLM-based ones: gte-reranker-modernbert-base (149M, English) and gte-multilingual-reranker-base (306M, 70+ languages). Both take 8,192 tokens and are Apache 2.0. They are the size you can serve on a CPU or a small GPU, and the English model even runs in the browser.
The two models
| Model | Parameters | Languages | Built on | Runs with |
|---|---|---|---|---|
Alibaba-NLP/gte-reranker-modernbert-base | 149M | English | ModernBERT-base | transformers, sentence-transformers, transformers.js, Text Embeddings Inference |
Alibaba-NLP/gte-multilingual-reranker-base | 306M | 70+ | Alibaba’s own encoder | transformers (custom code), sentence-transformers, Text Embeddings Inference, Infinity |
Alibaba Cloud’s hosted gte-rerank APIs are related models, not these weights; see reranking in mainland China for the hosted ones.
Scores, and whose they are
| Model | Benchmark | Score | Whose run |
|---|---|---|---|
| gte-reranker-modernbert-base | BEIR | 56.19* | Alibaba, model card |
| gte-reranker-modernbert-base | LoCo (long documents) | 90.68* | Alibaba, model card |
| gte-reranker-modernbert-base | CoIR (code) | 79.99* | Alibaba, model card |
| gte-multilingual-reranker-base | MTEB-R (English) | 59.51 | Qwen, Qwen3-Reranker cards |
| gte-multilingual-reranker-base | CMTEB-R (Chinese) | 74.08 | Qwen, Qwen3-Reranker cards |
| gte-multilingual-reranker-base | MMTEB-R (multilingual) | 59.44 | Qwen, Qwen3-Reranker cards |
Alibaba’s card for the ModernBERT model doesn’t say which BEIR datasets or which first stage it used. For the multilingual model Alibaba publish results only as a chart (on the card and in the mGTE paper), so the numbers here are Qwen’s, who ran it as a baseline for Qwen3-Reranker, reranking the top 100 from Qwen3-Embedding-0.6B. The two models’ rows aren’t comparable with each other.
Next to Alibaba’s newer Qwen3-Reranker, the multilingual model is the cheap end of the scale: on the same Qwen runs the 0.6B Qwen3-Reranker scores 65.80* on MTEB-R and 71.31 on CMTEB-R, for twice the parameters and an LLM-style serving setup.
Quick start
sentence-transformers
pip install sentence-transformers
from sentence_transformers import CrossEncoder
model = CrossEncoder(
"Alibaba-NLP/gte-reranker-modernbert-base",
automodel_args={"torch_dtype": "auto"},
)
pairs = [
["what is the capital of China?", "Beijing"],
["how to implement quick sort in python?", "Introduction of quick sort"],
]
scores = model.predict(pairs) # 0–1: sentence-transformers applies an activation
The multilingual model’s card loads it with plain transformers and trust_remote_code=True, and recommends installing xformers and enabling unpadding for speed.
As a service
docker run -p 8080:80 -v $PWD/data:/data \
ghcr.io/huggingface/text-embeddings-inference:cpu-1.7 \
--model-id Alibaba-NLP/gte-reranker-modernbert-base
curl localhost:8080/rerank -H "Content-Type: application/json" \
-d '{"query": "What is the capital of China?", "texts": ["Beijing"]}'
Hugging Face’s Text Embeddings Inference serves both models behind a /rerank route, on CPU or GPU (drop cpu- from the image tag and add --gpus all). The English model also runs in the browser through transformers.js, in fp32, fp16, q8, q4 or q4f16.
When to pick GTE
- Yes: CPU serving, or a GPU budget too small for an LLM-based reranker.
- Yes: long passages: both take 8,192 tokens, where many small cross-encoders stop at 512.
- Yes: English code or long-document search, the two areas Alibaba report for the ModernBERT model.
- Maybe not: you need instructions, or the best multilingual quality and have a GPU: Qwen3-Reranker takes instructions and scores higher on Qwen’s runs.
Pros and cons
Pros
- Apache 2.0, 149M and 306M parameters
- 8,192-token context
- Served by Text Embeddings Inference on CPU or GPU
- The English model runs in the browser via transformers.js
Cons
- No task instructions
- Alibaba’s BEIR figure comes without its datasets or first stage
- The multilingual model needs custom code in transformers
- Behind LLM-based rerankers on Qwen’s multilingual runs
Serving it yourself?
The self-host guide covers when self-hosting pays off, picking a model, serving options and an ops checklist.
Self-host guide → All models →