Feature Extraction
Transformers
Safetensors
sentence-transformers
English
nvembed
mteb
custom_code
Eval Results (legacy)
Instructions to use nvidia/NV-Embed-v2 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use nvidia/NV-Embed-v2 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("feature-extraction", model="nvidia/NV-Embed-v2", trust_remote_code=True)# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("nvidia/NV-Embed-v2", trust_remote_code=True, dtype="auto") - sentence-transformers
How to use nvidia/NV-Embed-v2 with sentence-transformers:
from sentence_transformers import SentenceTransformer model = SentenceTransformer("nvidia/NV-Embed-v2", 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
Instruction for classification task.
#4
by anhnhHUST4511 - opened
Could you provide instruction for classification task?
We have used the same instructions as NV-Embed-v1 for evaluation (https://arxiv.org/pdf/2405.17428 Table7):
AmazonCounterfactualClassification: Classify a given Amazon customer review text as either counterfactual or not-counterfactual
AmazonPolarityClassification: Classify Amazon reviews into positive or negative sentiment
AmazonReviewsClassification: Classify the given Amazon review into its appropriate rating category
Banking77Classification: Given a online banking query, find the corresponding intents
EmotionClassification: Classify the emotion expressed in the given Twitter message into one of the six emotions:anger, fear, joy, love, sadness, and surprise
ImdbClassification: Classify the sentiment expressed in the given movie review text from the IMDB dataset
MassiveIntentClassification: Given a user utterance as query, find the user intents
MassiveScenarioClassification: Given a user utterance as query, find the user scenarios
MTOPDomainClassification: Classify the intent domain of the given utterance in task-oriented conversation
MTOPIntentClassification: Classify the intent of the given utterance in task-oriented conversation
ToxicConversationsClassification: Classify the given comments as either toxic or not toxic
TweetSentimentExtractionClassification: Classify the sentiment of a given tweet as either positive, negative, or neutral
Feel free to make your own instruction for your specific task.
nada5 changed discussion status to closed