/ Модель

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

Контекст
514 токенов
Параметры
152 млн
Лицензия
MIT
Архитектура
roberta · dense
Опубликована
29 мая 2026

hate-speech-detector

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

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

162скачиваний за 30 дней2лайкавеса обновлены30 мая 2026

Бенчмарки

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

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

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

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

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

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

AuricErgeson/hate-speech-detector — классификатор текста на базе RoBERTa, дообученный разработчиком на более чем 110 тыс. примерах из четырёх открытых наборов данных по языку ненависти и оскорблениям. Модель относит текст к одному из трёх классов: нейтральный, оскорбительный или содержащий язык ненависти. Она предназначена для модерации англоязычных публикаций в социальных сетях, предварительной разметки данных и исследовательских задач.

Модель содержит 151,8 млн параметров, принимает текст с контекстом до 514 токенов и распространяется в формате safetensors по лицензии MIT. В README указаны точность 0,843 на тестовой выборке и F1 0,697 для класса языка ненависти; это указывает на необходимость проверки предсказаний человеком, особенно при модерации. Модель хуже работает на коротких фрагментах, может ошибочно реагировать на цитирование и обсуждение оскорбительных выражений, не распознаёт некоторые коды без контекста и может пропускать новые после 2022 года выражения. Поддерживается только английский язык.

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

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

Ограничения

Предназначена только для английского текста; короткие фрагменты ненадёжны, а цитирование или академическое обсуждение оскорбительных выражений может вызвать ложные срабатывания. Для класса языка ненависти указана тестовая F1 0,697; не следует принимать решения об удалении контента или блокировке аккаунтов без проверки человеком.

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

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

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

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

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

Открыть на Hugging Face

roberta-hate-speech-detector

Twitter-native RoBERTa fine-tuned on 110K+ examples from four public hate speech datasets, augmented with targeted neo-Nazi codes and antisemitic dog whistles that general Twitter corpora miss.

Three output classes:

IDLabelMeaning
0neitherClean — not hateful or offensive
1offensiveCrude, profane, or offensive — but not hate speech
2hate_speechHate speech — slurs, coded language, dog whistles, white nationalist symbols

Quick Start

from transformers import pipeline

classifier = pipeline(
    "text-classification",
    model="AuricErgeson/roberta-hate-speech-detector",
)

classifier("they control the media")
# [{'label': 'hate_speech', 'score': 0.87}]

classifier("this movie sucked ass")
# [{'label': 'offensive', 'score': 0.91}]

classifier("I really enjoyed the concert")
# [{'label': 'neither', 'score': 0.97}]

Batch inference:

texts = ["heil hitler", "what a stupid film", "the weather is nice today"]
results = classifier(texts)

Performance

Evaluated on a stratified held-out test set of 11,059 examples.

ClassPrecisionRecallF1Support
neither0.9550.8220.8846,514
offensive0.8300.9130.8702,703
hate_speech0.6070.8170.6971,842
weighted avg0.8670.8430.84911,059
  • Val weighted F1: 0.852 (best checkpoint, epoch 3)
  • Test accuracy: 0.843
  • Passed 7/8 probe cases (see Limitations)

Training Data

110,585 examples fused from four public datasets plus targeted augmentation:

DatasetExamplesWhat it covers
Davidson et al. 201724,783Explicit Twitter slurs and offensive language
ImplicitHate21,480Coded language and dog whistles
HateXplain19,229Multi-annotator hate speech with rationales
HateDay 2025 (English only)45,000Large-scale contemporary Twitter hate
Targeted augmentation93Neo-Nazi codes (1488, heil hitler, 14 words), antisemitic dog whistles (ZOG, "they control the media"), white nationalist phrases

Label harmonization — all datasets mapped to the unified 3-class scheme. Training set oversampled to 21,621 examples per class (64,863 total) to counter the heavy neither majority.

Training Details

  • Base model: cardiffnlp/twitter-roberta-base-2022-154m — RoBERTa trained on 154M tweets through 2022
  • Epochs: 3 | LR: 2e-5 | Batch: 32 | Grad accum: 2 | Warmup: 200 steps
  • Precision: bf16 | Hardware: NVIDIA A100 | Training time: ~6 minutes
  • Framework: HuggingFace Transformers + Trainer API

One non-obvious implementation detail: cardiffnlp/twitter-roberta-base-2022-154m uses legacy TF-style LayerNorm parameter names (gamma/beta) that transformers ≥5.0 no longer maps automatically. The checkpoint weights were reloaded manually with gamma→weight and beta→bias renaming before training.

Limitations

  • Bare numeric codes — "1488" as a standalone string is predicted neither. The model correctly classifies it in context ("1488 white power") but the 4-digit code alone is below threshold. This is the only known failed probe case.
  • Post-2022 slang — base model training data ends 2022; emerging coded language coined after that date may not be recognized.
  • Context dependence — academic discussion of hate speech ("researchers studying the n-word...") and quotation of hateful phrases to condemn them can produce false positives. The model sees tokens, not intent.
  • English only — trained exclusively on English-language data. Do not use on multilingual content.
  • Short bare tokens — very short inputs (1–3 tokens) are unreliable; the model needs minimal context.

Intended Use

  • Content moderation pipelines needing a fast, lightweight classifier
  • Research on hate speech detection and NLP fairness
  • Dataset annotation assistance (human-in-the-loop review)
  • Building safety filters for social media applications

Out-of-Scope Use

This model should not be used:

  • As the sole arbiter for automated account suspension or content removal without human review
  • To profile or surveil individuals or communities
  • In contexts outside English-language social media text
  • As a substitute for human moderators on high-stakes decisions

Citation

If you use this model in research, please cite the four underlying datasets:

Davidson et al. (2017) — Automated Hate Speech Detection and the Problem of Offensive Language
El-Shirbeeny et al. (2021) — ImplicitHate
Mathew et al. (2021) — HateXplain
Tonneau et al. (2025) — HateDay

Live Demo

https://huggingface.co/spaces/AuricErgeson/hate-speech-detector

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

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

GPU в ailist

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

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

Подбираем GPU…

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

0 моделей