Sentence Similarity
sentence-transformers
Safetensors
Transformers
ministral3
feature-extraction
text
text-embeddings
retrieval
semantic-search
rag
vllm
Instructions to use nvidia/Nemotron-3-Embed-1B-BF16 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- sentence-transformers
How to use nvidia/Nemotron-3-Embed-1B-BF16 with sentence-transformers:
from sentence_transformers import SentenceTransformer model = SentenceTransformer("nvidia/Nemotron-3-Embed-1B-BF16") 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 nvidia/Nemotron-3-Embed-1B-BF16 with Transformers:
# Load model directly from transformers import AutoTokenizer, AutoModel tokenizer = AutoTokenizer.from_pretrained("nvidia/Nemotron-3-Embed-1B-BF16") model = AutoModel.from_pretrained("nvidia/Nemotron-3-Embed-1B-BF16", device_map="auto") - Inference
- Notebooks
- Google Colab
- Kaggle
Update readme
#5
by anmolg-nvidia - opened
README.md
CHANGED
|
@@ -340,6 +340,8 @@ For BF16, use `vllm==0.25.0` for `/v2/embed` serving. NVIDIA also validated `vll
|
|
| 340 |
pip install --upgrade "vllm==0.25.0" openai requests numpy
|
| 341 |
```
|
| 342 |
|
|
|
|
|
|
|
| 343 |
### vLLM Offline Python
|
| 344 |
|
| 345 |
Use the offline Python API when you want local vLLM inference without running an HTTP server. `LLM.embed` accepts formatted strings, so add the `query: ` and `passage: ` prefixes manually.
|
|
|
|
| 340 |
pip install --upgrade "vllm==0.25.0" openai requests numpy
|
| 341 |
```
|
| 342 |
|
| 343 |
+
**FP8 acceleration:** On NVIDIA Hopper and Ada Lovelace GPUs, enable FP8 in vLLM online with `--quantization fp8_per_tensor`, or offline with `quantization="fp8_per_tensor"` in `LLM(...)`. Validated with vLLM `0.25.0` on H100; accuracy matched BF16.
|
| 344 |
+
|
| 345 |
### vLLM Offline Python
|
| 346 |
|
| 347 |
Use the offline Python API when you want local vLLM inference without running an HTTP server. `LLM.embed` accepts formatted strings, so add the `query: ` and `passage: ` prefixes manually.
|