Downloads · 30 days
34
0% of all-time downloads
Xuhui/ToxDect-roberta-large
ToxDect-roberta-large is a text classification model from Xuhui. Use it when you need a label for a piece of text. It is set up for transformers.
A toxic language detection model trained on tweets. The base model is Roberta-large. For more information, including the training data, limitations and bias, please refer to the paper and Github repo for more details.
Downloads · 30 days
34
0% of all-time downloads
All-time downloads
11M
Public
Repo size
2.8 GB
Likes
4
Public
Click a slice to open those files.
.bin1.4 GB · 100%
From the Hugging Face model README
A toxic language detection model trained on tweets. The base model is Roberta-large. For more information, including the training data, limitations and bias, please refer to the paper and Github repo for more details.
Note that LABEL_1 means toxic and LABEL_0 means non-toxic in the output.
from transformers import pipeline
classifier = pipeline("text-classification",model='Xuhui/ToxDect-roberta-large', return_all_scores=True)
prediction = classifier("You are f**king stupid!", )
print(prediction)
"""
Output:
[[{'label': 'LABEL_0', 'score': 0.002632011892274022}, {'label': 'LABEL_1', 'score': 0.9973680377006531}]]
"""
The random seed for this model is 22. For other details, please refer to the Github repo for more details.
@inproceedings{zhou-etal-2020-debiasing,
title = {Challenges in Automated Debiasing for Toxic Language Detection},
author = {Zhou, Xuhui and Sap, Maarten and Swayamdipta, Swabha and Choi, Yejin and Smith, Noah A.},
booktitle = {EACL},
abbr = {EACL},
html = {https://www.aclweb.org/anthology/2021.eacl-main.274.pdf},
code = {https://github.com/XuhuiZhou/Toxic_Debias},
year = {2021},
bibtex_show = {true},
selected = {true}
}