cardiffnlp/twitter-roberta-base-hate-latest

Model

20

stars

17

commits

10

repos using this model

2

linked in READMEs

Feb 24, 2025

updated

endpoints_compatible
pytorch
roberta
text-classification
text-embeddings-inference
tf
transformers
Browse cluster: RoBERTa Text Classification & NLP

README

cardiffnlp/twitter-roberta-base-hate-latest

This model is a fine-tuned version of cardiffnlp/twitter-roberta-base-2022-154m for binary hate-speech classification. A combination of 13 different hate-speech datasets in the English language were used to fine-tune the model. More details in the reference paper.

DatasetAccuracyMacro-F1Weighted-F1
hatEval, SemEval-2019 Task 5: Multilingual Detection of Hate Speech Against Immigrants and Women in Twitter0.58310.56460.548
ucberkeley-dlab/measuring-hate-speech0.92730.91930.928
Detecting East Asian Prejudice on Social Media0.92310.66230.9428
Call me sexist, but0.96860.92030.9696
Predicting the Type and Target of Offensive Posts in Social Media0.91640.68470.9098
HateXplain0.86530.8450.8662
Large Scale Crowdsourcing and Characterization of Twitter Abusive BehaviorLarge Scale Crowdsourcing and Characterization of Twitter Abusive Behavior0.78010.74460.7614
Multilingual and Multi-Aspect Hate Speech Analysis0.99440.49860.9972
Hate speech and offensive content identification in indo-european languages0.87790.69040.8706
Are You a Racist or Am I Seeing Things?0.9210.89350.9216
Automated Hate Speech Detection0.94230.92490.9429
Hate Towards the Political Opponent0.87830.65950.8788
Hateful Symbols or Hateful People?0.81870.78330.8323
Overall0.87660.75310.8745

Usage

Install tweetnlp via pip.

pip install tweetnlp

Load the model in python.

import tweetnlp
model = tweetnlp.Classifier("cardiffnlp/twitter-roberta-base-hate-latest")
model.predict('I love everybody :)')
>> {'label': 'NOT-HATE'}

Reference paper - Model based on:

@inproceedings{antypas-camacho-collados-2023-robust,
    title = "Robust Hate Speech Detection in Social Media: A Cross-Dataset Empirical Evaluation",
    author = "Antypas, Dimosthenis  and
      Camacho-Collados, Jose",
    booktitle = "The 7th Workshop on Online Abuse and Harms (WOAH)",
    month = jul,
    year = "2023",
    address = "Toronto, Canada",
    publisher = "Association for Computational Linguistics",
    url = "https://aclanthology.org/2023.woah-1.25",
    pages = "231--242"
}

Contributors

antypasd

14 commits

Pedrada

3 commits

cardiffnlp/twitter-roberta-base-hate-latest

Model

20

stars

17

commits

10

repos using this model

2

linked in READMEs

Feb 24, 2025

updated

endpoints_compatible
pytorch
roberta
text-classification
text-embeddings-inference
tf
transformers
Browse cluster: RoBERTa Text Classification & NLP

README

cardiffnlp/twitter-roberta-base-hate-latest

This model is a fine-tuned version of cardiffnlp/twitter-roberta-base-2022-154m for binary hate-speech classification. A combination of 13 different hate-speech datasets in the English language were used to fine-tune the model. More details in the reference paper.

DatasetAccuracyMacro-F1Weighted-F1
hatEval, SemEval-2019 Task 5: Multilingual Detection of Hate Speech Against Immigrants and Women in Twitter0.58310.56460.548
ucberkeley-dlab/measuring-hate-speech0.92730.91930.928
Detecting East Asian Prejudice on Social Media0.92310.66230.9428
Call me sexist, but0.96860.92030.9696
Predicting the Type and Target of Offensive Posts in Social Media0.91640.68470.9098
HateXplain0.86530.8450.8662
Large Scale Crowdsourcing and Characterization of Twitter Abusive BehaviorLarge Scale Crowdsourcing and Characterization of Twitter Abusive Behavior0.78010.74460.7614
Multilingual and Multi-Aspect Hate Speech Analysis0.99440.49860.9972
Hate speech and offensive content identification in indo-european languages0.87790.69040.8706
Are You a Racist or Am I Seeing Things?0.9210.89350.9216
Automated Hate Speech Detection0.94230.92490.9429
Hate Towards the Political Opponent0.87830.65950.8788
Hateful Symbols or Hateful People?0.81870.78330.8323
Overall0.87660.75310.8745

Usage

Install tweetnlp via pip.

pip install tweetnlp

Load the model in python.

import tweetnlp
model = tweetnlp.Classifier("cardiffnlp/twitter-roberta-base-hate-latest")
model.predict('I love everybody :)')
>> {'label': 'NOT-HATE'}

Reference paper - Model based on:

@inproceedings{antypas-camacho-collados-2023-robust,
    title = "Robust Hate Speech Detection in Social Media: A Cross-Dataset Empirical Evaluation",
    author = "Antypas, Dimosthenis  and
      Camacho-Collados, Jose",
    booktitle = "The 7th Workshop on Online Abuse and Harms (WOAH)",
    month = jul,
    year = "2023",
    address = "Toronto, Canada",
    publisher = "Association for Computational Linguistics",
    url = "https://aclanthology.org/2023.woah-1.25",
    pages = "231--242"
}

Contributors

antypasd

14 commits

Pedrada

3 commits