/ Модель

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

Контекст
8 192 токена
Параметры
140 млн
Лицензия
Apache 2.0
Архитектура
modernbert · dense
Базовая модель
mmBERT-small
Библиотека
transformers
Опубликована
1 окт 2026

multilingual-toxicity-small

Классификация текстаТекст → label

Мультиязычный классификатор Horizon Labs оценивает токсичность комментариев по семи меткам для автоматизации модерации.

454скачиваний за 30 дней0лайковвеса обновлены12 окт 2026

Бенчмарки

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

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

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

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

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

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

Multilingual Toxicity Small — модель Horizon Labs для многометочной классификации токсичных комментариев и модерации пользовательского контента. Она дообучена на mmBERT-small и выдаёт независимую вероятность для каждой из семи меток в стиле Detoxify: токсичность, сильная токсичность, непристойность, угроза, оскорбление, нападение на идентичность и откровенный сексуальный контент.

Модель рассчитана на комментарии на английском и ещё 33 языках. Она обучена на Civil Comments и его переводах; в репозитории есть веса Safetensors и ONNX, включая квантованный вариант для CPU и браузера через transformers.js. В метаданных указаны 140,5 млн параметров и контекст до 8192 токенов; при обучении использовалась максимальная длина 256 токенов. На тесте Civil Comments модель показала ROC AUC 0,972 для токсичности, а на TextDetox — AUC 0,835 и F1 0,547 при пороге 0,5.

Модель удобна для мультиязычной фильтрации комментариев и выдаёт оценки, которые можно использовать для настройки правил модерации. Порог нужно подбирать на данных конкретной платформы: оценки для неанглийских текстов обычно ниже, а качество хуже для языков с малым объёмом данных. Метки субъективны и могут приводить к ошибкам на упоминаниях идентичности, цитатах, сарказме и локальных оскорблениях; модель не следует использовать как единственное основание для решений о людях. Лицензия — Apache-2.0.

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

  • фильтрация оскорбительных комментариев в соцсетях
  • выявление угроз и травли в сообщениях пользователей
  • мультиязычная предварительная модерация пользовательского контента
  • оценка токсичности комментариев по нескольким категориям
  • запуск классификации токсичности на CPU или в браузере

Ограничения

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

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

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

Открыть на Hugging Face

Multilingual Toxicity (small, 141M): Detoxify labels in many languages

A multi-label toxic-comment classifier with the labels of Detoxify / unitary/unbiased-toxic-roberta: toxicity, severe_toxicity, obscene, threat, insult, identity_attack, sexual_explicit. It works on comments in English and 33 other languages. Built on mmBERT-small and trained on Civil Comments (CC0) plus translations, so it is a multilingual drop-in for Detoxify-style moderation. Apache-2.0. ONNX files for CPU and the browser (transformers.js) are included. A larger, more accurate version is available as Horizon-Labs/multilingual-toxicity-base.

  • Each label gets an independent probability (sigmoid), as in Detoxify. A common choice is to flag a comment when toxicity >= 0.5, but tune the threshold for your platform. Scores for non-English text tend to be lower than for English (see F1 @ 0.5 below), so a lower threshold may suit multilingual content. Check it on your own data.
  • For harmful requests to an LLM (weapons, self-harm, etc.) rather than rude comments, see our content-safety-guard.
  • For hate speech specifically (attacks on people because of race, religion, origin, gender, sexuality, age or disability, with the targeted group), see multilingual-hate-speech-base.
  • onnx/model_quantized.onnx (int8 embeddings, 268 MB): probabilities differ from fp32 by 0.0009 on average over 448 test texts.

Usage

from transformers import pipeline

clf = pipeline("text-classification", model="Horizon-Labs/multilingual-toxicity-small", top_k=None)
print(clf("Halt die Klappe, du Vollidiot."))
# [[{'label': 'toxicity', 'score': ...}, {'label': 'insult', 'score': ...}, ...]]

transformers.js:

import { pipeline } from "@huggingface/transformers";
const clf = await pipeline("text-classification", "Horizon-Labs/multilingual-toxicity-small", { dtype: "q8" });
console.log(await clf("Eres un inútil, lárgate de aquí.", { top_k: null }));

Evaluation

The benchmarks were used only for evaluation, and training texts that also occur in them were removed.

  • Civil Comments test (English, 20,000 random comments): ROC AUC per label, with labels binarised at >= 0.5 as in the Jigsaw competitions. The table gives the mean over the 6 labels that have at least 20 positives (severe_toxicity has none at that threshold), and the toxicity AUC. Models without a label are scored on the labels they have.
  • TextDetox (textdetox/multilingual_toxicity_dataset): binary toxic/non-toxic in 15 languages, 1,000 balanced texts each. The score is ROC AUC of each model's toxicity probability, plus F1 at 0.5.
