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") - Notebooks
- Google Colab
- Kaggle
Improve metadata, language name, small typos, code snippet output formatting
Hello @ybabakhin !
I looked over the model card, and it looks very solid! Super extensive, always good to see. I found a couple of points of improvements, most of which speak for themselves. The metadata as I'm proposing it now should allow this model to be found when filtering for either the Transformers or Sentence Transformers library name, as well as the vllm tag.
I also removed the processor_kwargs={"padding_side": "left"}, line from the Sentence Transformers snippet because that's already the padding side used in the configuration, so users don't have to specify it again.
Lastly, I noticed that I got this warning when running the Sentence Transformers snippet with the latest transformers / sentence-transformers:
[transformers] Unrecognized keys in `rope_parameters` for 'rope_type'='yarn': {'apply_yarn_scaling'}
Loading weights: 100%|ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ| 146/146 [00:00<00:00, 10029.95it/s]
[transformers] Unrecognized keys in `rope_parameters` for 'rope_type'='yarn': {'apply_yarn_scaling'}
[transformers] Unrecognized keys in `rope_parameters` for 'rope_type'='yarn': {'apply_yarn_scaling'}
That might be worth looking into some more to clean up the users' terminals!
- Tom Aarsen
Thanks @tomaarsen !
Yes, we are aware about that Unrecognized keys message. It was a workaround for the native vLLM support, we'll check it again for the latest vLLM release
Good to know. I think it's a harmless warning, and you could always add a little disclaimer on the model card that it's harmless if you can't easily remove it after the next vLLM release.
- Tom Aarsen
@tomaarsen I've put some more details on the scaling params compatiblity issue here