text-classification · 125.44 MB weights (129.0 MB total) WASM q8 · 125M Params · Cased RoBERTa · Apache-2.0

Unbiased-Toxic-RoBERTa — 16-Head Toxicity & Identity-Bias Classifier

unitary/unbiased-toxic-roberta (served via onnx-community/unbiased-toxic-roberta-ONNX , Apache-2.0) is a 125M-parameter cased RoBERTa-base fine-tuned on the Jigsaw Unintended Bias in Toxicity Classification dataset. It emits 16 independent sigmoid probabilities — 7 toxicity heads plus 9 demographic identity subgroup heads — completely offline in 125.44 MB weights (129.0 MB with tokenizer & config) q8 WASM.

Upstream Model unitary/unbiased-toxic-roberta
ONNX Artifact onnx-community/unbiased-toxic-roberta-ONNX
Pipeline Task text-classification (multi_label)
Size & Quant 125.44 MB weights (129.0 MB total) · WASM q8
Params & Heads 125M · 7 Toxicity + 9 Identity Heads
License Apache-2.0

1. Live 16-Head Toxicity & Identity-Bias Inspector

Pick a constructive, benign-identity, hostile, or policy-warning preset, upload/drop a text file, paste (Ctrl/Cmd+V), or type any comment below:

Drop a .txt, .md, .csv, or .json file here, or press Ctrl/Cmd+V anywhere outside editable fields. Inference runs locally in a Web Worker.
Inference latency–
Max Toxicity Head–
Max Identity Head–
Toxicity Entropy / Σσ–
BPE tokens–
NaN / Backend–

7 Toxicity Sigmoid Heads (Independent 0–100%)

Awaiting inference
Initialize the model above to inspect all 7 toxicity heads.

Top raw logits & sigmoid vs softmax check: –

9 Demographic Identity Subgroup Heads

Auxiliary subgroup detectors trained to separate neutral demographic mentions from actual toxicity.

Initialize the model above to inspect all 9 identity heads.

See Inside · Cased RoBERTa Byte-Level BPE Breakdown (50,265 vocab)

RoBERTa preserves case (Ġ marks word-leading space, <s>=0, </s>=2).

Run inference to inspect cased RoBERTa BPE tokens and vocabulary IDs.

2. Why Unbiased-Toxic-RoBERTa Matters

Standard toxicity classifiers trained on Wikipedia or uncurated social feeds frequently over-flag benign sentences that merely mention marginalized identities ("I am a proud Muslim engineer" or "LGBTQ+ theater night"). unitary/unbiased-toxic-roberta was trained on Jigsaw's Unintended Bias in Toxicity Classification (Civil Comments) with explicit subgroup identity heads so toxicity scores stay decoupled from neutral identity terms.

import { pipeline } from "https://cdn.jsdelivr.net/npm/@huggingface/transformers@3.7.5";

const classifier = await pipeline(
  "text-classification",
  "onnx-community/unbiased-toxic-roberta-ONNX",
  { device: "wasm", dtype: "q8" }
);
const all16 = await classifier("I am a proud Muslim engineer.", { top_k: null });
Show the code · worker.js — runSingleClassify() (125.44 MB q8 WASM worker)
Show the code · toxic-core.mjs — normalizeToxicScores()

3. Model Card, Ethical Notes & References