SAMO Emotion Classifier (multi‑label)
Multi‑label emotion detection for journal‑style text. Trained on GoEmotions and adapted for real‑world journaling. Outputs a probability for each emotion and a primary label.
Intended use
- Emotion analysis of short texts/journal entries
- UX insights, content moderation, well‑being apps
- Not a medical device; do not use for diagnosis or high‑risk decisions
Labels
The model predicts the GoEmotions set (27 emotions + neutral). Ensure id2label
/label2id
are present in the config.
How to use
from transformers import pipeline
clf = pipeline(
"text-classification",
model="0xmnrv/samo",
tokenizer="0xmnrv/samo",
top_k=None, # return all labels with scores
truncation=True
)
texts = [
"I am feeling really happy today!",
"I'm frustrated but hopeful."
]
print(clf(texts))
Or with logits/sigmoid manually:
from transformers import AutoTokenizer, AutoModelForSequenceClassification
import torch, torch.nn.functional as F
tok = AutoTokenizer.from_pretrained("0xmnrv/samo")
mdl = AutoModelForSequenceClassification.from_pretrained("0xmnrv/samo")
x = tok("I am feeling really happy today!", return_tensors="pt", truncation=True)
with torch.no_grad():
p = torch.sigmoid(mdl(**x).logits).squeeze(0)
id2label = mdl.config.id2label
scores = {id2label[i]: float(p[i]) for i in range(len(p))}
print(scores)
Training & data
- Base model:
roberta-base
- Dataset: GoEmotions (+ optional domain data if applicable)
- Objective: multi‑label classification (sigmoid + BCEWithLogits)
- Preprocessing: 512 max tokens, lowercase normalization
#Evaluation #- Report macro‑F1 and micro‑F1 on validation/test #- Example (replace with your numbers): #- Macro F1: #- Micro F1: #- Accuracy:
Limitations & bias
- May struggle with sarcasm/irony and long context
- Emotion distributions reflect GoEmotions and any domain data used
- Not suitable for clinical use
Safety & privacy
- Do not send PII unless you comply with your jurisdiction’s rules
- For sensitive content, prefer private repos and authenticated endpoints
Citation
If you use this model, please cite:
- GoEmotions: https://arxiv.org/abs/2005.00547
- Transformers: https://github.com/huggingface/transformers
- Downloads last month
- 22
Inference Providers
NEW
This model isn't deployed by any Inference Provider.
🙋
Ask for provider support
Model tree for 0xmnrv/samo
Base model
FacebookAI/roberta-baseDataset used to train 0xmnrv/samo
Evaluation results
- Macro F1 on GoEmotions (validation)validation set self-reported<fill>
- Micro F1 on GoEmotions (validation)validation set self-reported<fill>
- Accuracy on GoEmotions (validation)validation set self-reported<fill>