alt.freeweights.embed / gte-multilingual-base
From: Alibaba-NLP <huggingface.co/Alibaba-NLP>Newsgroups: alt.freeweights.embedSubject:

gte-multilingual-base

Date: 2026-11-14Commit: 9bbca17Signed: 2DC28CC7B26A283B ✓

Sentence similarity model with 305M parameters. Safetensors weights, 630 MB in all. Published by Alibaba-NLP under Apache-2.0.

305M params630MBgte-multilingual-basesafetensorspermissive
FactsParams305MSize630 MBFormatssafetensorsTasksentence similarityLicenseApache-2.0From sourcepermissive
$ fw get Alibaba-NLP/gte-multilingual-base
# manifest sha256 d7a0452bc0da… · 630 MB · 16 files
$ fw verify ./gte-multilingual-base Alibaba-NLP/gte-multilingual-base
From sourceHosted (signed)Alibaba-NLP/gte-multilingual-baseLast check: 2026-11-14 21:07 UTC

Get help: custom fine-tune or private deploy. We review your setup before we quote.

Works with

Evaluate with

Overview

Size
630 MB
Weights
611 MB (safetensors)
Parameters
305M
Formats
safetensors
Task
sentence similarity
License
Apache-2.0 (permissive)
Files
16, each with a sha256
Publisher
Alibaba-NLP
Added
2026-11-14
Section
alt.freeweights.embed
Lineage

Original release from the publisher.

Where these bytes come from
Publisher at the pinned commit→You

Sources are tried in order. A file counts only when its size and sha256 match the manifest. Sources are checked when you ask for them, not on a timer.

Sources
BadgeHostLast checkResult
From sourcehuggingface.co2026-11-14 21:07 UTCpassed

Model card

From the publisher at commit 9bbca17. Shown as plain text with links; images open at the publisher.

gte-multilingual-base#

The gte-multilingual-base model is the latest in the GTE (General Text Embedding) 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 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.
  • Elastic Dense Embedding: Support elastic output dense representation while maintaining the effectiveness of downstream tasks, which significantly reduces storage costs and improves execution efficiency.
  • Sparse Vectors: In addition to dense representations, it can also generate sparse vectors.

Paper: mGTE: Generalized Long-Context Text Representation and Reranking Models for Multilingual Text Retrieval

Model Information#

  • Model Size: 305M
  • Embedding Dimension: 768
  • Max Input Tokens: 8192

Usage#

  • **It is recommended to install xformers and enable unpadding for acceleration,

refer to enable-unpadding-and-xformers.**

Get Dense Embeddings with Transformers#
# Requires transformers>=4.36.0

import torch.nn.functional as F
from transformers import AutoModel, AutoTokenizer

input_texts = [
    "what is the capital of China?",
    "how to implement quick sort in python?",
    "北京",
    "快排算法介绍"
]

model_name_or_path = 'Alibaba-NLP/gte-multilingual-base'
tokenizer = AutoTokenizer.from_pretrained(model_name_or_path)
model = AutoModel.from_pretrained(model_name_or_path, trust_remote_code=True)

# Tokenize the input texts
batch_dict = tokenizer(input_texts, max_length=8192, padding=True, truncation=True, return_tensors='pt')

outputs = model(**batch_dict)

dimension=768 # The output dimension of the output embedding, should be in [128, 768]
embeddings = outputs.last_hidden_state[:, 0][:dimension]

embeddings = F.normalize(embeddings, p=2, dim=1)
scores = (embeddings[:1] @ embeddings[1:].T) * 100
print(scores.tolist())

# [[0.3016996383666992, 0.7503870129585266, 0.3203084468841553]]
Use with sentence-transformers#
# Requires sentence-transformers>=3.0.0

from sentence_transformers import SentenceTransformer

input_texts = [
    "what is the capital of China?",
    "how to implement quick sort in python?",
    "北京",
    "快排算法介绍"
]

model_name_or_path="Alibaba-NLP/gte-multilingual-base"
model = SentenceTransformer(model_name_or_path, trust_remote_code=True)
embeddings = model.encode(input_texts, normalize_embeddings=True) # embeddings.shape (4, 768)

# sim scores
scores = model.similarity(embeddings[:1], embeddings[1:])

print(scores.tolist())
# [[0.301699697971344, 0.7503870129585266, 0.32030850648880005]]
Use with infinity#

Usage via docker and infinity, MIT Licensed.

docker run --gpus all -v $PWD/data:/app/.cache -p "7997":"7997" \
michaelf34/infinity:0.0.69 \
v2 --model-id Alibaba-NLP/gte-multilingual-base --revision "main" --dtype float16 --batch-size 32 --device cuda --engine torch --port 7997
Use with Text Embeddings Inference (TEI)#

Usage via Docker and 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-base \
  --dtype float16
  • 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-base \
  --dtype float16

Then you can send requests to the deployed API via the OpenAI-compatible v1/embeddings route (more information about the OpenAI Embeddings API):

