Skip to content
Ankit Aglawe
Sensible· six-way emotion classification

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 owl mascot

Sensible

AnkitAI/deberta-xlarge-base-emotions-classifier
759M parametersMIT904 downloads, checked 2026-07-27

Six-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.

MetricValue
Accuracy94.6%
Precision94.8%
Recall94.5%
F194.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

Transformers
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, surprise

Try others

Where to get it

Base model
microsoft/deberta-xlarge-mnli
Training data
dair-ai/emotion