This model is trained for toxicity classification task. The dataset used for training is the merge of the English parts of the three datasets by
Jigsaw
(
Jigsaw 2018
,
Jigsaw 2019
,
Jigsaw 2020
), containing around 2 million examples. We split it into two parts and fine-tune a RoBERTa model (
RoBERTa: A Robustly Optimized BERT Pretraining Approach
) on it. The classifiers perform closely on the test set of the first Jigsaw competition, reaching the
AUC-ROC
of 0.98 and
F1-score
of 0.76.
How to use
import torch
from transformers import RobertaTokenizer, RobertaForSequenceClassification
tokenizer = RobertaTokenizer.from_pretrained('s-nlp/roberta_toxicity_classifier')
model = RobertaForSequenceClassification.from_pretrained('s-nlp/roberta_toxicity_classifier')
batch = tokenizer.encode("You are amazing!", return_tensors="pt")
output = model(batch)
# idx 0 for neutral, idx 1 for toxic
Citation
To acknowledge our work, please, use the corresponding citation:
@inproceedings{logacheva-etal-2022-paradetox,
title = "{P}ara{D}etox: Detoxification with Parallel Data",
author = "Logacheva, Varvara and
Dementieva, Daryna and
Ustyantsev, Sergey and
Moskovskiy, Daniil and
Dale, David and
Krotova, Irina and
Semenov, Nikita and
Panchenko, Alexander",
booktitle = "Proceedings of the 60th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers)",
month = may,
year = "2022",
address = "Dublin, Ireland",
publisher = "Association for Computational Linguistics",
url = "https://aclanthology.org/2022.acl-long.469",
pages = "6804--6818",
abstract = "We present a novel pipeline for the collection of parallel data for the detoxification task. We collect non-toxic paraphrases for over 10,000 English toxic sentences. We also show that this pipeline can be used to distill a large existing corpus of paraphrases to get toxic-neutral sentence pairs. We release two parallel corpora which can be used for the training of detoxification models. To the best of our knowledge, these are the first parallel datasets for this task.We describe our pipeline in detail to make it fast to set up for a new language or domain, thus contributing to faster and easier development of new parallel resources.We train several detoxification models on the collected data and compare them with several baselines and state-of-the-art unsupervised approaches. We conduct both automatic and manual evaluations. All models trained on parallel data outperform the state-of-the-art unsupervised models by a large margin. This suggests that our novel datasets can boost the performance of detoxification systems.",
}
Licensing Information
This model is licensed under the OpenRAIL++ License, which supports the development of various technologies—both industrial and academic—that serve the public good.
Runs of garak-llm roberta_toxicity_classifier on huggingface.co
63.3K
Total runs
0
24-hour runs
122
3-day runs
8.0K
7-day runs
-28.2K
30-day runs
More Information About roberta_toxicity_classifier huggingface.co Model
More roberta_toxicity_classifier license Visit here:
roberta_toxicity_classifier huggingface.co is an AI model on huggingface.co that provides roberta_toxicity_classifier's model effect (), which can be used instantly with this garak-llm roberta_toxicity_classifier model. huggingface.co supports a free trial of the roberta_toxicity_classifier model, and also provides paid use of the roberta_toxicity_classifier. Support call roberta_toxicity_classifier model through api, including Node.js, Python, http.
roberta_toxicity_classifier huggingface.co is an online trial and call api platform, which integrates roberta_toxicity_classifier's modeling effects, including api services, and provides a free online trial of roberta_toxicity_classifier, you can try roberta_toxicity_classifier online for free by clicking the link below.
garak-llm roberta_toxicity_classifier online free url in huggingface.co:
roberta_toxicity_classifier is an open source model from GitHub that offers a free installation service, and any user can find roberta_toxicity_classifier on GitHub to install. At the same time, huggingface.co provides the effect of roberta_toxicity_classifier install, users can directly use roberta_toxicity_classifier installed effect in huggingface.co for debugging and trial. It also supports api for free installation.
roberta_toxicity_classifier install url in huggingface.co: