Downloads · 30 days
4.6K
1% of all-time downloads
citizenlab/distilbert-base-multilingual-cased-toxicity
distilbert-base-multilingual-cased-toxicity is a text classification model from citizenlab. Use it when you need a label for a piece of text. It is set up for transformers.
This is multilingual Distil-Bert model sequence classifier trained based on JIGSAW Toxic Comment Classification Challenge dataset.
Downloads · 30 days
4.6K
1% of all-time downloads
All-time downloads
341K
Public
Repo size
3.8 GB
Likes
23
Public
Click a slice to open those files.
.bin541 MB · 99%
From the Hugging Face model README
This is multilingual Distil-Bert model sequence classifier trained based on JIGSAW Toxic Comment Classification Challenge dataset.
from transformers import pipeline
model_path = "citizenlab/distilbert-base-multilingual-cased-toxicity"
toxicity_classifier = pipeline("text-classification", model=model_path, tokenizer=model_path)
toxicity_classifier("this is a lovely message")
> [{'label': 'not_toxic', 'score': 0.9954179525375366}]
toxicity_classifier("you are an idiot and you and your family should go back to your country")
> [{'label': 'toxic', 'score': 0.9948776960372925}]
Accuracy Score = 0.9425
F1 Score (Micro) = 0.9450549450549449
F1 Score (Macro) = 0.8491432341169309