Sentence Similarity
sentence-transformers
ONNX
Safetensors
Transformers.js
English
modernbert
feature-extraction
mteb
Eval Results (legacy)
text-embeddings-inference
Instructions to use nomic-ai/modernbert-embed-base with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- sentence-transformers
How to use nomic-ai/modernbert-embed-base with sentence-transformers:
from sentence_transformers import SentenceTransformer model = SentenceTransformer("nomic-ai/modernbert-embed-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 nomic-ai/modernbert-embed-base with Transformers.js:
// npm i @huggingface/transformers import { pipeline } from '@huggingface/transformers'; // Allocate pipeline const pipe = await pipeline('sentence-similarity', 'nomic-ai/modernbert-embed-base'); - Inference
- Notebooks
- Google Colab
- Kaggle
Fix typo; update README script + specific MRL snippets
#2
by tomaarsen HF Staff - opened
Hello!
Pull Request overview
- Fix typo: brining -> bringing
- Reformat table with http://markdowntable.com, add bold to strongest results
- Update the usage snippets; separate MRL and non-MRL snippets with
<details>
Details
The usage snippets now also give a "real" example, i.e. with actual comparison between query and document values.
Beyond that, you might be fixed on the current model name, but including base might be a useful addition in the model name. Something to think about, perhaps.
- Tom Aarsen
Some other comments:
- The performance table has no data for
nomic-embed-text-v1.5its Summarization performance, was this a mistake? - The
Overall/Summ (1)column header should probably be replaced withSummarization (1)
tomaarsen changed pull request status to open
zpn changed pull request status to merged