Mill reads a comment once and returns six independent probabilities: toxic, severe toxic, obscene, threat, insult and identity hate. It covers English, Russian, Turkish, Spanish, French, Italian and Portuguese in one model. It is a System One model: a fast, single-pass decision you call as a function inside a moderation pipeline, not a chat model you prompt.
What comes out
Every label gets its own probability and its own decision threshold, tuned on the validation split. The labels do not compete, so one comment can carry several of them, or none.
“Eres un completo idiota y nadie te quiere.”
- Toxic
- 98.7 percent; threshold 47.2 percent; fires
- Severe toxic
- 7.0 percent; threshold 47.2 percent; does not fire
- Obscene
- 84.1 percent; threshold 52.8 percent; fires
- Threat
- 2.7 percent; threshold 52.8 percent; does not fire
- Insult
- 99.3 percent; threshold 56.4 percent; fires
- Identity hate
- 5.0 percent; threshold 56.4 percent; does not fire
“I know where you live and I will find you.”
- Toxic
- 17.7 percent; threshold 47.2 percent; does not fire
- Severe toxic
- 1.7 percent; threshold 47.2 percent; does not fire
- Obscene
- 0.7 percent; threshold 52.8 percent; does not fire
- Threat
- 58.8 percent; threshold 52.8 percent; fires
- Insult
- 0.3 percent; threshold 56.4 percent; does not fire
- Identity hate
- 2.5 percent; threshold 56.4 percent; does not fire
How it works
XLM-RoBERTa-large (565M parameters) encodes the comment. One extra attention
block on top adds a per-language bias to the attention scores, then a small
head on the [CLS] position gives six logits, each through its own sigmoid.

It trained on a 360k-comment corpus derived from Jigsaw, with Mistral-7B generating extra examples for the rare threat and identity-hate labels, and a weighted focal loss to lift those classes.
Against public models
On its 35,658-comment held-out test split, Mill ranks toxic comments better than every public multilingual model, in every language. Each baseline was scored as published, on the same rows, on the one label they all share.
| Model | Ranking mistakes per 100 pairs · fewer is better | Throughput comments/s · higher is faster |
|---|---|---|
| Mill565M parameters | Mistakes / 100 pairs0.8AUC 0.992 | Comments / second871 |
| Detoxify multilingual278M parameters | Mistakes / 100 pairs3.1AUC 0.969 | Comments / second2,424 |
| textdetox XLM-R large560M parameters | Mistakes / 100 pairs6.7AUC 0.933 | Comments / second896 |
| citizenlab mDistilBERT135M parameters | Mistakes / 100 pairs14.9AUC 0.851 | Comments / second3,700 |
The margin is widest outside English (Russian: 0.992 against 0.922), and on English it ties Detoxify's original toxic-bert. The price is speed: Mill runs at 871 comments a second, 11.8 ms each, the same class as other XLM-R-large models and about a third of Detoxify's throughput.
Across all six labels on the same split: macro AUC 0.985, macro F1 0.88, exact match 88%.
Known bias
Short, benign sentences that name an identity group are over-flagged as toxic, a pattern inherited from training data where those terms appear mostly in abusive contexts. It is measured with templated probe sentences across all seven languages and disclosed on the model card, with a costed mitigation: roughly 600 counter-examples and one retrain.
Use it
The weights, thresholds and loading code are on Hugging Face.
import json, torch
from huggingface_hub import hf_hub_download
from transformers import AutoModel, AutoTokenizer
REPO = "Deeptanshuu/mill-screen"
LABELS = ["toxic", "severe_toxic", "obscene", "threat", "insult", "identity_hate"]
model = AutoModel.from_pretrained(REPO, trust_remote_code=True).eval()
tokenizer = AutoTokenizer.from_pretrained(REPO)
thresholds = json.load(open(hf_hub_download(REPO, "thresholds.json")))["thresholds"]
text = "Eres un completo idiota y nadie te quiere."
inputs = tokenizer(text, truncation=True, max_length=512, return_tensors="pt")
with torch.no_grad():
probs = model(**inputs, lang_ids=torch.tensor([3]))["probabilities"][0]
for label, p in zip(LABELS, probs.tolist()):
print(f"{label:14} {p:.2f} {'yes' if p >= thresholds[label] else 'no'}")