Zero-Shot Classification
Transformers
Safetensors
English
modernbert
text-classification
instruct
natural-language-inference
nli
mnli
Instructions to use tasksource/ModernBERT-base-nli with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use tasksource/ModernBERT-base-nli with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("zero-shot-classification", model="tasksource/ModernBERT-base-nli")# Load model directly from transformers import AutoTokenizer, AutoModelForSequenceClassification tokenizer = AutoTokenizer.from_pretrained("tasksource/ModernBERT-base-nli") model = AutoModelForSequenceClassification.from_pretrained("tasksource/ModernBERT-base-nli") - Inference
- Notebooks
- Google Colab
- Kaggle