/ Модель

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

Контекст
512 токенов
Параметры
137 млн
Лицензия
Apache 2.0
Архитектура
bert · dense
Опубликована
2 мар 2022

bert-base-uncased-hatexplain-rationale-two

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

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

101скачиваний за 30 дней12лайковвеса обновлены24 июн 2022

Бенчмарки

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

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

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

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

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

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

Модель разработана Binny Mathew, Punyajoy Saha, Seid Muhie Yimam, Chris Biemann, Pawan Goyal и Animesh Mukherjee для классификации англоязычных текстов как оскорбительных (язык ненависти или offensive) либо обычных. Это дообученная uncased-версия BERT base с 136,7 млн параметров; при обучении использовались публикации из Gab и Twitter, а также человеческие обоснования разметки HateXplain. Помимо классификации, модель включает голову предсказания обоснований для оскорбительных предложений.

Модель рассчитана на анализ текста, например для первичной модерации сообщений и изучения признаков оскорбительной речи. Максимальная длина контекста — 512 токенов. README указывает английский язык и лицензию Apache-2.0.

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

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

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

Ограничения

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

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

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

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

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

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

Открыть на Hugging Face

Table of Contents

Model Details

Model Description: The model is used for classifying a text as Abusive (Hatespeech and Offensive) or Normal. The model is trained using data from Gab and Twitter and Human Rationales were included as part of the training data to boost the performance. The model also has a rationale predictor head that can predict the rationales given an abusive sentence

  • Developed by: Binny Mathew, Punyajoy Saha, Seid Muhie Yimam, Chris Biemann, Pawan Goyal, and Animesh Mukherjee
  • Model Type: Text Classification
  • Language(s): English
  • License: Apache-2.0
  • Parent Model: See the BERT base uncased model for more information about the BERT base model.
  • Resources for more information:

How to Get Started with the Model

Details of usage

Please use the Model_Rational_Label class inside models.py to load the models. The default prediction in this hosted inference API may be wrong due to the use of different class initialisations.

from transformers import AutoTokenizer, AutoModelForSequenceClassification
### from models.py
from models import *
tokenizer = AutoTokenizer.from_pretrained("Hate-speech-CNERG/bert-base-uncased-hatexplain-rationale-two")
model = Model_Rational_Label.from_pretrained("Hate-speech-CNERG/bert-base-uncased-hatexplain-rationale-two")
inputs = tokenizer('He is a great guy", return_tensors="pt")
prediction_logits, _ = model(input_ids=inputs['input_ids'],attention_mask=inputs['attention_mask'])

Uses

Direct Use

This model can be used for Text Classification

Downstream Use

[More information needed]

Misuse and Out-of-scope Use

The model should not be used to intentionally create hostile or alienating environments for people. In addition, the model was not trained to be factual or true representations of people or events, and therefore using the model to generate such content is out-of-scope for the abilities of this model.

Risks, Limitations and Biases

CONTENT WARNING: Readers should be aware this section contains content that is disturbing, offensive, and can propagate historical and current stereotypes.

Significant research has explored bias and fairness issues with language models (see, e.g., Sheng et al. (2021) and Bender et al. (2021)).

(and if you can generate an example of a biased prediction, also something like this):

Predictions generated by the model can include disturbing and harmful stereotypes across protected classes; identity characteristics; and sensitive, social, and occupational groups. For example:

The model author's also note in their HateXplain paper that they

have not considered any external context such as profile bio, user gender, history of posts etc., which might be helpful in the classification task. Also, in this work we have focused on the English language. It does not consider multilingual hate speech into account.

Training Procedure

Preprocessing

The authors detail their preprocessing procedure in the Github repository

Evaluation

The mode authors detail the Hidden layer size and attention for the HateXplain fien tuned models in the associated paper

Results

The model authors both in their paper and in the git repository provide the illustrative output of the BERT - HateXplain in comparison to BERT and and other HateXplain fine tuned models

Citation Information

@article{mathew2020hatexplain,
  title={HateXplain: A Benchmark Dataset for Explainable Hate Speech Detection},
  author={Mathew, Binny and Saha, Punyajoy and Yimam, Seid Muhie and Biemann, Chris and Goyal, Pawan and Mukherjee, Animesh},
  journal={arXiv preprint arXiv:2012.10289},
  year={2020}

}

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

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

GPU в ailist

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

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

Подбираем GPU…

Класс архитектуры
BertForSequenceClassification
Ревизия весов
7b1a724

0 моделей