/ Модель

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

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

multilingual-toxicity-base

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

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

3 764скачиваний за 30 дней2лайкавеса обновлены17 ноя 2026

Бенчмарки

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

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

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

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

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

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

Horizon-Labs multilingual-toxicity-base — многоязычный классификатор токсичных комментариев, разработанный Horizon-Labs на основе mmBERT-base. Модель содержит около 307 млн параметров и выдаёт независимую вероятность для каждого из семи классов Detoxify: токсичность, тяжёлая токсичность, непристойность, угроза, оскорбление, атака на идентичность и откровенно сексуальный контент. Она принимает текст, использует архитектуру ModernBERT для классификации последовательностей и поддерживает контекст до 8192 токенов; при обучении максимальная длина составляла 256 токенов.

Модель предназначена для многоязычной модерации комментариев, проверки пользовательского контента, а также сканирования входов и ответов LLM с помощью LLM Guard. Обучение проводилось на Civil Comments и его переводах на 33 языка; модель включает ONNX-файлы для CPU и браузера, а также веса Safetensors. По оценкам README, качество зависит от языка: на языках с меньшими ресурсами оно ниже, а оценки для неанглийского текста могут быть занижены. Рекомендуется подбирать порог на данных конкретной платформы.

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

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

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

Ограничения

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

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

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

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

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

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

Открыть на Hugging Face

Multilingual Toxicity (base, 308M): 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-base 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 smaller, faster version is available as Horizon-Labs/multilingual-toxicity-small.

  • 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, 641 MB): probabilities differ from fp32 by 0.0008 on average over 448 test texts.

Usage

from transformers import pipeline

clf = pipeline("text-classification", model="Horizon-Labs/multilingual-toxicity-base", 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-base", { 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-base", onnx_path="Horizon-Labs/multilingual-toxicity-base", 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 (input and output scanners, ONNX and PyTorch paths). 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 (308M)Apache-2.00.9880.9710.8540.4337 Detoxify labels, multilingual
Horizon-Labs/multilingual-toxicity-small (141M)Apache-2.00.9880.9720.8350.547
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.9710.969
obscene0.9930.991
threat0.9930.985
insult0.9800.980
identity_attack0.9900.987
sexual_explicit0.9980.996

Per TextDetox language (AUC):

languagethis model (AUC)multilingual-toxic-xlm-robertaxlmr-large-toxicity (in-domain)
Amharic0.7160.5480.982
Arabic0.7870.4130.989
German0.8590.6620.997
English0.9930.9921.000
Spanish0.9070.8190.998
French0.9870.9810.971
Hebrew0.7880.5010.701
Hindi0.9100.6440.995
Hinglish (romanised Hindi)0.7650.6310.756
Italian0.8750.8180.805
Japanese0.8460.5060.852
Russian0.9730.8071.000
Tatar0.8180.6260.806
Ukrainian0.8080.6800.996
Chinese0.7740.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-base 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
Ревизия весов
1373201

0 моделей