modellicenceCivil Comments, mean AUC (6 labels)Civil Comments, toxicity AUCTextDetox (15 languages), AUCTextDetox, F1 @ 0.5labels
this model (141M)Apache-2.00.9880.9720.8350.5477 Detoxify labels, multilingual
Horizon-Labs/multilingual-toxicity-base (308M)Apache-2.00.9880.9710.8540.433
unitary/unbiased-toxic-roberta (125M)Apache-2.00.9850.9690.5880.0867 Detoxify labels (+ identity labels), English
unitary/toxic-bert (110M)Apache-2.00.9460.9260.6230.1426 labels, English
s-nlp/roberta_toxicity_classifier (125M)OpenRAIL++0.9750.9750.6420.092binary, English
martin-ha/toxic-comment-model (67M)none given0.9430.9430.5720.160binary, English
unitary/multilingual-toxic-xlm-roberta (278M)Apache-2.00.9610.9610.6780.3521 label, multilingual
citizenlab/distilbert-base-multilingual-cased-toxicity (135M)none given0.8430.8430.6980.277binary, multilingual
textdetox/xlmr-large-toxicity-classifier (560M)OpenRAIL++0.8690.8690.9220.878binary, multilingual; trained on TextDetox data
textdetox/xlmr-large-toxicity-classifier-v2 (560M)OpenRAIL++0.8950.8950.9870.961binary, multilingual; trained on TextDetox data
gravitee-io/distilbert-multilingual-toxicity-classifier (135M)OpenRAIL++0.8090.8090.9410.896binary, multilingual; trained on TextDetox data (ONNX copy: onnx-community/distilbert-multilingual-toxicity-classifier)
  • The table shows the released checkpoint. Means over two training seeds: small Civil Comments mean AUC .988 / toxicity .972 / TextDetox .838; base .988 / .972 / .855.
  • Models ahead of this one: Civil Comments mean AUC: none (single-label models are scored on their one label, so compare the toxicity column too); Civil Comments toxicity AUC: roberta_toxicity_classifier; TextDetox AUC: xlmr-large-toxicity-classifier, xlmr-large-toxicity-classifier-v2, distilbert-multilingual-toxicity-classifier. The English models were trained on Jigsaw/Civil Comments data, the same source as this test set. The three TextDetox-trained models were trained on TextDetox data (so that column is in-domain for them); on Civil Comments they score 0.81-0.90 versus 0.97-0.99 here.

Per label (Civil Comments, AUC):

labelthis modelunbiased-toxic-roberta
toxicity0.9720.969
obscene0.9950.991
threat0.9940.985
insult0.9800.980
identity_attack0.9880.987
sexual_explicit0.9970.996

Per TextDetox language (AUC):

languagethis model (AUC)multilingual-toxic-xlm-robertaxlmr-large-toxicity (in-domain)
Amharic0.6360.5480.982
Arabic0.7210.4130.989
German0.8590.6620.997
English0.9900.9921.000
Spanish0.8990.8190.998
French0.9840.9810.971
Hebrew0.7780.5010.701
Hindi0.8970.6440.995
Hinglish (romanised Hindi)0.7490.6310.756
Italian0.8400.8180.805
Japanese0.8310.5060.852
Russian0.9560.8071.000
Tatar0.8080.6260.806
Ukrainian0.8080.6800.996
Chinese0.7710.5470.979

Training

  • Data: 518,854 English comments from Civil Comments (CC0; enriched for toxic ones), with their fractional annotator labels. Qwen3.8-27B (Apache-2.0) translated 390,862 of them into 33 languages, about 12,000 per language and half of them toxic. It was told to keep insults, profanity and threats intact, and the labels are copied to each translation (published as Horizon-Labs/civil-comments-multilingual).
  • Model: mmBERT-small with 7 sigmoid outputs, binary cross-entropy on the fractional labels (as in Detoxify), max length 256 tokens. The checkpoint was chosen by mean AUC on held-out comments and their translations.
  • Code: code/ in this repository.

Limitations

  • Toxicity labels are subjective and culture-dependent. Translated comments keep English annotators' judgements, and slurs or insults that exist only in other languages are under-represented.
  • Like other toxicity models, it can over-flag mentions of identity groups and reclaimed or quoted language, and miss implicit or sarcastic abuse. Do not use it as the only basis for decisions about people.
  • Accuracy is lower for low-resource languages, where both translation and the base model are weaker (see the per-language table).

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

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

GPU в ailist

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

Можно запустить

Подбираем GPU…

Класс архитектуры
ModernBertForSequenceClassification
Ревизия весов
01adcc6

0 моделей