Help preserve open and free AI for humanity's future

← All models

Alibaba-NLP_gte-multilingual-reranker-base

Alibaba-NLP · View on Hugging Face ↗

Multilingual reranker (GTE) that reorders search results by query–document relevance.

✓ verified · rehash-vs-hf-metadata at 2026-08-24T07:57:05Z

apache-2.0600.1 MB (629,265,653 bytes)sentence-transformerssafetensorsnewtext-classificationtransformerstext-embeddings-inferencetext-rankingcustom_codecebendpoints_compatible74 languages (af, ar, az …)paper: 2407.19669

Get this model

Download Alibaba-NLP_gte-multilingual-reranker-base.torrent

Recommended — the .torrent carries the webseed url-list, so your client can fall back to plain HTTPS if the swarm is thin. See/verify for the full download + verification walkthrough.

Model card

The complete upstream card, rendered from this payload's README.md — the same hash-verified bytes the torrent distributes. Images and off-site links are removed; the original card on Hugging Face carries them.


license: apache-2.0 pipeline_tag: text-ranking tags:

  • transformers
  • sentence-transformers
  • text-embeddings-inference language:
  • af
  • ar
  • az
  • be
  • bg
  • bn
  • ca
  • ceb
  • cs
  • cy
  • da
  • de
  • el
  • en
  • es
  • et
  • eu
  • fa
  • fi
  • fr
  • gl
  • gu
  • he
  • hi
  • hr
  • ht
  • hu
  • hy
  • id
  • is
  • it
  • ja
  • jv
  • ka
  • kk
  • km
  • kn
  • ko
  • ky
  • lo
  • lt
  • lv
  • mk
  • ml
  • mn
  • mr
  • ms
  • my
  • ne
  • nl
  • 'no'
  • pa
  • pl
  • pt
  • qu
  • ro
  • ru
  • si
  • sk
  • sl
  • so
  • sq
  • sr
  • sv
  • sw
  • ta
  • te
  • th
  • tl
  • tr
  • uk
  • ur
  • vi
  • yo
  • zh library_name: sentence-transformers

gte-multilingual-reranker-base

The gte-multilingual-reranker-base model is the first reranker model in the GTE family of models, featuring several key attributes:

  • High Performance: Achieves state-of-the-art (SOTA) results in multilingual retrieval tasks and multi-task representation model evaluations when compared to reranker models of similar size.
  • Training Architecture: Trained using an encoder-only transformers architecture, resulting in a smaller model size. Unlike previous models based on decode-only LLM architecture (e.g., gte-qwen2-1.5b-instruct), this model has lower hardware requirements for inference, offering a 10x increase in inference speed.
  • Long Context: Supports text lengths up to 8192 tokens.
  • Multilingual Capability: Supports over 70 languages.

Model Information

  • Model Size: 306M
  • Max Input Tokens: 8192

Usage

Using Huggingface transformers (transformers>=4.36.0)

import torch
from transformers import AutoModelForSequenceClassification, AutoTokenizer

model_name_or_path = "Alibaba-NLP/gte-multilingual-reranker-base"

tokenizer = AutoTokenizer.from_pretrained(model_name_or_path)
model = AutoModelForSequenceClassification.from_pretrained(
    model_name_or_path, trust_remote_code=True,
    torch_dtype=torch.float16
)
model.eval()

pairs = [["中国的首都在哪儿","北京"], ["what is the capital of China?", "北京"], ["how to implement quick sort in python?","Introduction of quick sort"]]
with torch.no_grad():
    inputs = tokenizer(pairs, padding=True, truncation=True, return_tensors='pt', max_length=512)
    scores = model(**inputs, return_dict=True).logits.view(-1, ).float()
    print(scores)

# tensor([1.2315, 0.5923, 0.3041])

Usage with infinity:

Infinity, a MIT Licensed Inference RestAPI Server.

docker run --gpus all -v $PWD/data:/app/.cache -p "7997":"7997" \
michaelf34/infinity:0.0.68 \
v2 --model-id Alibaba-NLP/gte-multilingual-reranker-base --revision "main" --dtype bfloat16 --batch-size 32 --device cuda --engine torch --port 7997

