/ Модель

Характеристики

Контекст
512 токенов
Лицензия
Apache 2.0
Архитектура
toxic_comment_xlmr · dense
Базовая модель
xlm-roberta-large
Библиотека
transformers
Опубликована
30 авг 2026

mill-screen

Классификация текстаТекст → label3 профессии

Mill Screen оценивает комментарии на токсичность по шести категориям на семи языках и помогает направлять их на проверку модератором.

25скачиваний за 30 дней0лайковвеса обновлены29 сен 2026

Бенчмарки

Как модель справилась с задачами пользователей ailist и что о ней публикуют открытые лидерборды

Публичные оценки

Из открытых лидербордов. Сравнивайте результаты одного теста при одинаковых условиях — отсутствие оценки не значит, что модель хуже.

В подключённых источниках результатов для этой модели пока нет.

Что умеет модель

Описание составлено по карточке модели и метаданным Hugging Face

Mill Screen — мультиязычная модель классификации токсичности комментариев, созданная автором репозитория Deeptanshuu на основе XLM-RoBERTa-large. Она обрабатывает комментарии на английском, русском, турецком, испанском, французском, итальянском и португальском языках и выдаёт независимые оценки по шести категориям токсичного содержания за один проход. Архитектура включает XLM-RoBERTa-large с 565 млн параметров и блоком внимания, учитывающим язык; веса представлены в формате PyTorch.

Модель предназначена для выявления комментариев, требующих проверки человеком, и для сортировки очередей модерации. В README указаны результаты на отложенной выборке, включая macro AUC 0,9852 и macro F1 0,8814, но качество на реальном потоке зависит от доли токсичных сообщений и выбранных порогов. Лицензия — Apache-2.0.

У модели выявлен существенный перекос: короткие нейтральные высказывания с упоминанием идентичности могут ошибочно оцениваться как токсичные. Цитируемые оскорбления и контрречь также могут получать высокие оценки; оценки не калиброваны как вероятности. Не следует использовать модель для автоматического удаления сообщений, блокировок, наказаний или оценки угроз без проверки человеком. Она не предназначена для длинных документов и языков за пределами семи поддерживаемых.

Сценарии применения

  • отбор комментариев для проверки модератором
  • сортировка очереди жалоб по уровню токсичности
  • ранжирование пользовательских отзывов для ручной проверки
  • выявление оскорбительных и непристойных комментариев на семи языках

Ограничения

Короткие безобидные высказывания об идентичности могут ошибочно помечаться как токсичные; цитируемые оскорбления и контрречь также могут получать высокие оценки. Оценки не калиброваны как вероятности, качество зависит от базовой доли токсичных сообщений и порогов; для решений о санкциях нужна проверка человеком.

Для каких профессий подходит3

Разделы каталога профессий, в задачах которых используется эта модель

Все профессии

Карточка модели

README от автора на Hugging Face, как он его опубликовал

Открыть на Hugging Face

Known bias: short benign self-descriptions that name an identity are flagged as toxic.

Probe, one short sentenceP(toxic)
Sexual orientation, two probes0.891, 0.668
Race0.612
LGBTQ identity0.531
Disability0.485
Control, gender only, two probes0.067, 0.038

The toxic threshold is 0.472, so the first five fire and the controls do not. Benign identity probes are flagged at 0.41 (en) to 0.74 (pt); controls at 0.00 in all seven languages. On real held-out rows with no positive label, identity-term rows are flagged 2.84x as often (95% CI [1.96, 3.82]). One paragraph of neutral filler in front drops the top probe to 0.042. The cause is the training data: benign identity usage is almost absent from it. Do not run this on user content without mitigation or human review. Analysis.

Mill Screen

Unstructured comment in, typed probabilistic decisions out.

Six independent toxicity probabilities per comment, in one forward pass, for English, Russian, Turkish, Spanish, French, Italian and Portuguese. XLM-RoBERTa-large plus one language-conditioned attention block. Similar in idea to TypeSafe's Jev; not affiliated.

LabelIndexMeaning
toxic0Rude or disrespectful
severe_toxic1Extreme toxic (a subset of it)
obscene2Obscene or vulgar
threat3Threat of violence
insult4Insulting toward a person
identity_hate5Hatred toward an identity group

Labels are not exclusive: each has its own sigmoid and its own threshold.

Quick start

import json, torch
from huggingface_hub import hf_hub_download
from transformers import AutoModel, AutoTokenizer

REPO = "Deeptanshuu/mill-screen"
LANGUAGE_IDS = {"en": 0, "ru": 1, "tr": 2, "es": 3, "fr": 4, "it": 5, "pt": 6}
LABELS = ["toxic", "severe_toxic", "obscene", "threat", "insult", "identity_hate"]

model = AutoModel.from_pretrained(REPO, trust_remote_code=True).eval()
tokenizer = AutoTokenizer.from_pretrained(REPO)
with open(hf_hub_download(REPO, "thresholds.json")) as f:
    thresholds = json.load(f)["thresholds"]
cut = torch.tensor([thresholds[name] for name in LABELS])

texts, langs = ["You are an absolute idiot.", "Sei un cretino, vattene via."], ["en", "it"]
enc = tokenizer(texts, padding=True, truncation=True, max_length=512, return_tensors="pt")
with torch.no_grad():
    probs = model(**enc, lang_ids=torch.tensor([LANGUAGE_IDS[l] for l in langs]))["probabilities"]