curl https://0.0.0.0:8080/v1/embeddings \
  -H "Content-Type: application/json" \
  -d '{
    "input": [
      "what is the capital of China?",
      "how to implement quick sort in python?",
      "北京",
      "快排算法介绍"
    ],
    "model": "Alibaba-NLP/gte-multilingual-base",
    "encoding_format": "float"
  }'
Use with custom code to get dense embeddings and sparse token weights#
# You can find the script gte_embedding.py in https://huggingface.co/Alibaba-NLP/gte-multilingual-base/blob/main/scripts/gte_embedding.py

from gte_embedding import GTEEmbeddidng

model_name_or_path = 'Alibaba-NLP/gte-multilingual-base'
model = GTEEmbeddidng(model_name_or_path)
query = "中国的首都在哪儿"

docs = [
    "what is the capital of China?",
    "how to implement quick sort in python?",
    "北京",
    "快排算法介绍"
]

embs = model.encode(docs, return_dense=True,return_sparse=True)
print('dense_embeddings vecs', embs['dense_embeddings'])
print('token_weights', embs['token_weights'])
pairs = [(query, doc) for doc in docs]
dense_scores = model.compute_scores(pairs, dense_weight=1.0, sparse_weight=0.0)
sparse_scores = model.compute_scores(pairs, dense_weight=0.0, sparse_weight=1.0)
hybrid_scores = model.compute_scores(pairs, dense_weight=1.0, sparse_weight=0.3)

print('dense_scores', dense_scores)
print('sparse_scores', sparse_scores)
print('hybrid_scores', hybrid_scores)

# dense_scores [0.85302734375, 0.257568359375, 0.76953125, 0.325439453125]
# sparse_scores [0.0, 0.0, 4.600879669189453, 1.570279598236084]
# hybrid_scores [0.85302734375, 0.257568359375, 2.1497951507568356, 0.7965233325958252]

Evaluation#

We validated the performance of the gte-multilingual-base model on multiple downstream tasks, including multilingual retrieval, cross-lingual retrieval, long text retrieval, and general text representation evaluation on the MTEB Leaderboard, among others.

Retrieval Task#

Retrieval results on MIRACL and MLDR (multilingual), MKQA (crosslingual), BEIR and LoCo (English).

Image: image

  • Detail results on MLDR

Image: image

  • Detail results on LoCo
MTEB#

Results on MTEB English, Chinese, French, Polish

Image: image

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}
}

Files

16 files · 630 MBWeights 611 MB (safetensors). Sizes and sha256 from the signed manifest.
Hide all 16 files with their sha256
FileSizesha256
.gitattributes1.57 KB34448b82c17d60fec9b65b1f093c115ddbaadc04beb1b0140b6bfed2e012a930
1_Pooling/config.json190 Bc9bef85e8bbf4b2eab4941b3fb62bd33f88686748b478f2e264d256472d9643b
README.md124 KB7bc40a3d4b2ae520f7c50d40d0c56fca61d13973e3f022b464f325939b7fff68
config.json1.43 KB711bdc81365fc25d30533cf05b9fdf588e5ba01f18540fbbb1307d787597a313
images/mgte-loco.png418 KBc75d42dd9dcf30ff97cb8a5ba076f97713d827735429e36301af92d50e3a1b92
images/mgte-mldr.png372 KBc34b3938ff502f99acab7a312ff2c46f889a593a61296febcd4b828f3f88af10
images/mgte-mteb.png281 KB05a5368a8f33d6e6d3c2dff495b2c7bcc447f7c5b3462fd55b3d7a680be501a8
images/mgte-reranker.png238 KB2588b1442676484f941f4075bfcead1cdd7da83af4999d37ab45507495bdd784
images/mgte-retrieval.png356 KB1581dc1f0e6210008130ad03bc392f5badda32dc8a0e9ccd21cf30a37b45b5fc
model.safetensors611 MBf5a35a10faa54da7717870af1517c9b41e9bd8e3880bc5a8e9363d4c3c63e9b0
modules.json349 B84e40c8e006c9b1d6c122e02cba9b02458120b5fb0c87b746c41e0207cf642cf
scripts/gte_embedding.py6.33 KB2fd5e5db15d7831c99bbc419e2ea2fd9c329a0c642472b03dd62275a85cbcff7
sentence_bert_config.json55 B23aa234ef6021d513cdf56947c07aaa6977000d85dcd1fd423f650b3382a39ca
special_tokens_map.json964 B8c785abebea9ae3257b61681b4e6fd8365ceafde980c21970d001e834cf10835
tokenizer.json17.1 MBf59925fcb90c92b894cb93e51bb9b4a6105c5c249fe54ce1c704420ac39b81af
tokenizer_config.json1.15 KB24cebbf2ef20fc317256e03e52ac7b2ca326586f946a8427ecac036332bf0933
VersionsEach time the pinned upstream commit or file list changed in this repo. Newest first.
Upstream commitDateContents
9bbca17d92 pinned now manifest updated, same commit2026-11-14 21:07 UTC16 files · 630 MB
9bbca17d922026-11-14 21:07 UTC16 files · 630 MB

