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

gte-base-en-v1.5

Date: 2026-11-14Commit: a829fd0Signed: 2DC28CC7B26A283B ✓

Sentence similarity model with 137M parameters. Onnx and safetensors weights, 2.16 GB in all. Published by Alibaba-NLP under Apache-2.0.

137M params2.16GBgte-base-en-v1.5onnx safetensorspermissive
FactsParams137MSize2.16 GBFormatsonnx, safetensorsTasksentence similarityLicenseApache-2.0From sourcepermissive
$ fw get Alibaba-NLP/gte-base-en-v1.5
# manifest sha256 904399cdd474… · 2.16 GB · 18 files
$ fw verify ./gte-base-en-v1.5 Alibaba-NLP/gte-base-en-v1.5
From sourceHosted (signed)Alibaba-NLP/gte-base-en-v1.5Last 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
2.16 GB
Weights
547 MB (safetensors)
Parameters
137M
Formats
onnx, safetensors
Task
sentence similarity
License
Apache-2.0 (permissive)
Files
18, 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 a829fd0. Shown as plain text with links; images open at the publisher.

gte-base-en-v1.5#

We introduce gte-v1.5 series, upgraded gte embeddings that support the context length of up to 8192, while further enhancing model performance. The models are built upon the transformer++ encoder backbone (BERT + RoPE + GLU).

The gte-v1.5 series achieve state-of-the-art scores on the MTEB benchmark within the same model size category and prodvide competitive on the LoCo long-context retrieval tests (refer to Evaluation).

We also present the gte-Qwen1.5-7B-instruct, a SOTA instruction-tuned multi-lingual embedding model that ranked 2nd in MTEB and 1st in C-MTEB.

  • Developed by: Institute for Intelligent Computing, Alibaba Group
  • Model type: Text Embeddings
  • Paper: [mGTE: Generalized Long-Context Text Representation and Reranking

Models for Multilingual Text Retrieval](https://arxiv.org/pdf/2407.19669)

Model list#
ModelsLanguageModel SizeMax Seq. LengthDimensionMTEB-enLoCo
gte-Qwen1.5-7B-instructMultiple772032768409667.3487.57
gte-large-en-v1.5English4348192102465.3986.71
gte-base-en-v1.5English137819276864.1187.44

How to Get Started with the Model#

Use the code below to get started with the model.

# 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?",
    "Beijing",
    "sorting algorithms"
]

model_path = 'Alibaba-NLP/gte-base-en-v1.5'
tokenizer = AutoTokenizer.from_pretrained(model_path)
model = AutoModel.from_pretrained(model_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)
embeddings = outputs.last_hidden_state[:, 0]
 
# (Optionally) normalize embeddings
embeddings = F.normalize(embeddings, p=2, dim=1)
scores = (embeddings[:1] @ embeddings[1:].T) * 100
print(scores.tolist())

It is recommended to install xformers and enable unpadding for acceleration, refer to enable-unpadding-and-xformers.

Use with sentence-transformers:

# Requires sentence_transformers>=2.7.0

from sentence_transformers import SentenceTransformer
from sentence_transformers.util import cos_sim

sentences = ['That is a happy person', 'That is a very happy person']

model = SentenceTransformer('Alibaba-NLP/gte-base-en-v1.5', trust_remote_code=True)
embeddings = model.encode(sentences)
print(cos_sim(embeddings[0], embeddings[1]))

Use with transformers.js:

// npm i @xenova/transformers
import { pipeline, dot } from '@xenova/transformers';

// Create feature extraction pipeline
const extractor = await pipeline('feature-extraction', 'Alibaba-NLP/gte-base-en-v1.5', {
    quantized: false, // Comment out this line to use the quantized version
});

// Generate sentence embeddings
const sentences = [
    "what is the capital of China?",
    "how to implement quick sort in python?",
    "Beijing",
    "sorting algorithms"
]
const output = await extractor(sentences, { normalize: true, pooling: 'cls' });

// Compute similarity scores
const [source_embeddings, ...document_embeddings ] = output.tolist();
const similarities = document_embeddings.map(x => 100 * dot(source_embeddings, x));
console.log(similarities); // [34.504930869007296, 64.03973265120138, 19.520042686034362]

Use with infinity: Infinity is a MIT licensed server for OpenAI-compatible deployment.

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

Training Details#