for text, row in zip(texts, probs):
    print(text, "->", [n for n, p, t in zip(LABELS, row, cut) if p >= t] or ["clean"])

trust_remote_code runs modeling_toxic_xlmr.py from this repo. To avoid it, download the repo and call load_model(path) from that file. inference_example.py is a batched version.

lang_ids is one integer per row (table above). Leave it out and every row is scored as English, with one warning; the ablation found no accuracy cost to that. Ids outside 0-6 are clamped.

Thresholds: do not use 0.5. thresholds.json has one per class (0.47 to 0.56), tuned on validation. There are no per-language thresholds.

Use

Use it forDo not use it for
Flagging comments for human reviewDeleting, banning or penalising with no human check
Ranking a review backlogThreat assessment or safety escalation
Research, and as a baselineLanguages outside the seven, long documents, spam, misinformation, self-harm

Also expect: quoted abuse and counter-speech score like abuse; reclaimed slurs and in-group speech are unmeasured; scores are ranks, not calibrated probabilities.

Results

Held-out test split, 35,658 rows, thresholds tuned on validation only: macro AUC 0.9852, macro F1 0.8814, exact match 0.8772.

Against public models, same test rows:

ModelSizetoxic AUCComments/sLatency
Mill565M0.992187111.8 ms
Detoxify multilingual278M0.96922,4246.2 ms
textdetox XLM-R large560M0.932789611.0 ms
citizenlab mDistilBERT135M0.85133,7002.9 ms
toxic-bert (English only)110M0.9797 (Mill 0.9797)1,3625.5 ms

AUC against public models

Throughput

Mill is the most accurate and runs at the speed of other XLM-R-large models, about a third of Detoxify's throughput. One Quadro RTX 6000, fp16, median batch-1 latency. 89% of English test rows are in Jigsaw data the Detoxify models trained on; removing them keeps every AUC gap. Mill trained on this test set's distribution; the baselines did not. Details.

Per class, tuned thresholds:

ClassAUCThresholdPrecisionRecallF1
toxic0.99210.47240.95340.97500.9641
severe_toxic0.98630.47240.71390.80100.7549
obscene0.98990.52760.94190.93380.9378
threat0.97550.52760.88460.80030.8403
insult0.98550.56430.92040.92660.9235
identity_hate0.98180.56430.89590.84190.8680

Macro AUC by language: en 0.9902, ru 0.9790, tr 0.9726, es 0.9882, fr 0.9877, it 0.9893, pt 0.9832. Full values in metrics.json.

Compared with v1 (2025)

MetricMillv1 (2025)
Macro AUC0.98520.9147
Macro F1, tuned thresholds0.88140.6036
Weighted F10.93320.7732
Exact match0.87720.6194

F1 by class, v1 versus Mill

Per-language AUC and F1, v1 versus Mill

Threat probability distributions, v1 versus Mill

On real traffic

The test set is about 50% toxic; real streams are 1-5%. Precision falls with the base rate:

LabelRecallFPRPrecision @ 50%@ 5%@ 1%
toxic0.9750.04700.9530.5220.173
insult0.9270.03210.9200.6030.226
obscene0.9340.01840.9420.7280.339
severe_toxic0.8010.01560.7140.7300.342
identity_hate0.8420.00550.8960.8900.608
threat0.8000.00230.8850.9480.779

At 1% toxic, the toxic head flags about six comments per real one. Tune thresholds on your own traffic if precision matters.

Limitations

  • Language conditioning is a measured null: +0.0003 macro AUC, 95% CI [-0.0007, +0.0012].
  • The step that made the corpus multilingual is not in the source repo and cannot be audited.
  • Rare classes are partly synthetic (Mistral-7B-Instruct-v0.3), labelled by prompt, not by people.
  • Near-duplicates are 3.8% of English validation rows, so held-out numbers are slightly optimistic.
  • severe_toxic is a subset of toxic; the independent sigmoids do not know that.
  • Weights are a pickled state dict, not safetensors.

Files

FileContents
modeling_toxic_xlmr.pyModel code, for trust_remote_code or load_model()
config.jsonArchitecture config with auto_map
pytorch_model.binWeights, about 2.2 GB
thresholds.jsonPer-class thresholds
metrics.jsonEvaluation results
training_config.jsonTraining configuration
inference_example.pyBatched prediction example
tokenizer filesStock xlm-roberta-large tokenizer

License

Apache 2.0 for the weights and code here. The base model is MIT. The training data (Jigsaw, Wikipedia talk pages, Mistral-generated text) keeps its own terms.

Citation

@misc{mill_toxicity,
  author       = {Deeptanshu Lal},
  title        = {Mill: multilingual multi-label toxicity classification},
  year         = {2026},
  howpublished = {\url{https://huggingface.co/Deeptanshuu/mill-screen}}
}

Как запустить

На своей GPU в ailist. Цена — по текущим предложениям провайдеров

GPU в ailist

Универсальный рантайм · transformers · text-classification

Нельзя запустить

Модели нужен код из репозитория; запуск откроется после проверки совместимости.

Класс архитектуры
ToxicCommentModel
Ревизия весов
1e37e3c

0 моделей