Usage with Text Embeddings Inference (TEI):

  • CPU:
docker run --platform linux/amd64 \
  -p 8080:80 \
  -v $PWD/data:/data \
  --pull always \
  ghcr.io/huggingface/text-embeddings-inference:cpu-1.7 \
  --model-id Alibaba-NLP/gte-multilingual-reranker-base
  • GPU:
docker run --gpus all \
  -p 8080:80 \
  -v $PWD/data:/data \
  --pull always \
  ghcr.io/huggingface/text-embeddings-inference:1.7 \
  --model-id Alibaba-NLP/gte-multilingual-reranker-base

Then you can send requests to the deployed API via the /rerank route (see the Text Embeddings Inference OpenAPI Specification for more details):

curl https://0.0.0.0:8080/rerank \
  -H "Content-Type: application/json" \
  -d '{
    "query": "中国的首都在哪儿",
    "raw_scores": false,
    "return_text": false,
    "texts": [ "北京" ],
    "truncate": true,
    "truncation_direction": "right"
  }'

Evaluation

Results of reranking based on multiple text retreival datasets

More detailed experimental results can be found in the paper.

Cloud API Services

In addition to the open-source GTE series models, GTE series models are also available as commercial API services on Alibaba Cloud.

  • Embedding Models: Three versions of the text embedding models are available: text-embedding-v1/v2/v3, with v3 being the latest API service.
  • ReRank Models: The gte-rerank model service is available.

Note that the models behind the commercial APIs are not entirely identical to the open-source models.

Citation

If you find our paper or models helpful, please consider cite:

@inproceedings{zhang2024mgte,
  title={mGTE: Generalized Long-Context Text Representation and Reranking Models for Multilingual Text Retrieval},
  author={Zhang, Xin and Zhang, Yanzhao and Long, Dingkun and Xie, Wen and Dai, Ziqi and Tang, Jialong and Lin, Huan and Yang, Baosong and Xie, Pengjun and Huang, Fei and others},
  booktitle={Proceedings of the 2024 Conference on Empirical Methods in Natural Language Processing: Industry Track},
  pages={1393--1412},
  year={2024}
}

Magnet link (secondary — no webseeds)

Opens the swarm directly, but carries no webseed url-list. Prefer the.torrent download above — HTTP fallback seeds ride inside it.

magnet:?xt=urn:btih:9547d6362a9153e3ad4973c229345c286376ab92&dn=Alibaba-NLP_gte-multilingual-reranker-base

Open magnet in torrent client · infohash 9547d6362a9153e3ad4973c229345c286376ab92

Files & hashes

PathSizeMethodHash
README.md5.5 KB (5,656 B)sha1-git-blob76fc5373c2c96eee3ef9d0710d98153fa314f88d
config.json1.5 KB (1,494 B)sha1-git-bloba925808a7f080b10b5f2aba4f0d192fc36a7c8f9
images/mgte-reranker.png232.9 KB (238,472 B)sha1-git-blobeab5060d23fc97d405d86da157e3569c49ee1713
model.safetensors583.6 MB (611,934,706 B)sha256-lfs10ebaa49322dd7e01a13a91c49810939e3f91f231aceaa47fdf0cab3083954f6
special_tokens_map.json964 B (964 B)sha1-git-blobb1879d702821e753ffe4245048eee415d54a9385
tokenizer.json16.3 MB (17,083,021 B)sha256-lfsd6f76fe13d42f80dcee0cb86a1aeb5f14f8909bb8a8782f7a4a4ad76697ef164
tokenizer_config.json1.3 KB (1,340 B)sha1-git-blobddf5350d3f7b2c0bf20ee2b10e3349dd6d8291bd

Provenance

Upstream repositoryAlibaba-NLP/gte-multilingual-reranker-base
Revision (pinned)8215cf04918ba6f7b6a62bb44238ce2953d8831c
Fetched at2026-08-24T07:56:40Z
License at fetchapache-2.0
Snapshot toolhuggingface · seedbank 0.1.0

Trackers

Webseeds