#distilbert-base-uncased
This model is based on the pre-trained model [distilbert-base-uncased] and was fine-tuned on a dataset of tweets from Kaggle's Toxic Comment Classification Challenge
Inputs
The model has been trained on the toxicity of tweets ranging from toxic, severe toxic, obscene, threat, insult, hate speech
Outputs
The model predicts 6 signals of toxicity:
Toxic Severe Toxic Obscene Threat Insult Hate Speech
A value between 0 and 1 is predicted for each signal.
Intended uses & limitations
The model was created to be used as a toxicity detector of tweets based on the six categories. Other forms of toxicity from tweets may not be calculated with this model.
How to use
The model can be used directly with a text-classification pipeline:
>>> from transformers import pipeline
>>> text = "Your vandalism to the Matt Shirvington article has been reverted. Please don't do it again, or you will be banned."
>>> pipe = pipeline("text-classification", model="dk3156/toxic_tweets_model")
>>> pipe(text, return_all_scores=True)
[[{'label0': 'score': 0.02},
{'label1': 'score': 0.0},
{'label2': 'score': 0.0},
{'label3': 'score': 0.0},
{'label4': 'score': 0.0},
{'label5': 'score': 0.0}]]
Training procedure
The pre-trained model was fine-tuned for sequence classification using the following hyperparameters, which were selected from a validation set:
- Batch size = 16
- Learning rate = 5e-5
- Epochs = 1
The optimizer used was AdamW.