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
Update README.md
Browse files123---license: apache-2.0---1234567891011121314151617181920212223242526272829303132---tags:- mteb- sentence-transformers- transformers- multilingual- sentence-similaritylicense: apache-2.0---## gte-multilingual-baseThe **gte-multilingual-base** model is the latest in the [GTE](https://huggingface.co/collections/Alibaba-NLP/gte-models-6680f0b13f885cb431e6d469) (General Text Embedding) family of models, featuring several key attributes:- **High Performance**: Achieves state-of-the-art (SOTA) results in multilingual retrieval tasks and multi-task representation model evaluations when compared to models of similar size.- **Training Architecture**: Trained using an encoder-only transformers architecture, resulting in a smaller model size. Unlike previous models based on decode-only LLM architecture (e.g., gte-qwen2-1.5b-instruct), this model has lower hardware requirements for inference, offering a 10x increase in inference speed.- **Long Context**: Supports text lengths up to **8192** tokens.- **Multilingual Capability**: Supports over **70** languages.- **Elastic Dense Embedding**: Support elastic output dense representation while maintaining the effectiveness of downstream tasks, which significantly reduces storage costs and improves execution efficiency.- **Sparse Vectors**: In addition to dense representations, it can also generate sparse vectors.## Model Information- Model Size: 304M- Embedding Dimension: 768- Max Input Tokens: 8192## Requirements```transformers>=4.39.2flash_attn>=2.5.6```## Usage
README.md+32-3