Use it

$ fw get Alibaba-NLP/gte-multilingual-base
# manifest sha256 d7a0452bc0da… · 630 MB · 16 files
$ fw verify ./gte-multilingual-base Alibaba-NLP/gte-multilingual-base
fw.pyChecks the signature and every sha256, tries each source in order, resumes.
$ python3 fw.py get https://freeweights.allternit.com/manifests/Alibaba-NLP/gte-multilingual-base.json --dir ./gte-multilingual-base $ python3 fw.py verify ./gte-multilingual-base ./Alibaba-NLP__gte-multilingual-base.json
hfThe Hugging Face CLI with one setting. Same repo id.
$ HF_ENDPOINT=https://freeweights.allternit.com hf download Alibaba-NLP/gte-multilingual-base --revision 9bbca17d9273fd0d03d5725c7a4b0f6b45142062 --local-dir ./gte-multilingual-base
transformersLoad the weights in Python.
import os os.environ["HF_ENDPOINT"] = "https://freeweights.allternit.com" from transformers import AutoModel, AutoTokenizer tok = AutoTokenizer.from_pretrained("Alibaba-NLP/gte-multilingual-base", revision="9bbca17d9273fd0d03d5725c7a4b0f6b45142062") model = AutoModel.from_pretrained("Alibaba-NLP/gte-multilingual-base", revision="9bbca17d9273fd0d03d5725c7a4b0f6b45142062", device_map="auto")
sentence-transformersEmbed text with sentence-transformers.
import os os.environ["HF_ENDPOINT"] = "https://freeweights.allternit.com" from sentence_transformers import SentenceTransformer model = SentenceTransformer("Alibaba-NLP/gte-multilingual-base", revision="9bbca17d9273fd0d03d5725c7a4b0f6b45142062") vectors = model.encode(["Hello"])

License

Name
Apache License 2.0
Id
Apache-2.0
Class
Permissive
Redistribution
yes
Listing
Hosted (signed)
Decided
License as declared by the publisher. No person read it. 2026-11-14
Text in
README.md
Text sha256
7bc40a3d4b2ae520f7c50d40d0c56fca61d13973e3f022b464f325939b7fff68
Terms gate
No extra terms beyond the license.

Read the license text

Licenses are checked against the license table. A custom license passes only after a person reads it.

Provenance

From: Alibaba-NLP <huggingface.co/Alibaba-NLP>Newsgroups: alt.freeweights.embedSubject: gte-multilingual-baseDate: 2026-11-14Commit: 9bbca17Signed: 2DC28CC7B26A283B ✓
Upstream
Alibaba-NLP/gte-multilingual-base
Pinned commit
9bbca17d9273fd0d03d5725c7a4b0f6b45142062
Manifest
gte-multilingual-base.json · .minisig
Manifest sha256
d7a0452bc0da4e7aad1944f84d213b7a9e0b5cb6588e9078b50a746fb8a4fe81
Signature
minisign, Ed25519, key 2DC28CC7B26A283B
Created
2026-11-14 21:07 UTC
Generator
freeweights-manifest/0.1.0
Takedowns
None.

How to verify

$ curl -O https://freeweights.allternit.com/manifests/Alibaba-NLP/gte-multilingual-base.json $ curl -O https://freeweights.allternit.com/manifests/Alibaba-NLP/gte-multilingual-base.json.minisig $ minisign -Vm gte-multilingual-base.json -P RWQ7KGqyx4zCLXtUFOqvfv8L3g+8fpKJ1FsuxPyOYMF+4KufbUxKq1Oq $ shasum -a 256 <file> # compare with the Files tab

A manifest whose signature fails must be rejected. A file whose size or sha256 does not match must be discarded. Verify a download

Model tree

1 model in the catalog name this one as their parent.

Quantizations
1
Get it
Download
$ HF_ENDPOINT=https://freeweights.allternit.com hf download Alibaba-NLP/gte-multilingual-base
Open in Freeweights Studio

Pull, verify and run it in the Allternit app on Desktop, web or phone.

Signed manifest
minisign, key 2DC28CC7B26A283B. gte-multilingual-base.json. Provenance. Takedown history: none.

Variants

1 quantized or adapter build of gte-multilingual-base. Each has its own license check and page.

From: sentence-transformers <huggingface.co/sentence-transformers>Subject: all-MiniLM-L6-v1
From: unsloth <huggingface.co/unsloth>Subject: all-MiniLM-L6-v2
From: mlx-community <huggingface.co/mlx-community>Subject: all-MiniLM-L6-v2-4bit
From: sentence-transformers <huggingface.co/sentence-transformers>Subject: all-mpnet-base-v1
From: sentence-transformers <huggingface.co/sentence-transformers>Subject: allenai-specter
From: sentence-transformers <huggingface.co/sentence-transformers>Subject: bert-base-nli-max-tokens