Training Data#
  • Masked language modeling (MLM): c4-en
  • Weak-supervised contrastive pre-training (CPT): GTE pre-training data
  • Supervised contrastive fine-tuning: GTE fine-tuning data
Training Procedure#

To enable the backbone model to support a context length of 8192, we adopted a multi-stage training strategy. The model first undergoes preliminary MLM pre-training on shorter lengths. And then, we resample the data, reducing the proportion of short texts, and continue the MLM pre-training.

The entire training process is as follows:

  • MLM-2048: lr 5e-4, mlm_probability 0.3, batch_size 4096, num_steps 70000, rope_base 10000
  • MLM-8192: lr 5e-5, mlm_probability 0.3, batch_size 1024, num_steps 20000, rope_base 500000
  • CPT: max_len 512, lr 2e-4, batch_size 32768, num_steps 100000
  • Fine-tuning: TODO

Evaluation#

MTEB#

The results of other models are retrieved from MTEB leaderboard.

The gte evaluation setting: mteb==1.2.0, fp16 auto mix precision, max_length=8192, and set ntk scaling factor to 2 (equivalent to rope_base * 2).

Model NameParam Size (M)DimensionSequence LengthAverage (56)Class. (12)Clust. (11)Pair Class. (3)Reran. (4)Retr. (15)STS (10)Summ. (1)
gte-large-en-v1.54341024819265.3977.7547.9584.6358.5057.9181.4330.91
mxbai-embed-large-v1335102451264.6875.6446.7187.260.1154.398532.71
multilingual-e5-large-instruct560102451464.4177.5647.186.1958.5852.4784.7830.39
bge-large-en-v1.5335102451264.2375.9746.0887.1260.0354.2983.1131.61
gte-base-en-v1.5137768819264.1177.1746.8285.3357.6654.0981.9731.17
bge-base-en-v1.510976851263.5575.5345.7786.5558.8653.2582.431.07
LoCo#
Model NameDimensionSequence LengthAverage (5)QsmsumRetrievalSummScreenRetrievalQasperAbastractRetrievalQasperTitleRetrievalGovReportRetrieval
gte-qwen1.5-7b40963276887.5749.3793.1099.6797.5498.21
gte-large-v1.51024819286.7144.5592.6199.8297.8198.74
gte-base-v1.5768819287.4449.9191.7899.8297.1398.58

Citation#

If you find our paper or models helpful, please consider citing them as follows:

