模型:

EIStakovskii/french_toxicity_classifier_plus_v2

英文

描述

注意:该模型的版本是 EIStakovskii/french_toxicity_classifier_plus 的改良版。要查看训练的源代码和数据,请访问 the github link 。

此模型是为了毒性标注而训练的。

该模型是基于 the CamemBERT language model 进行微调的。

使用该模型的方法:

from transformers import pipeline

classifier = pipeline("text-classification", model = 'EIStakovskii/french_toxicity_classifier_plus_v2')

print(classifier("Foutez le camp d'ici!"))

指标(在验证时):

epoch step eval_accuracy eval_f1 eval_loss
1.16 1600 0.9015412511332729 0.8968269048071442 0.3014959990978241

与 Perspective 的比较

该模型与 Google 的 Perspective API 进行了比较,两个模型在两个数据集上进行了测试:大小分别为 200 sentences 和 400 sentences 。第一个数据集(可能更难)是从 JigSaw 和 DeTox 数据集的句子中收集而来。第二个数据集(较简单)是从 JigSaw 和 DeTox 中收集的,以及 Paradetox 中的翻译和根据关键词从 Reverso Context 中提取的句子。

french_toxicity_classifier_plus_v2

size accuracy f1
200 0.783 0.803
400 0.890 0.879

Perspective

size accuracy f1
200 0.826 0.795
**400 0.632 0.418

**我怀疑在 FR 数据集(400)的情况下,Perspective 评分如此低是因为它拒绝触发法语中的 "merde" 和 "putain" 等更稀少的词语。