Downloads · 30 days
439
1% of all-time downloads
cooperleong00/deberta-v3-large_toxicity-scorer
deberta-v3-large_toxicity-scorer is a text classification model from cooperleong00. Use it when you need a label for a piece of text. It is set up for transformers.
This model is the toxicity classifier used in the paper Self-Detoxifying Language Models via Toxification Reversal.
Downloads · 30 days
439
1% of all-time downloads
All-time downloads
73.6K
Public
Repo size
3.5 GB
Likes
7
Public
Click a slice to open those files.
.bin1.7 GB · 99%
From the Hugging Face model README
This model is the toxicity classifier used in the paper Self-Detoxifying Language Models via Toxification Reversal.
We did not use the Perspective API to assess the toxicity of newly generated text due to its limitations on request throughput. Instead, we trained an offline toxicity scorer on 90k RTP samples not used for evaluation to improve efficiency. Specifically, we fine-tuned a DeBERTa-v3-large (He et al., 2023) model to fit the original API’s toxicity probabilities by minimizing the KL divergence. This fine-tuned model achieved 94.87% accuracy and a 98.54% AUROC score on the hold-out 10k subset, which indicates that it can effectively estimate text toxicity as a substitute for the API. With this accurate estimation performance guarantee, the model has a much higher throughput than the API, i.e., 27,000 samples per second versus typically 25 queries per second using the API.