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
How to use for AutoModelForSequenceClassification?
#13
by deshwalmahesh - opened
I want to fine tune and test it for Sequence Classification. What steps should I follow?
Obviously, since the config is not there in Hf, it throwing ConFig Error with:
from transformers import AutoTokenizer, AutoModel, AutoModelForSequenceClassification
AutoModelForSequenceClassification.from_pretrained('nvidia/NV-Embed-v1', trust_remote_code=True, token = "hf_..")