@misc{zhang2024mgte,
  title={mGTE: Generalized Long-Context Text Representation and Reranking Models for Multilingual Text Retrieval}, 
  author={Xin Zhang and Yanzhao Zhang and Dingkun Long and Wen Xie and Ziqi Dai and Jialong Tang and Huan Lin and Baosong Yang and Pengjun Xie and Fei Huang and Meishan Zhang and Wenjie Li and Min Zhang},
  year={2024},
  eprint={2407.19669},
  archivePrefix={arXiv},
  primaryClass={cs.CL},
  url={https://arxiv.org/abs/2407.19669}, 
}
@misc{li2023gte,
  title={Towards General Text Embeddings with Multi-stage Contrastive Learning}, 
  author={Zehan Li and Xin Zhang and Yanzhao Zhang and Dingkun Long and Pengjun Xie and Meishan Zhang},
  year={2023},
  eprint={2308.03281},
  archivePrefix={arXiv},
  primaryClass={cs.CL},
  url={https://arxiv.org/abs/2308.03281}, 
}

Files

18 files · 2.16 GBWeights 547 MB (safetensors). Sizes and sha256 from the signed manifest.
Hide all 18 files with their sha256
FileSizesha256
.gitattributes1.52 KB11ad7efa24975ee4b0c3c3a38ed18737f0658a5f75a0a96787b576a78a023361
1_Pooling/config.json297 B4bf279dd9204db673304cab6e7db8448f427412a0d87f04c3e19f1de55dd98cd
README.md72.3 KB1bb4f60d862fcde3490bb06894187e13de5f8e3af63aaf9778ba5cb409b69a9c
config.json1.35 KB238854682d429ce12c49ed3d1a31b6d1b9622d2afbcf50a17243da18926cbcab
model.safetensors547 MBc30d96b914af1a141db13075863e666dee17daa5f844d506e07c88cd9ab12d2b
modules.json229 B8f4b264b80206c830bebbdcae377e137925650a433b689343a63bdc9b3145460
onnx/model.onnx556 MBd908f84171c304a863061cde3eaf29f9f7ec9206068f9b3a5b97323fa7b2811e
onnx/model_bnb4.onnx167 MB3e13971c7ef8a4cdc57303a35e20704bd2b618f4e20db1a1f767261b82916cdd
onnx/model_fp16.onnx278 MB96a136674652291d2b9f26a756b78b2cbccd18d7e2f309fd6ee15a185d0390d4
onnx/model_int8.onnx147 MBe7f6af7a9457d4fdd3af220c68e9a37325aad7c2d306bbc855fe0d019c326509
onnx/model_q4.onnx174 MB950a9a5a813fbab9bbf4a865d4887d8b5053819c3d04779dc8d9dfaba475de82
onnx/model_quantized.onnx147 MBe7f6af7a9457d4fdd3af220c68e9a37325aad7c2d306bbc855fe0d019c326509
onnx/model_uint8.onnx147 MB8a2921338f8cac901216fe23802fae82556e5a9fa0dfc7ed12f2a87015e4b1f0
sentence_bert_config.json54 Beb9b44b13c0f52a3b3685c3b1cbdea1ba8b04bea123b98f61610048940776eb1
special_tokens_map.json695 B5d5b662e421ea9fac075174bb0688ee0d9431699900b90662acd44b2a350503a
tokenizer.json712 KBcb374d6bc042c22455946f4e09a89d29882a199fdaf8fb25be00dc8b8857a448
tokenizer_config.json1.38 KB1ca2f5edb2909927472409df7680004ba44f915c0412c71375acd859e7ab3bd6
vocab.txt232 KB07eced375cec144d27c900241f3e339478dec958f92fddbc551f295c992038a3
VersionsEach time the pinned upstream commit or file list changed in this repo. Newest first.
Upstream commitDateContents
a829fd0e06 pinned now manifest updated, same commit2026-11-14 21:07 UTC18 files · 2.16 GB
a829fd0e062026-11-14 21:07 UTC18 files · 2.16 GB

Use it

$ fw get Alibaba-NLP/gte-base-en-v1.5
# manifest sha256 904399cdd474… · 2.16 GB · 18 files
$ fw verify ./gte-base-en-v1.5 Alibaba-NLP/gte-base-en-v1.5
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-base-en-v1.5.json --dir ./gte-base-en-v1.5 $ python3 fw.py verify ./gte-base-en-v1.5 ./Alibaba-NLP__gte-base-en-v1.5.json
hfThe Hugging Face CLI with one setting. Same repo id.
$ HF_ENDPOINT=https://freeweights.allternit.com hf download Alibaba-NLP/gte-base-en-v1.5 --revision a829fd0e060bb84554da0dfd354d0de0f7712b7f --local-dir ./gte-base-en-v1.5
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-base-en-v1.5", revision="a829fd0e060bb84554da0dfd354d0de0f7712b7f") model = AutoModel.from_pretrained("Alibaba-NLP/gte-base-en-v1.5", revision="a829fd0e060bb84554da0dfd354d0de0f7712b7f", 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-base-en-v1.5", revision="a829fd0e060bb84554da0dfd354d0de0f7712b7f") 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
1bb4f60d862fcde3490bb06894187e13de5f8e3af63aaf9778ba5cb409b69a9c
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-base-en-v1.5Date: 2026-11-14Commit: a829fd0Signed: 2DC28CC7B26A283B ✓
Upstream
Alibaba-NLP/gte-base-en-v1.5
Pinned commit
a829fd0e060bb84554da0dfd354d0de0f7712b7f
Manifest
gte-base-en-v1.5.json · .minisig
Manifest sha256
904399cdd474f2aa4bd1cee96b9ac754a674b97338370385410519674f7d1d72
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-base-en-v1.5.json $ curl -O https://freeweights.allternit.com/manifests/Alibaba-NLP/gte-base-en-v1.5.json.minisig $ minisign -Vm gte-base-en-v1.5.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

No related models in this catalog.Nothing here lists this model as its parent, and it names no parent.
Get it
Download
$ HF_ENDPOINT=https://freeweights.allternit.com hf download Alibaba-NLP/gte-base-en-v1.5
Open in Freeweights Studio

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

Signed manifest
minisign, key 2DC28CC7B26A283B. gte-base-en-v1.5.json. Provenance. Takedown history: none.
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