GTE rerankers

Open weights · Tongyi Lab, Alibaba ·

Apache 2.0SmallCPU-friendly

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

ModelParametersLanguagesBuilt onRuns with
Alibaba-NLP/gte-reranker-modernbert-base149MEnglishModernBERT-basetransformers, sentence-transformers, transformers.js, Text Embeddings Inference
Alibaba-NLP/gte-multilingual-reranker-base306M70+Alibaba’s own encodertransformers (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

ModelBenchmarkScoreWhose run
gte-reranker-modernbert-baseBEIR56.19*Alibaba, model card
gte-reranker-modernbert-baseLoCo (long documents)90.68*Alibaba, model card
gte-reranker-modernbert-baseCoIR (code)79.99*Alibaba, model card
gte-multilingual-reranker-baseMTEB-R (English)59.51Qwen, Qwen3-Reranker cards
gte-multilingual-reranker-baseCMTEB-R (Chinese)74.08Qwen, Qwen3-Reranker cards
gte-multilingual-reranker-baseMMTEB-R (multilingual)59.44Qwen, 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

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 →

Other models