text-classification · text · WASM · ~104 MB
Most sentiment models are English-first. RoBERTuito is the opposite: a RoBERTa pre-trained on about 500 million Spanish tweets — emoji, hashtags and @-mentions included — then fine-tuned for sentiment. It reads Spanish morphology, diminutives and regional slang as first-class signal and scores text as negativo, neutral or positivo. Type something in Spanish below and watch the real class probabilities; then look inside to see which words moved the verdict. Nothing leaves your device.
| Model | Xenova/robertuito-sentiment-analysis |
|---|---|
| Base model | pysentimiento/robertuito-sentiment-analysis (RoBERTuito, fine-tuned on TASS) |
| Task / pipeline | text-classification — three classes: negativo · neutral · positivo |
| How it works | RoBERTuito encodes the Spanish text, then a small head predicts the 3-class softmax (config id2label: 0 NEG · 1 NEU · 2 POS) |
| Architecture | RoBERTa base (~108M params), pre-trained on ~500M Spanish tweets (user/hashtag/emoji tokens), fine-tuned on the TASS sentiment corpus |
| Language | Spanish only — a language specialist, not a multilingual model |
| Quantization | q8 (8-bit) ONNX (model_quantized.onnx) |
| Backend | WebAssembly (runs anywhere; no WebGPU needed) |
| Download | ~104 MB, cached after first load |
| License | Research model (pysentimiento) — cite the RoBERTuito / pysentimiento papers |
| Web APIs | WebAssembly, Web Workers — all Baseline widely available |
Type or paste some Spanish, or pick a sample. The verdict updates as you type; the class bars show the full probability split.
The model never matches "sentiment words" from a list — it reads the whole sentence through one Spanish encoder. To make that legible we run occlusion attribution: re-score the text with each word removed and measure how far the winning class's confidence drops (in log-odds). A word tinted in the verdict colour was pushing that verdict; a grey word was pulling against it. Because the tokenizer decides what a "word" contributes, a diminutive (-ito/-ita), an intensifier or an emoji all carry real weight.
A multilingual model (XLM-R) spreads one embedding space across ~100 languages — brilliant when your text could be in any of them. RoBERTuito goes the other way: all of its ~108M parameters and its entire vocabulary are Spanish, pre-trained on Spanish social text. On idiomatic Spanish — slang, heavy diminutives, code-mixed regional forms — a specialist often reads the register a generalist flattens. The multi-model demo runs both side by side so you can see where they agree and where they part.
Spanish is one of the most-spoken languages on earth, and a lot of opinion data — reviews, DMs, support tickets, social posts — arrives in it. A model that was actually pre-trained on Spanish reads its register, not a translated approximation, and it runs in a tab, so that text never has to leave the device.
Type Spanish, get negativo / neutral / positivo with the full probability split.
Paste a batch of Spanish reviews and get a sorted, colour-coded monitoring board.
Break it: regional slang, sarcasm, diminutives and emoji-only messages.
Spanish-native RoBERTuito vs a multilingual XLM-R model on the same text.
The pipeline takes a string and returns labelled class scores. Ask for all three with top_k:
import { pipeline } from "@huggingface/transformers";
const clf = await pipeline(
"text-classification",
"Xenova/robertuito-sentiment-analysis",
{ dtype: "q8" },
); // downloads + caches ~104 MB once
const out = await clf("Me encanta este lugar 😍", { top_k: 3 });
// → [{ label: "POS", score: 0.98 },
// { label: "NEU", score: 0.02 },
// { label: "NEG", score: 0.00 }]
The labels come from the model config (0 NEG · 1 NEU · 2 POS); this page maps them to
negativo / neutral / positivo. "See inside" reuses the same loaded instance to re-score occluded
variants of the text and read off each word's pull. All of it runs in a Web Worker so the UI never
janks.