/ Модель

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

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

multilingual-hate-speech-base

Классификация текстаТекст → label3 профессии
300скачиваний за 30 дней0лайковвеса обновлены29 ноя 2026

Описание модели

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

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

Multilingual Hate Speech Detector — модель классификации текста от Horizon Labs для выявления высказываний, атакующих людей по защищаемым признакам, и определения целевой группы. Она дообучена на энкодере mmBERT-base с архитектурой ModernBERT; содержит около 306,9 млн параметров и принимает последовательности длиной до 8192 токенов. Модель выдаёт независимые вероятности для метки hate и категорий target_race, target_religion, target_origin, target_gender, target_sexuality, target_age и target_disability. Поддерживается около 50 языков; карточка перечисляет, в частности, английский, русский, немецкий, французский, арабский, хинди, китайский, японский и корейский. Доступны веса Safetensors и ONNX, включая квантованный вариант для CPU и браузера.

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

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

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

Ограничения

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

Публичные бенчмарки

Результаты из открытых лидербордов в сравнении с лидерами каталога

Публичных оценок пока нет

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

Источники: Hugging Face Leaderboards, Hugging Face Eval Results, Open LLM v2, MTEB, timm, Open ASR, EvalPlus, LLM Stats

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

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

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

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

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

Открыть на Hugging Face

Multilingual Hate Speech Detector (base, 308M)

Detects hate speech, meaning attacks on people because of a protected characteristic, in English and about 50 other languages. It also says which group is targeted. Outputs (independent sigmoid probabilities):

  • hate: the text attacks, demeans, dehumanises, stereotypes or calls for harm or exclusion of people because of their race or ethnicity, nationality or migration status, religion, gender, sexual orientation, gender identity, disability or age;
  • target_race, target_religion, target_origin, target_gender, target_sexuality, target_age, target_disability: which group is attacked (meaningful when hate is high).

Ordinary insults, profanity, attacks on politicians, companies or sports fans, criticism of ideas, and counter-speech are not hate speech here, so it complements a general toxicity model such as our multilingual-toxicity. Built on mmBERT-base, Apache-2.0, ONNX for CPU and the browser (transformers.js) included.

  • Flag with hate >= 0.5, or tune the threshold on your own data. onnx/model_quantized.onnx (int8 embeddings, 641 MB): probabilities differ from fp32 by 0.0012 on average over 448 test texts.

Usage

from transformers import pipeline

clf = pipeline("text-classification", model="Horizon-Labs/multilingual-hate-speech-base", top_k=None)
print(clf("Die sind alle Ungeziefer, schmeißt sie raus."))
# [[{'label': 'hate', 'score': ...}, {'label': 'target_origin', 'score': ...}, ...]]

transformers.js:

import { pipeline } from "@huggingface/transformers";
const clf = await pipeline("text-classification", "Horizon-Labs/multilingual-hate-speech-base", { dtype: "q8" });
console.log(await clf("Immigrants are vermin.", { top_k: null }));

Evaluation

