From: thenlper <huggingface.co/thenlper>Newsgroups: alt.freeweights.embedSubject:

gte-small

Date: 2026-11-15Commit: 17e1f34Signed: 2DC28CC7B26A283B ✓

Sentence similarity model with 33M parameters. Coreml and onnx and openvino and safetensors weights, 803 MB in all. Published by thenlper under MIT.

33M params803MBgte-smallcoreml onnx openvino safetensorspermissive
FactsParams33MSize803 MBFormatscoreml, onnx, openvino, safetensorsTasksentence similarityLicenseMITFrom sourcepermissive
$ fw get thenlper/gte-small
# manifest sha256 38bec881a789… · 803 MB · 23 files
$ fw verify ./gte-small thenlper/gte-small
From sourceHosted (signed)thenlper/gte-smallLast check: 2026-11-15 02:25 UTC

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

Works with

Evaluate with

Overview

Size
803 MB
Weights
66.7 MB (safetensors)
Parameters
33M
Formats
coreml, onnx, openvino, safetensors
Task
sentence similarity
License
MIT (permissive)
Files
23, each with a sha256
Publisher
thenlper
Added
2026-11-15
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-15 02:25 UTCpassed

Model card

From the publisher at commit 17e1f34. Shown as plain text with links; images open at the publisher.

gte-small#

General Text Embeddings (GTE) model. Towards General Text Embeddings with Multi-stage Contrastive Learning

The GTE models are trained by Alibaba DAMO Academy. They are mainly based on the BERT framework and currently offer three different sizes of models, including GTE-large, GTE-base, and GTE-small. The GTE models are trained on a large-scale corpus of relevance text pairs, covering a wide range of domains and scenarios. This enables the GTE models to be applied to various downstream tasks of text embeddings, including information retrieval, semantic textual similarity, text reranking, etc.

Metrics#

We compared the performance of the GTE models with other popular text embedding models on the MTEB benchmark. For more detailed comparison results, please refer to the MTEB leaderboard.

Model NameModel Size (GB)DimensionSequence LengthAverage (56)Clustering (11)Pair Classification (3)Reranking (4)Retrieval (15)STS (10)Summarization (1)Classification (12)
gte-large0.67102451263.1346.8485.0059.1352.2283.3531.6673.33
gte-base0.2276851262.3946.284.5758.6151.1482.331.1773.01
e5-large-v21.34102451262.2544.4986.0356.6150.5682.0530.1975.24
e5-base-v20.4476851261.543.8085.7355.9150.2981.0530.2873.84
gte-small0.0738451261.3644.8983.5457.749.4682.0730.4272.31
text-embedding-ada-002-1536819260.9945.984.8956.3249.2580.9730.870.93
e5-small-v20.1338451259.9339.9284.6754.3249.0480.3931.1672.94
sentence-t5-xxl9.7376851259.5143.7285.0656.4242.2482.6330.0873.42
all-mpnet-base-v20.4476851457.7843.6983.0459.3643.8180.2827.4965.07
sgpt-bloom-7b1-msmarco28.274096204857.5938.9381.955.6548.2277.7433.666.19
all-MiniLM-L12-v20.1338451256.5341.8182.4158.4442.6979.827.963.21
all-MiniLM-L6-v20.0938451256.2642.3582.3758.0441.9578.930.8163.05
contriever-base-msmarco0.4476851256.0041.182.5453.1441.8876.5130.3666.68
sentence-t5-base0.2276851255.2740.2185.1853.0933.6381.1431.3969.81

Usage#

Code example

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

def average_pool(last_hidden_states: Tensor,
                 attention_mask: Tensor) -> Tensor:
    last_hidden = last_hidden_states.masked_fill(~attention_mask[..., None].bool(), 0.0)
    return last_hidden.sum(dim=1) / attention_mask.sum(dim=1)[..., None]

input_texts = [
    "what is the capital of China?",
    "how to implement quick sort in python?",
    "Beijing",
    "sorting algorithms"
]

tokenizer = AutoTokenizer.from_pretrained("thenlper/gte-small")
model = AutoModel.from_pretrained("thenlper/gte-small")

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

outputs = model(**batch_dict)
embeddings = average_pool(outputs.last_hidden_state, batch_dict['attention_mask'])

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

Use with sentence-transformers:

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('thenlper/gte-large')
embeddings = model.encode(sentences)
print(cos_sim(embeddings[0], embeddings[1]))
Limitation#

This model exclusively caters to English texts, and any lengthy texts will be truncated to a maximum of 512 tokens.

Citation#

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

@article{li2023towards,
  title={Towards general text embeddings with multi-stage contrastive learning},
  author={Li, Zehan and Zhang, Xin and Zhang, Yanzhao and Long, Dingkun and Xie, Pengjun and Zhang, Meishan},
  journal={arXiv preprint arXiv:2308.03281},
  year={2023}
}

Files

