Sentence Similarity
sentence-transformers
Safetensors
Transformers
new
feature-extraction
mteb
multilingual
text-embeddings-inference
custom_code
Eval Results (legacy)
Instructions to use Alibaba-NLP/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/gte-multilingual-base with sentence-transformers:
from sentence_transformers import SentenceTransformer model = SentenceTransformer("Alibaba-NLP/gte-multilingual-base", trust_remote_code=True) 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/gte-multilingual-base with Transformers:
# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("Alibaba-NLP/gte-multilingual-base", trust_remote_code=True, dtype="auto") - Notebooks
- Google Colab
- Kaggle
Inference Endpoints for text embeddings are not working
#6
by nicolas-devatine - opened
Hello,
I'm trying to create an huggingface inference endpoint with your model for text embeddings inference (https://ui.endpoints.huggingface.co/) but it seems that it is not working with your model. I got this error when initializing the endpoint: Error: 'config.json' does not contain 'id2label'. Also, it seems the Inference API on your page is not working.
But your model is tagged as compatible with inference endpoints. Is it possible to correct this error?
Thank you for your help and for the great model.