Downloads · 30 days
16
44% of all-time downloads
HR26kk/modernbert-emotion-classifier
modernbert-emotion-classifier is a text classification model from HR26kk. Use it when you need a label for a piece of text. It is set up for transformers. The card lists the license as apache-2.0.
A fine-grained, 6-class emotion classification model built on top of answerdotai/ModernBERT-base (149M parameters) and trained on the dair-ai/emotion benchmark.
Downloads · 30 days
16
44% of all-time downloads
All-time downloads
36
Public
Parameters
150M
598 MB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors598 MB · 99%
From the Hugging Face model README
A fine-grained, 6-class emotion classification model built on top of answerdotai/ModernBERT-base (149M parameters) and trained on the dair-ai/emotion benchmark.
sadness, joy, love, anger, fear, surprise)| Evaluation Metric | Score |
|---|---|
| Accuracy | 92.25% |
| Macro F1 | 87.02% |
| Weighted F1 | 92.15% |
| Weighted Precision | 92.16% |
| Weighted Recall | 92.25% |
precision recall f1-score support
sadness 0.9652 0.9535 0.9593 581
joy 0.9371 0.9640 0.9504 695
love 0.8699 0.7987 0.8328 159
anger 0.9061 0.9127 0.9094 275
fear 0.8596 0.9018 0.8802 224
surprise 0.7736 0.6212 0.6891 66
from transformers import pipeline
classifier = pipeline("text-classification", model="HR26kk/modernbert-emotion-classifier")
result = classifier("I am genuinely proud of what we accomplished today.")
print(result)