Views
No views yet
distilbert-base-uncased) fine-tuned on
GoEmotions
for multi-label classification across 28 emotion labels (27 emotions + neutral).| Base model | distilbert-base-uncased |
| Data | GoEmotions simplified — 43,410 train / 5,426 val / 5,427 test |
| Objective | BCEWithLogitsLoss (28 independent sigmoid outputs) |
| Epochs | 4 |
| Batch size | 32 |
| Learning rate | 3e-5, linear warmup (10%) then linear decay |
| Max sequence length | 64 tokens |
| Other | gradient clipping at norm 1.0 |
| Metric | Flat 0.5 threshold | Tuned per-class |
|---|---|---|
| Micro F1 | 0.584 | 0.598 |
| Macro F1 | 0.441 | 0.517 |
grief
the same weight as neutral and is the honest measure of whether 28 distinct things were
learned.inference_config.json alongside the taxonomy used by
the demo Space.1import json, torch
2from huggingface_hub import hf_hub_download
3from transformers import AutoModelForSequenceClassification, AutoTokenizer
4
5MODEL_ID = "RenDeniz/emotion-detective-v2"
6tok = AutoTokenizer.from_pretrained(MODEL_ID)
7model = AutoModelForSequenceClassification.from_pretrained(MODEL_ID).eval()
8cfg = json.load(open(hf_hub_download(MODEL_ID, "inference_config.json")))
9
10enc = tok("I can't keep up with any of this", return_tensors="pt",
11 truncation=True, max_length=cfg["max_length"])
12with torch.no_grad():
13 probs = torch.sigmoid(model(**enc).logits).squeeze(0)
14
15for i, p in enumerate(probs):
16 name = model.config.id2label[i]
17 if p >= cfg["thresholds"][name]:
18 print(f"{name}: {p:.2f}")grief, relief and pride have very few training examples and perform
near zero. This is a data limitation, not a tuning one.