Instructions to use jpcorb20/toxic-detector-distilroberta with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use jpcorb20/toxic-detector-distilroberta with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="jpcorb20/toxic-detector-distilroberta")# Load model directly from transformers import AutoTokenizer, AutoModelForSequenceClassification tokenizer = AutoTokenizer.from_pretrained("jpcorb20/toxic-detector-distilroberta") model = AutoModelForSequenceClassification.from_pretrained("jpcorb20/toxic-detector-distilroberta") - Notebooks
- Google Colab
- Kaggle
YAML Metadata Warning:empty or missing yaml metadata in repo card
Check out the documentation for more information.
Distilroberta for toxic comment detection
See my GitHub repo toxic-comment-server
The model was trained from DistilRoberta on Kaggle Toxic Comments with the BCEWithLogits loss for Multi-Label prediction. Thus, please use the sigmoid activation on the logits (not made to use the softmax output, e.g. like the HF widget).
Evaluation
F1 scores:
toxic: 0.72
severe_toxic: 0.38
obscene: 0.72
threat: 0.52
insult: 0.69
identity_hate: 0.60
Macro-F1: 0.61
- Downloads last month
- 22