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'); - Notebooks
- Google Colab
- Kaggle
fix: readme to new transformers version
Browse files
README.md
CHANGED
|
@@ -2923,10 +2923,10 @@ Trained on the [Nomic Embed](https://arxiv.org/abs/2402.01613) weakly-supervised
|
|
| 2923 |
|
| 2924 |
## Usage
|
| 2925 |
|
| 2926 |
-
You can use these models directly with the
|
| 2927 |
|
| 2928 |
```bash
|
| 2929 |
-
pip install
|
| 2930 |
```
|
| 2931 |
|
| 2932 |
Reminder, this model is trained similarly to Nomic Embed and **REQUIRES** prefixes to be added to the input. For more information, see the instructions in [Nomic Embed](https://huggingface.co/nomic-ai/nomic-embed-text-v1.5#task-instruction-prefixes).
|
|
|
|
| 2923 |
|
| 2924 |
## Usage
|
| 2925 |
|
| 2926 |
+
You can use these models directly with the latest transformers release and requires installing `transformers>=4.48.0`:
|
| 2927 |
|
| 2928 |
```bash
|
| 2929 |
+
pip install transformers>=4.48.0
|
| 2930 |
```
|
| 2931 |
|
| 2932 |
Reminder, this model is trained similarly to Nomic Embed and **REQUIRES** prefixes to be added to the input. For more information, see the instructions in [Nomic Embed](https://huggingface.co/nomic-ai/nomic-embed-text-v1.5#task-instruction-prefixes).
|