🚀 毒性分類モデル
このモデルは、毒性分類タスク用に訓練されています。訓練に使用されたデータセットは、Jigsawによる3つのデータセット(Jigsaw 2018、Jigsaw 2019、Jigsaw 2020)の英語部分を統合したもので、約200万件のサンプルを含んでいます。これを2つに分割し、RoBERTaモデル(RoBERTa: A Robustly Optimized BERT Pretraining Approach)をファインチューニングしました。分類器は、最初のJigsawコンペティションのテストセットで良好な性能を発揮し、AUC-ROCが0.98、F1スコアが0.76に達しました。
属性 |
详情 |
モデルタイプ |
毒性分類モデル |
訓練データ |
Jigsawの3つのデータセットの英語部分の統合(約200万件のサンプル) |
ベースモデル |
FacebookAI/roberta-large |
使用データセット |
google/jigsaw_toxicity_pred |
ライセンス |
OpenRAIL++ |
🚀 クイックスタート
この毒性分類モデルは、有害コメントを識別するために訓練されています。以下に、使用方法を説明します。
✨ 主な機能
- 有害コメントの分類タスクに特化して訓練されたモデルです。
- 大規模なデータセットを使用して訓練されており、高い性能を発揮します。
📦 インストール
このモデルを使用するには、transformers
ライブラリが必要です。以下のコマンドでインストールできます。
pip install transformers torch
💻 使用例
基本的な使用法
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)
📚 ドキュメント
このモデルは、有害コメントを分類するために訓練されています。訓練に使用されたデータセットは、Jigsawの3つのデータセットの英語部分を統合したもので、約200万件のサンプルを含んでいます。ベースモデルとしてRoBERTaを使用し、ファインチューニングを行っています。
📄 ライセンス
このモデルは、OpenRAIL++ライセンスの下で提供されています。このライセンスは、産業界や学界など、公共の利益に資する様々な技術の開発をサポートしています。
📖 引用
このモデルを使用する際には、以下の引用を使用してください。
@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.",
}