Instructions to use Alibaba-NLP/gte-modernbert-base with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Alibaba-NLP/gte-modernbert-base with Transformers:
# Load model directly from transformers import AutoTokenizer, AutoModel tokenizer = AutoTokenizer.from_pretrained("Alibaba-NLP/gte-modernbert-base") model = AutoModel.from_pretrained("Alibaba-NLP/gte-modernbert-base") - sentence-transformers
How to use Alibaba-NLP/gte-modernbert-base with sentence-transformers:
from sentence_transformers import SentenceTransformer model = SentenceTransformer("Alibaba-NLP/gte-modernbert-base") sentences = [ "That is a happy person", "That is a happy dog", "That is a very happy person", "Today is a sunny day" ] embeddings = model.encode(sentences) similarities = model.similarity(embeddings, embeddings) print(similarities.shape) # [4, 4] - Transformers.js
How to use Alibaba-NLP/gte-modernbert-base with Transformers.js:
// npm i @huggingface/transformers import { pipeline } from '@huggingface/transformers'; // Allocate pipeline const pipe = await pipeline('sentence-similarity', 'Alibaba-NLP/gte-modernbert-base'); - Inference
- Notebooks
- Google Colab
- Kaggle
Entering on MTEB
Hello!
Are you planning on submitting this model to MTEB by adding the MTEB scores to this model's metadata? I think it would be very valuable if this model was easier to find via MTEB.
- Tom Aarsen
Hi, Tom,
We will submit the results after the Chinese Lunar New Year holiday (approximately one week later).
- Dingkun Long.
Sounds great! Happy new year and enjoy your time off!
- Tom Aarsen
As a heads up: MTEB is undergoing sizable updates to prepare it for better multilingual support and an updated English dataset collection. Check out the updated documentation for adding a new model: https://github.com/embeddings-benchmark/mteb/blob/main/docs/adding_a_model.md
- Tom Aarsen
As a heads up: MTEB is undergoing sizable updates to prepare it for better multilingual support and an updated English dataset collection. Check out the updated documentation for adding a new model: https://github.com/embeddings-benchmark/mteb/blob/main/docs/adding_a_model.md
- Tom Aarsen
Updated now. But in the new version of mteb, it only be seen on the "zero shot allow all" setting.
