How to use tasksource/ModernBERT-large-nli with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("zero-shot-classification", model="tasksource/ModernBERT-large-nli")
# Load model directly from transformers import AutoTokenizer, AutoModelForSequenceClassification tokenizer = AutoTokenizer.from_pretrained("tasksource/ModernBERT-large-nli") model = AutoModelForSequenceClassification.from_pretrained("tasksource/ModernBERT-large-nli")
when I use the model to infer premise = "一共有10个苹果, 我吃掉了6个", hypothesises = "还剩下4个苹果". I got result: "contradiction".
· Sign up or log in to comment