This Tiny 125M Model Detects 28 Human Emotions and Gets 1M Monthly Downloads
A compact RoBERTa model fine-tuned on Reddit comments predicts 28 distinct emotions from text, and it has quietly crossed a million monthly downloads.
Takeaways
- A RoBERTa fine-tune on go_emotions classifies English text into 28 emotion labels with multi-label output.
- The model has crossed 961k monthly downloads and 692 likes on Hugging Face.
- Trained 3 epochs from roberta-base, learning rate 2e-5, weight decay 0.01, MIT licensed.
- Aggregate F1 of 0.45 at default threshold, rising to 0.61 weighted with per-label thresholds.
- Rare labels like grief, pride, and relief collapse due to sparse training examples.
- ONNX and INT8 quantized builds cut file size 75% while keeping most accuracy.
A 125 million-parameter classifier that maps English text to 28 emotion labels has become one of Hugging Face’s most downloaded models, drawing nearly one million monthly downloads. The sustained demand for SamLowe/roberta-base-go_emotions comes from a practical combination: local inference, a fixed output schema, and more emotional detail than a positive-or-negative sentiment model provides.
Hugging Face’s counter reflects model-file requests and leaves unique-user and production-deployment counts unknown. Even with that caveat, the activity shows strong interest in a focused classifier that can run without a hosted language-model API.
The model fine-tunes roberta-base on Google Research’s GoEmotions corpus. Its classification head emits one sigmoid score for each label, allowing a sentence to receive several tags, such as admiration and curiosity. The scores do not sum to one, and teams should verify their calibration before treating them as probabilities.
Twenty-seven emotions, plus neutral
The GoEmotions dataset contains roughly 58,000 English Reddit comments annotated with 27 emotions and a neutral category. Its multi-label design allows annotators to assign several emotions to the same comment.
admiration,amusement,anger,annoyance,approval,caring,confusioncuriosity,desire,disappointment,disapproval,disgust,embarrassment,excitementfear,gratitude,grief,joy,love,nervousness,optimismpride,realization,relief,remorse,sadness,surprise,neutral
That taxonomy supports tasks where polarity alone loses useful information. A support system might route confusion differently from anger, while a product team could separate curiosity from approval when reviewing feature feedback.
From one string to 28 scores
The Transformers pipeline can load the model and return every label score. Setting top_k=None prevents the pipeline from discarding lower-ranked labels.
from transformers import pipeline
classifier = pipeline(
task="text-classification",
model="SamLowe/roberta-base-go_emotions",
top_k=None,
)
scores = classifier(["I am not having a great day"])[0]
selected = [
item for item in scores
if item["score"] >= 0.5
]
print(selected)
A fixed threshold of 0.5 offers a simple baseline, but it produces uneven results because label frequency and score distributions vary widely. Production systems should select separate thresholds on a representative validation set, then measure the final configuration once on an untouched test set.
RoBERTa-base accepts sequences of up to 512 tokens, including special tokens. Applications processing tickets, transcripts, or documents must define a truncation or chunking policy and decide how to combine scores across chunks. The classifier also evaluates only the supplied text; conversation history and speaker context must be included explicitly when they matter.
The model card lists an MIT license, which permits commercial use subject to its terms. Deployers should also review the dataset terms, privacy requirements, and rules that apply to their product and jurisdiction.
Three epochs and a standard head
Training used AutoModelForSequenceClassification.from_pretrained with problem_type="multi_label_classification". The published recipe is compact:
| Setting | Value |
|---|---|
| Base encoder | roberta-base |
| Training epochs | 3 |
| Learning rate | 2e-5 |
| Weight decay | 0.01 |
| Task | Multi-label sequence classification |
The conventional recipe makes the checkpoint straightforward to reproduce, adapt to another encoder, or continue training on domain-specific examples. Any added labels require new annotated data and a resized classification head.
Thresholds decide the tradeoff
At a global 0.5 threshold, the model card reports accuracy of 0.474, precision of 0.575, recall of 0.396, and F1 of 0.450. The relatively high precision and lower recall show that this cutoff misses many applicable labels.
| Evaluation setting | Precision | Recall | F1 |
|---|---|---|---|
Global threshold of 0.5 |
0.575 | 0.396 | 0.450 |
| Per-label optimized thresholds | 0.542 | 0.577 | 0.541 |
| Support-weighted, optimized thresholds | 0.572 | 0.677 | 0.611 |
The tuned figures show how strongly cutoff selection affects this model. Thresholds chosen on the evaluation data can overstate generalization, so deployment thresholds belong in the validation process.
Per-label F1 also exposes large differences across the taxonomy:
- Strong:
gratitudescores 0.919,amusement0.829,love0.802,admiration0.699, andfear0.671. - Middle range:
anger,sadness,joy, andcuriosityfall between 0.42 and 0.60. - Weak at 0.5:
grief,pride, andreliefeach score 0.000.
Rare labels set the ceiling
The zero F1 scores at a 0.5 threshold indicate that the classifier produced no successful positive predictions for those labels under that decision rule. They do not establish that the underlying scores contain no useful ranking signal.
Class imbalance explains part of the gap. The training split contains fewer than 100 relief examples among more than 40,000 rows, and the test split contains only 11. Metrics for such small groups are unstable, while the model receives little evidence from which to learn their boundaries.
Annotation ambiguity and labeling errors create another constraint. Emotional categories overlap, and short Reddit comments often depend on sarcasm, thread context, community conventions, or prior messages. Similar inputs can therefore receive inconsistent labels even before model error enters the calculation.
Domain shift adds further uncertainty. The training corpus reflects English Reddit language, so performance can change on formal documents, customer-support conversations, medical text, speech transcripts, or text from other platforms. Non-English use requires a multilingual model or new training data.
Why the small model keeps finding work
Several engineering properties make the checkpoint useful despite its uneven label performance:
- Local inference: A 125 million-parameter encoder can run on commodity CPU or GPU hardware without sending text to an external API.
- Fixed schema: Every request returns the same 28 labels and numeric scores, eliminating prompt design and free-form response parsing.
- Multi-label output: The model can preserve overlapping signals such as
sadness,disappointment, andremorse. - Compact adaptation: Teams can fine-tune the checkpoint on internal examples at far lower cost than training a foundation model.
- Broad tooling support: The model tree includes numerous fine-tunes, and more than 100 Hugging Face Spaces use the checkpoint.
An ONNX release includes an INT8 quantized variant. Quantization cuts the model file size by about 75 percent and can improve low-batch inference speed while reducing the runtime footprint. Hardware, sequence length, and execution provider determine the actual latency, so teams should benchmark the target environment and verify accuracy after conversion.
A deployment checklist
Support triage, feedback analysis, community moderation, emotion-aware speech systems, and review analytics are plausible applications when the labels match the product’s needs. High-impact decisions require human review, documented error rates, and monitoring across relevant user groups.
- Validate performance on text from the intended domain.
- Tune thresholds separately for each label.
- Track precision and recall by label, especially for rare classes.
- Define truncation, chunking, and aggregation behavior for long inputs.
- Benchmark latency and memory on the target hardware.
- Monitor drift as language, products, and user populations change.
- Fine-tune on domain-specific annotations when baseline errors are unacceptable.
Teams requiring only positive, negative, and neutral sentiment can use a smaller classifier with a simpler decision boundary. Projects that need the GoEmotions taxonomy can treat this checkpoint as a reproducible baseline and adapt it with representative data, calibrated thresholds, and application-specific evaluation.