/ Модель

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

Контекст
512 токенов
Лицензия
Apache 2.0
Архитектура
distilbert · dense
Опубликована
17 окт 2023

offensive_speech_detection

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

Англоязычная модель DistilBERT для классификации текста на оскорбительный и неоскорбительный с целью модерации контента.

88скачиваний за 30 дней10лайковвеса обновлены18 ноя 2023

Бенчмарки

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

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

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

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

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

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

Falconsai разработала эту модель на базе distilbert-base-uncased: DistilBERT дообучен для классификации текстов на оскорбительные и неоскорбительные. Она предназначена для модерации пользовательских сообщений и выявления оскорбительной или разжигающей ненависть речи. Архитектура — DistilBertForSequenceClassification; модель принимает текст и выдаёт метку класса. Максимальная длина контекста — 512 токенов, основной язык — английский.

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

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

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

Ограничения

Карточка отмечает смещения обучающих данных: формулировки со словом «like» и отсутствие пунктуации могут чаще классифицироваться как оскорбительные. Качество зависит от соответствия входных текстов обучающим данным; модель специализирована на этой задаче.

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

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

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

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

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

Открыть на Hugging Face

Model Card: Fine-Tuned DistilBERT for Offensive/Hate Speech Detection

Model Description

The Fine-Tuned DistilBERT is a variant of the BERT transformer model, distilled for efficient performance while maintaining high accuracy. It has been adapted and fine-tuned for the specific task of offensive/hate speech detection in text data.

The model, named "distilbert-base-uncased," is pre-trained on a substantial amount of text data, which allows it to capture semantic nuances and contextual information present in natural language text. It has been fine-tuned with meticulous attention to hyperparameter settings, including batch size and learning rate, to ensure optimal model performance for the offensive/hate speech detection task.

During the fine-tuning process, a batch size of 16 for efficient computation and learning was chosen. Additionally, a learning rate (2e-5) was selected to strike a balance between rapid convergence and steady optimization, ensuring the model not only learns quickly but also steadily refines its capabilities throughout training.

This model has been trained on a proprietary dataset < 100k, specifically designed for offensive/hate speech detection. The dataset consists of text samples, each labeled as "non-offensive" or "offensive." The diversity within the dataset allowed the model to learn to identify offensive content accurately. THis dataset was combined from reseearch datasets on this topivc as well as news headliens. All duplicates were removed and meticulous effort was taken to ensure the dataset quality.

The goal of this meticulous training process is to equip the model with the ability to detect offensive and hate speech in text data effectively. The result is a model ready to contribute significantly to content moderation and safety, while maintaining high standards of accuracy and reliability.

Intended Uses & Limitations

Intended Uses

  • Offensive/Hate Speech Detection: The primary intended use of this model is to detect offensive or hate speech in text data. It is well-suited for filtering and identifying inappropriate content in various applications.

  • Of Special Note: The data suggests the word "like" is most often used as a comparative statement in the derogatory.

  • These have numerous instances within the "Offensive Speech Dataset". "You look like X" or "He smells like X" are quite common.

  • Also of note, the ABSENCE/LACK OF of punctuation lends itself heavily to the "Offensive" dataset.

  • Accordingly the model will identify these as well, based on their prominence in the training data.

How to Use

To use this model for offensive/hate speech detection, you can follow these steps:

from transformers import pipeline

classifier = pipeline("text-classification", model="Falconsai/offensive_speech_detection")
text = "Your text to classify here."
result = classifier(text)

Limitations

  • Specialized Task Fine-Tuning: While the model is adept at offensive/hate speech detection, its performance may vary when applied to other natural language processing tasks.
  • Users interested in employing this model for different tasks should explore fine-tuned versions available in the model hub for optimal results.

Training Data

The model's training data includes a proprietary dataset designed for offensive/hate speech detection. This dataset comprises a diverse collection of text samples, categorized into "non-offensive" and "offensive" classes. The training process aimed to equip the model with the ability to distinguish between offensive and non-offensive content effectively.

Training Stats

  • Evaluation Loss: 0.018403256312012672
  • Evaluation Accuracy: 0.9973234886940471
  • Evaluation Runtime: 85.0789
  • Evaluation Samples per Second: 127.352
  • Evaluation Steps per Second: 7.969

Note: Specific evaluation statistics should be provided based on the model's performance.

Responsible Usage

It is essential to use this model responsibly and ethically, adhering to content guidelines and applicable regulations when implementing it in real-world applications, particularly those involving potentially sensitive content.

References

Disclaimer: The model's performance may be influenced by the quality and representativeness of the data it was fine-tuned on. Users are encouraged to assess the model's suitability for their specific applications and datasets.

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

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

GPU в ailist

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

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

Подбираем GPU…

Класс архитектуры
DistilBertForSequenceClassification
Ревизия весов
0b9e637

0 моделей