/ Модель

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

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

multilingual-toxicity-small

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

Мультиязычный классификатор комментариев, оценивающий токсичность и шесть связанных категорий для автоматической модерации.

1 334скачиваний за 30 дней0лайковвеса обновлены17 ноя 2026

Бенчмарки

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

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

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

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

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

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

Multilingual Toxicity Small — мультиязычный классификатор токсичных комментариев от Horizon Labs. Модель основана на энкодере mmBERT-small с архитектурой ModernBERT и содержит 140,5 млн параметров. Для каждого текста она выдаёт независимые вероятности по семи меткам Detoxify: токсичность, тяжёлая токсичность, непристойность, угроза, оскорбление, атака на идентичность и откровенно сексуальный контент. Заявлена поддержка английского и ещё 33 языков; модель принимает текст, а результаты представляет как метки и оценки.

Модель предназначена для модерации комментариев и многоязычного сканирования запросов и ответов в системах вроде LLM Guard. В репозитории есть версии ONNX для CPU и браузера, включая вариант с квантованными int8-эмбеддингами. Контекст составляет до 8192 токенов, однако при обучении использовалась максимальная длина 256 токенов.

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

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

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

Ограничения

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

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

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

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

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

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 }));

Use with LLM Guard

The labels are the Detoxify set that LLM Guard's Toxicity scanners expect, so this model can replace their English default (unitary/unbiased-toxic-roberta) to scan prompts and responses in many languages:

from llm_guard.input_scanners import Toxicity            # llm_guard.output_scanners.Toxicity works the same way
from llm_guard.model import Model

model = Model(path="Horizon-Labs/multilingual-toxicity-small", onnx_path="Horizon-Labs/multilingual-toxicity-small", onnx_subfolder="onnx",
              pipeline_kwargs={"top_k": None, "function_to_apply": "sigmoid", "truncation": True, "max_length": 512,
                               "return_token_type_ids": False})
scanner = Toxicity(model=model, threshold=0.5)           # use_onnx=True for the ONNX files
sanitized, is_valid, risk = scanner.scan("Du bist ein dummer Vollidiot.")   # is_valid == False

Checked in November 2026 with llm-guard 0.3.16 on the base model, which has the same labels and architecture. Toxic and harmless test sentences in English, German, Spanish and Russian were all classified correctly.

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
Ревизия весов
a3c7722

0 моделей