Sentence Similarity
sentence-transformers
Safetensors
Transformers
gte
feature-extraction
mteb
multilingual
text-embeddings-inference
Eval Results (legacy)
Run this model with HF Jobs
Run Alibaba-NLP/gte-multilingual-base on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.
Paste one of these prompts into your coding agent:
Fine-tune on my dataset
Use HF Jobs to fine-tune https://huggingface.co/Alibaba-NLP/gte-multilingual-base. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.
Run batch inference
Use HF Jobs to run batch inference with https://huggingface.co/Alibaba-NLP/gte-multilingual-base on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
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") 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:
# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModel tokenizer = AutoTokenizer.from_pretrained("Alibaba-NLP/gte-multilingual-base") model = AutoModel.from_pretrained("Alibaba-NLP/gte-multilingual-base", device_map="auto") - Inference
- Notebooks
- Google Colab
- Kaggle
Usage infinity (#15)
Browse files- Update README.md (88dbdd2d07f7e40779df1c37bd944c6b2e540356)
Co-authored-by: Michael <michaelfeil@users.noreply.huggingface.co>
4715 unmodified lines4716471747184719472047214715 unmodified lines# [[0.301699697971344, 0.7503870129585266, 0.32030850648880005]]```### Use with custom code to get dense embeddigns and sparse token weights```python# You can find the script gte_embedding.py in https://huggingface.co/Alibaba-NLP/gte-multilingual-base/blob/main/scripts/gte_embedding.py4715 unmodified lines4716471747184719472047214722472347244725472647274728472947304715 unmodified lines# [[0.301699697971344, 0.7503870129585266, 0.32030850648880005]]```### Use with infinityUsage via docker and [infinity](https://github.com/michaelfeil/infinity), MIT Licensed.```docker run --gpus all -v $PWD/data:/app/.cache -p "7997":"7997" \michaelf34/infinity:0.0.69 \v2 --model-id Alibaba-NLP/gte-multilingual-base --revision "main" --dtype float16 --batch-size 32 --device cuda --engine torch --port 7997```### Use with custom code to get dense embeddigns and sparse token weights```python# You can find the script gte_embedding.py in https://huggingface.co/Alibaba-NLP/gte-multilingual-base/blob/main/scripts/gte_embedding.py
README.md+9