text-classification Β· text Β· WASM Β· ~125 MB
Binary sentiment tells you positive or negative. This RoBERTa model, fine-tuned on Google's GoEmotions, is multi-label: it scores text across 28 distinct emotions β gratitude, curiosity, annoyance, grief, prideβ¦ β each with its own independent confidence. Several can fire at once. Type below and watch the whole emotional profile light up, all on-device.
| Model | SamLowe/roberta-base-go_emotions-onnx |
|---|---|
| Task / pipeline | text-classification (multi-label) |
| Labels | 28 GoEmotions classes + neutral; per-class sigmoid (scores are independent, don't sum to 1) |
| Architecture | RoBERTa-base (125M params) fine-tuned on the GoEmotions corpus (58k Reddit comments) |
| Quantization | q8 (8-bit) ONNX |
| Backend | WebAssembly (runs anywhere; no WebGPU needed) |
| Download | ~125 MB, cached after first load |
| License | MIT |
| Web APIs | WebAssembly, Web Workers β all Baseline widely available |
Type anything. The emotional profile re-scores automatically (debounced) a moment after you stop typing. The pills show every emotion above the threshold β often more than one.
This is the model's raw output: one independent probability per class, from a sigmoid β not a softmax. That's the whole point of multi-label. A softmax would force the 28 scores to compete and sum to 1 (pick one winner); a sigmoid lets "gratitude" and "relief" both be 0.9 because they aren't mutually exclusive. Drag the threshold to see which emotions the model would report β the line between "present" and "absent" is a choice you make, not the model.
Sentiment flattens feeling into a single axis. Emotion detection keeps the nuance β and doing it in the browser means you can read how someone feels as they type, privately, with no round-trip.
Type a message and see every emotion the model detects, ranked, updating live.
Auto-route a queue of support tickets by their dominant emotion β escalate, praise, help, general.
Plot the emotional arc of a pasted story, sentence by sentence, and watch the feeling move.
Detect emotion in any language: M2M100 translates to English, then this model scores it.
Multi-label classification is one call; ask for all 28 scores with top_k:
import { pipeline } from "@huggingface/transformers";
const classify = await pipeline(
"text-classification",
"SamLowe/roberta-base-go_emotions-onnx",
); // downloads + caches ~125 MB once
const out = await classify("thank you, I was so worried!", { top_k: 28 });
// β [{ label: "gratitude", score: 0.92 }, { label: "relief", score: 0.78 },
// { label: "nervousness", score: 0.41 }, β¦ all 28, each independent ]
The model's config declares problem_type: "multi_label_classification", so Transformers.js
applies a sigmoid per class instead of a softmax β that's why the scores don't sum to 1.
All of it runs in a Web Worker so typing never janks.