23 files · 803 MBWeights 66.7 MB (safetensors). Sizes and sha256 from the signed manifest.
Show all 23 files with their sha256
FileSizesha256
.gitattributes1.52 KB11ad7efa24975ee4b0c3c3a38ed18737f0658a5f75a0a96787b576a78a023361
1_Pooling/config.json190 B4be450dde3b0273bb9787637cfbd28fe04a7ba6ab9d36ac48e92b11e350ffc23
README.md68.1 KBf3396a9e72f5cde0c3b45a62e57efd8643a7fa6d68966a97aa7e9ace1f70dd69
config.json583 B00273cdfb3e05c7304d180270bdef8adae45023e7bdfc396338bdd815943dc59
coreml/feature-extraction/float32_model.mlpackage/Data/com.apple.CoreML/model.mlmodel122 KB33e5309eae5adc5d19d5421def0ad5ec9dfc462546bab56fc986a189a3c4e45a
coreml/feature-extraction/float32_model.mlpackage/Data/com.apple.CoreML/weights/weight.bin133 MBd6d0949a2bd68a0de745908f51f9d4b868fcbb6ebf2fc41bd3a01df80cf95846
coreml/feature-extraction/float32_model.mlpackage/Manifest.json617 Bbaf380b78160021e529f760dac6dfd46372199ceacf6e6390cb500539d9a6652
model.safetensors66.7 MB9a1eb90bbac323ea08aa5629b624fe6ae75db121b904799c2266a1e2c2de22d2
modules.json385 B73348a3d8f8ae4cc5f851dc6b98be3ea819390b814e83656d5eebbadf75fe43e
onnx/model.onnx133 MB0b01312b59bec0a2558a626f2937be4cbe4bb16d1511560153f598cec488f1f8
onnx/model_O4.onnx66.6 MBf39634c5a62a4337dd141b343df8df7f6ee7eaa8606e7882d2c893cd3671c795
onnx/model_qint8_avx512_vnni.onnx34.1 MBc9434b8d71617919a3ef61f1fafea4b15b4e02d782cc287623158713881e34cd
openvino/openvino_model.bin133 MB6202050706e8482a98a95c6d85849be7111612e735ea161ebe4b0b826a5fd039
openvino/openvino_model.xml363 KB4bf28acc12d94d8095cacb8833c97555e2f1dbbaa991dd39dbc233b0e0978e37
openvino/openvino_model_qint8_quantized.bin33.8 MBfa05bae0e1b00f49ff69cfb37b894da10601ccb1a4f55879dfc4c5063cc999ca
openvino/openvino_model_qint8_quantized.xml664 KBb02de0eb369c994d2d4af06a9d361e2210c76d296bab127714a47be6034d5727
pytorch_model.bin66.8 MB344099675ecefb2dc886e6dcc1fba7ccc0c66dbf455e8aa289035ee8d688f125
sentence_bert_config.json57 B948201d8329907aae938fa62f9ceeed53f5694dacc2b87b9f3b78b37ee986529
special_tokens_map.json125 Bb6d346be366a7d1d48332dbc9fdf3bf8960b5d879522b7799ddba59e76237ee3
tf_model.h5134 MB38d78f5cca85e9bfb60faf70f29d28f0946f3d8caba6f82cc45766e8cdfdc036
tokenizer.json712 KBda0e79933b9ed51798a3ae27893d3c5fa4a201126cef75586296df9b4d2c62a0
tokenizer_config.json394 Be1790949631401af1bfb6c9c7aeec7fcf612e274d73579d99f704faea40c8ba7
vocab.txt232 KB07eced375cec144d27c900241f3e339478dec958f92fddbc551f295c992038a3
VersionsEach time the pinned upstream commit or file list changed in this repo. Newest first.
Upstream commitDateContents
17e1f347d1 pinned now2026-11-15 02:25 UTC23 files · 803 MB

Use it

$ fw get thenlper/gte-small
# manifest sha256 38bec881a789… · 803 MB · 23 files
$ fw verify ./gte-small thenlper/gte-small
fw.pyChecks the signature and every sha256, tries each source in order, resumes.
$ python3 fw.py get https://freeweights.allternit.com/manifests/thenlper/gte-small.json --dir ./gte-small $ python3 fw.py verify ./gte-small ./thenlper__gte-small.json
hfThe Hugging Face CLI with one setting. Same repo id.
$ HF_ENDPOINT=https://freeweights.allternit.com hf download thenlper/gte-small --revision 17e1f347d17fe144873b1201da91788898c639cd --local-dir ./gte-small
transformersLoad the weights in Python.
import os os.environ["HF_ENDPOINT"] = "https://freeweights.allternit.com" from transformers import AutoModel, AutoTokenizer tok = AutoTokenizer.from_pretrained("thenlper/gte-small", revision="17e1f347d17fe144873b1201da91788898c639cd") model = AutoModel.from_pretrained("thenlper/gte-small", revision="17e1f347d17fe144873b1201da91788898c639cd", 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("thenlper/gte-small", revision="17e1f347d17fe144873b1201da91788898c639cd") vectors = model.encode(["Hello"])

License

Name
MIT License
Id
MIT
Class
Permissive
Redistribution
yes
Listing
Hosted (signed)
Decided
License as declared by the publisher. No person read it. 2026-11-15
Text in
README.md
Text sha256
f3396a9e72f5cde0c3b45a62e57efd8643a7fa6d68966a97aa7e9ace1f70dd69
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: thenlper <huggingface.co/thenlper>Newsgroups: alt.freeweights.embedSubject: gte-smallDate: 2026-11-15Commit: 17e1f34Signed: 2DC28CC7B26A283B ✓
Upstream
thenlper/gte-small
Pinned commit
17e1f347d17fe144873b1201da91788898c639cd
Manifest
gte-small.json · .minisig
Manifest sha256
38bec881a789964abf817bbfe81368ae3a14d5c17f369dc2bf60a663a9ee621e
Signature
minisign, Ed25519, key 2DC28CC7B26A283B
Created
2026-11-15 02:25 UTC
Generator
freeweights-manifest/0.1.0
Takedowns
None.

How to verify

$ curl -O https://freeweights.allternit.com/manifests/thenlper/gte-small.json $ curl -O https://freeweights.allternit.com/manifests/thenlper/gte-small.json.minisig $ minisign -Vm gte-small.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
Quantizations 1
Get it
Download
$ HF_ENDPOINT=https://freeweights.allternit.com hf download thenlper/gte-small
Open in Freeweights Studio

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

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

Variants

1 quantized or adapter build of gte-small. 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