Model reference · open weights

gte-large

Embeddings thenlper Embeddings 1 build Open weights 704k dl/mo

gte-large is an open-weight embedding model from thenlper. gte-large (FP16) weighs 670 MB; the smallest configuration that runs it is RTX 3060 12 GB.

  • gte-large is a 335M parameter sentence-similarity model developed by thenlper and trained by Alibaba DAMO Academy.
  • It supports English text with a 512-token context length and is licensed under the MIT license.
  • The model is designed for downstream tasks such as information retrieval, semantic textual similarity, and text reranking.

Summary of the thenlper/gte-large model card, 2026-10-01

What it is

Released bythenlper
Released2023-07-27
Parameters335M
VRAM670 MB for the weights

What it runs on

Memory and cards for gte-large (FP16)

670 MBweights, file size
1.1 GBruntime overhead
CardRunsMemory
RTX 3060 12 GBfits11.6 GB
RTX 4060 Ti 16 GBfits15.4 GB
RTX 3090 24 GBfits23.4 GB
RTX 4090 24 GBfits23.4 GB
RTX 5090 32 GBfits31.0 GB
L40S 48 GBfits44.0 GB
A100 80 GBfits78.2 GB
H100 80 GBfits78.1 GB
RTX PRO 6000 Blackwell 96 GBfits93.8 GB
DGX Spark (GB10) 128 GB unifiedfits107 GB
H200 141 GBfits138 GB
B200 180 GBfits176 GB

From the model card

What thenlper says about gte-large

Read the model card

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-large")
model = AutoModel.from_pretrained("thenlper/gte-large")

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

Quoted from the model card on Hugging Face. The full card is behind the Hugging Face link above.

Benchmarks

Reported results

As published on the model card: the maker's own numbers, not measured by AxForge.

TaskDatasetMetricScore
ClassificationMTEB AmazonCounterfactualClassification (en)accuracy72.627
ClassificationMTEB AmazonCounterfactualClassification (en)ap34.469
ClassificationMTEB AmazonCounterfactualClassification (en)f166.237
ClassificationMTEB AmazonPolarityClassificationaccuracy92.518
ClassificationMTEB AmazonPolarityClassificationap89.498
ClassificationMTEB AmazonPolarityClassificationf192.511
ClassificationMTEB AmazonReviewsClassification (en)accuracy49.074
ClassificationMTEB AmazonReviewsClassification (en)f148.448
RetrievalMTEB ArguAnamap_at_132.077
RetrievalMTEB ArguAnamap_at_1048.153
RetrievalMTEB ArguAnamap_at_10048.963
RetrievalMTEB ArguAnamap_at_100048.966
RetrievalMTEB ArguAnamap_at_343.184
RetrievalMTEB ArguAnamap_at_546.072
RetrievalMTEB ArguAnamrr_at_133.073
RetrievalMTEB ArguAnamrr_at_1048.540
RetrievalMTEB ArguAnamrr_at_10049.335
RetrievalMTEB ArguAnamrr_at_100049.338
RetrievalMTEB ArguAnamrr_at_343.563
RetrievalMTEB ArguAnamrr_at_546.383
RetrievalMTEB ArguAnandcg_at_132.077
RetrievalMTEB ArguAnandcg_at_1057.158
RetrievalMTEB ArguAnandcg_at_10060.325
RetrievalMTEB ArguAnandcg_at_100060.402
© 2026 AxForge · EU-hosted AI infrastructure Pricing Docs Trust Privacy Terms