Text Classification
Transformers
English
nli
natural-language-inference
modernbert
sentence-similarity
abstention
selective-prediction
Instructions to use jmccardle/modernbert-nli-heads with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use jmccardle/modernbert-nli-heads with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="jmccardle/modernbert-nli-heads")# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("jmccardle/modernbert-nli-heads", dtype="auto") - Notebooks
- Google Colab
- Kaggle
| { | |
| "base_model": "answerdotai/ModernBERT-large", | |
| "nli_hidden_dim": 512, | |
| "nli_classes": 3, | |
| "abstention_hidden_dim": 128, | |
| "abstention_classes": 2, | |
| "nli_labels": [ | |
| "entailment", | |
| "neutral", | |
| "contradiction" | |
| ], | |
| "abstention_labels": [ | |
| "confident", | |
| "uncertain" | |
| ], | |
| "training": { | |
| "nli_epochs": 5, | |
| "nli_accuracy": 0.708, | |
| "abstention_epochs": 3, | |
| "abstention_accuracy": 0.6546, | |
| "abstention_recall": 0.766 | |
| } | |
| } |