The GTE models are trained by Alibaba DAMO Academy. They are mainly based on the BERT framework and currently offer different sizes of models for both Chinese and English Languages. 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.
We compared the performance of the GTE models with other popular text embedding models on the MTEB (CMTEB for Chinese language) benchmark. For more detailed comparison results, please refer to the MTEB leaderboard.
1from sentence_transformers import SentenceTransformer
2from sentence_transformers.util import cos_sim
34sentences =['That is a happy person','That is a very happy person']56model = SentenceTransformer('thenlper/gte-large-zh')7embeddings = model.encode(sentences)8print(cos_sim(embeddings[0], embeddings[1]))
Limitation
This model exclusively caters to Chinese 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}
}