Instructions to use nvidia/NV-Embed-v1 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- sentence-transformers
How to use nvidia/NV-Embed-v1 with sentence-transformers:
from sentence_transformers import SentenceTransformer model = SentenceTransformer("nvidia/NV-Embed-v1", trust_remote_code=True) 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] - Notebooks
- Google Colab
- Kaggle
Matryoshka Embedding
#24
by XingyanZhang - opened
Is there any plan to support Matryoshka Embedding? It's a technique that allows for the generation of embeddings that remain useful even when truncated to smaller sizes, thus enabling faster processing and reduced storage requirements without significant loss in performance. https://huggingface.co/blog/matryoshka
Hi, @XingyanZhang . Thanks a lot for the suggestion. While we do not support in this version of NV-Embed, we consider adding Matryoshka Representation Learning (MRL) to next release of NV-Embed.