microsoft/deberta-xlarge-mnli, fine-tuned for emotion detection
This is not microsoft/deberta-xlarge-mnli, which is a natural-language-inference model. It is that model fine-tuned on dair-ai/emotion for six-way emotion classification, and it is the accurate half of a pair.

Sensible
AnkitAI/deberta-xlarge-base-emotions-classifierSix-way emotion classification on the dair-ai/emotion dataset, built on DeBERTa-xlarge. The model emits sadness, joy, love, anger, fear and surprise; that label set comes from the model's config.json, which is what it actually returns. The card lists disgust in place of love and is wrong on that point. The head picks one of those six and nothing else, so emotionally neutral text is still assigned a label, and the dataset is short English social-media-register text — long documents and formal prose are out of distribution.
The base is microsoft/deberta-xlarge-mnli — a model fine-tuned for natural language inference, not a raw encoder. Starting from an NLI checkpoint for a classification task is a reasonable and fairly common choice, because NLI training produces representations that transfer well to sentence-level labelling.
This is the large half of a pair. It and the DeBERTa-v3-small version cover the same task on the same dataset; this one is for when accuracy matters more than latency, and it is roughly five times the size.
Its card reports 94.6% accuracy on the dair-ai/emotion test split, with precision 94.8%, recall 94.5% and F1 94.7%. One caveat, because it is the honest thing to do: the identical evaluation block appears on the DeBERTa-v3-small card too. That is a defect in the small model's card rather than evidence against this one — the figure is consistent with what a model this size achieves on this dataset — but a reader checking both cards will notice, and should know why.
The numbers
As reported on the model's own Hugging Face card, on the dair-ai/emotion test split.
| Metric | Value |
|---|---|
| Accuracy | 94.6% |
| Precision | 94.8% |
| Recall | 94.5% |
| F1 | 94.7% |
Quoted from the card, not re-measured here. The same block appears verbatim on the DeBERTa-v3-small card; see the note above.
Run it
from transformers import pipeline
clf = pipeline(
"text-classification",
model="AnkitAI/deberta-xlarge-base-emotions-classifier",
)
clf("I can't believe they pulled it off.")
# labels: sadness, joy, love, anger, fear, surpriseTry others
- microsoft/deberta-v3-small — six-way emotion classificationThe throughput half of the emotion pair — same task and dataset as the xlarge, small enough for CPU-bound work.
- answerdotai/ModernBERT-base — general sentiment analysisA drop-in upgrade for the distilbert-sst2 default: 0.9461 against 0.9130 on the same validation set.
Where to get it
- Base model
- microsoft/deberta-xlarge-mnli
- Training data
- dair-ai/emotion