HR26kk/modernbert-emotion-classifier
034
ModernBERT Emotion Classifier
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.
Model Details
- Architecture: ModernBERT Encoder with Sequence Classification Head
- Context Length: 8,192 tokens native support
- Embedding Dimension: 768
- Number of Labels: 6 (
sadness,joy,love,anger,fear,surprise) - Weights Format: SafeTensors
Quantitative Benchmark Results (Test Split)
Classification Breakdown
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 66Usage Example
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)