Every model is scored the same way (code/hate/eval_hate.py): ROC AUC of its hate probability, and F1 at 0.5. No test item was used for training.

  • Multilingual HateCheck (mteb/multi-hatecheck, CC-BY-4.0): 40,310 functional test cases in 11 languages, including hard non-hateful cases (counter-speech, negation, abuse of individuals or objects, neutral mentions of groups).
  • Held-out real comments (no text from these sets was used in training): Stormfront forum sentences (hate_speech18, CC-BY-SA-3.0), ETHOS binary (YouTube and Reddit), OLID-BR test (Brazilian Portuguese; racism, LGBTQphobia, religious intolerance, sexism or xenophobia count as hate) and K-MHaS (Korean news comments, 5,000; attacks on protected groups vs not hate speech).
  • ¹ In-domain: Measuring Hate Speech (6,000 comments, hateful = the authors' score > 0.5) and the HateXplain test split (offensive-but-not-hate counts as negative). Other texts from these two datasets (not the test items, and not their labels) are in our training data.
modellicenceHateCheck, 11 languages: AUCHateCheck: F1 @ 0.5held-out real comments, 4 sets: mean AUCMeasuring Hate Speech (EN)¹: AUCHateXplain (EN)¹: AUCnote
this model (308M)Apache-2.00.8660.8050.8410.7570.847multilingual
facebook/roberta-hate-speech-dynabench-r4-target (125M)none given0.6070.4350.7810.7520.761English (Dynabench; the HateCheck authors' lab)
cardiffnlp/twitter-roberta-base-hate-latest (125M)CC-BY-4.00.5410.1670.7130.8630.731English tweets; trained on 13 hate sets, likely incl. Measuring Hate Speech
Hate-speech-CNERG/dehatebert-mono-english (110M)Apache-2.00.5690.3090.6870.7370.722English
pysentimiento/robertuito-hate-speech (109M)none given0.5740.1740.6830.6800.569Spanish tweets
IMSyPP/hate_speech_multilingual (178M)MIT0.6910.7620.7410.8030.609multilingual; score = 1 - P(acceptable)
christinacdl/XLM_RoBERTa-Multilingual-Hate-Speech-Detection-New (560M)MIT0.9730.9610.7670.7970.781multilingual; AUC 1.00 on 8 HateCheck languages, so almost surely trained on HateCheck
Horizon-Labs/multilingual-toxicity-small (141M)Apache-2.00.6650.5540.7780.5320.621our toxicity model, identity_attack label
Qwen/Qwen3.8-27B (teacher, prompted) (27B)Apache-2.00.9410.9060.8650.7670.850our teacher, for reference
  • The table shows the released checkpoint. Means over 2 training seeds (HateCheck .866 / .867, held-out real comments .841 / .841, Measuring Hate Speech + HateXplain + K-MHaS .804 / .805).
  • The English baselines do well on English but are near chance on the other HateCheck languages. Among models not trained on HateCheck, this model leads in 10 of 11 HateCheck languages (Arabic, Mandarin, German, French, Hindi, Italian, Dutch, Polish, Portuguese, Spanish). On the held-out real-comment mean, models ahead of it: none (teacher excluded). The XLM-R-large model's near-perfect HateCheck score comes with no training-data documentation; its real-comment scores are the comparable evidence.
  • Caveat: our synthetic training data deliberately includes counter-speech, quoted hate, offensive-but-not-hateful text and implicit hate, which HateCheck also tests (no HateCheck items or templates were used). The held-out real comments are the more independent test.

Held-out real comments by set (AUC):

modelStormfront forum (EN)ETHOS: YouTube, Reddit (EN)OLID-BR (Brazilian Portuguese)K-MHaS (Korean)
this model0.9040.9320.7210.808
facebook/roberta-hate-speech-dynabench-r4-target0.9400.8550.5900.738
cardiffnlp/twitter-roberta-base-hate-latest0.8700.8620.5810.541
Hate-speech-CNERG/dehatebert-mono-english0.9000.7600.6110.478
pysentimiento/robertuito-hate-speech0.8050.7920.6770.456
IMSyPP/hate_speech_multilingual0.8670.8030.5160.778
christinacdl/XLM_RoBERTa-Multilingual-Hate-Speech-Detection-New0.8020.8320.6390.796
Horizon-Labs/multilingual-toxicity-small0.8450.8580.6740.737
Qwen/Qwen3.8-27B (teacher, prompted)0.9110.9470.7380.865

Per HateCheck language:

languagethis model: AUCF1 @ 0.5IMSyPP multilingual: AUCfacebook r4 (English): AUCteacher: AUC
Arabic0.7760.6990.5970.5090.847
Mandarin0.9220.8690.7650.4750.974
German0.9100.8780.7110.5950.971
English0.9230.8640.6960.9790.990
French0.8890.8520.7210.6260.960
Hindi0.6770.4910.5660.5410.828
Italian0.9010.8500.6650.6000.959
Dutch0.8710.8360.7200.5760.951
Polish0.8600.8170.7080.5130.939
Portuguese0.9000.8490.7370.6280.969
Spanish0.8930.8510.7130.6380.964

HateCheck by test type (mean over languages): hateful cases detected 0.67; non-hateful cases correctly left alone:

non-hateful test typethis model: accuracy @ 0.5teacher
counter-speech quoting hate0.820.79
counter-speech referencing hate0.860.66
neutral mention of a group0.950.99
positive statement about a group0.790.93
negated hate0.760.91
profanity, not hateful1.001.00
slur homonyms0.771.00
reclaimed slurs0.861.00
abuse aimed at non-protected groups0.880.89
abuse aimed at individuals1.000.98
abuse aimed at objects1.001.00

Target groups (Measuring Hate Speech, hateful comments, AUC of each target_* output vs the annotated target): race 0.89, religion 0.96, origin 0.92, gender 0.90, sexuality 0.92, age 0.83, disability 0.94.

Train/test overlap audit (November 2026)

After an independent review of our evaluation practice we checked every evaluation set on this card against this model's training data: for each item, the most similar training example (embedding search, confirmed by character-5-gram Jaccard similarity of normalised text). Overlap means Jaccard ≥ 0.5, near-verbatim ≥ 0.8; our training data had been deduplicated against evaluation sets by exact match only. Of 66,504 evaluation items, 135 (0.2%) overlap with the training data (15 near-verbatim). No result on this card changes materially.

112 evaluation items are exact duplicates of another item in the same set (most in mhc_ara 40/3570, mhc_cmn 29/3378, mhc_hin 15/3565).

Audit code: inj/contam_audit_all.py in https://github.com/horizon-ai-labs/agent-io-guards.

Training

  • Texts: 119,983 comments from Civil Comments (CC0) and their machine translations from Horizon-Labs/civil-comments-multilingual (half selected for identity-related attacks), plus 85,732 texts written natively in 52 languages by Qwen3.8-27B (Apache-2.0) for this purpose: hateful texts against groups of 7 protected categories (explicit and implicit or coded), non-hateful texts mentioning those groups (neutral, news-style, counter-speech, quoted hate), and offensive texts that are not hate speech. Plus 50,793 real social-media posts: Measuring Hate Speech comments outside our 6,000-comment test sample, and the HateXplain train and validation splits (CC-BY-4.0), counted twice. Only their text was used; the labels came from the teacher.
  • Labels: Qwen3.8-27B (prompted with the definition above) answered one yes/no question per output for every text; the model learns these probabilities (soft labels, binary cross-entropy). The checkpoint was chosen on 12,881 held-out teacher-labelled texts.
  • mmBERT-base, max length 256 tokens. Code: code/ in this repository.

Limitations

  • What counts as hate speech depends on law, platform policy and culture. This model follows one definition (above). Check it against your own policy and data before relying on it.
  • Labels come from an LLM teacher, not human annotators, and its errors carry over. The teacher's own scores are in the table.
  • Weaker on implicit hate, on Arabic and Hindi (see the per-language table), and on languages and dialects that are rare in the data.
  • Do not use it as the only basis for decisions about people. Keep a human in the loop for enforcement.

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

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

GPU в ailist

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

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

Подбираем GPU…

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

0 моделей