Sentence Similarity
sentence-transformers
Safetensors
Transformers
gte
mteb
multilingual
text-embeddings-inference
Eval Results (legacy)
Instructions to use alibaba-nlp-community/gte-multilingual-base with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- sentence-transformers
How to use alibaba-nlp-community/gte-multilingual-base with sentence-transformers:
from sentence_transformers import SentenceTransformer model = SentenceTransformer("alibaba-nlp-community/gte-multilingual-base") sentences = [ "The weather is lovely today.", "It's so sunny outside!", "He drove to the stadium." ] embeddings = model.encode(sentences) similarities = model.similarity(embeddings, embeddings) print(similarities.shape) # [3, 3] - Transformers
How to use alibaba-nlp-community/gte-multilingual-base with Transformers:
# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModel tokenizer = AutoTokenizer.from_pretrained("alibaba-nlp-community/gte-multilingual-base") model = AutoModel.from_pretrained("alibaba-nlp-community/gte-multilingual-base", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Commit History
17 days ago
-
feat(transformers): Add native Transformers checkpoint
Verified signature→ Copied from [Alibaba-NLP/gte-multilingual-base](https://huggingface.co/Alibaba-NLP/gte-multilingual-base/tree/9bbca17d9273fd0d03d5725c7a4b0f6b45142062) at `9bbca17d9273fd0d03d5725c7a4b0f6b45142062`, the weights and tokenizer are unchanged. → `config.json` sets `model_type` from `new` to `gte` and drops `auto_map`, so the checkpoint loads natively in Transformers without `trust_remote_code`. → `rope_scaling` (`ntk`) and `rope_theta` are replaced by the equivalent `linear` `rope_parameters`. → The model card is the original one, with the Transformers and sentence-transformers snippets pointing here.fdaec56