Toxic-language classifier for GitHub discussion comments

Fine-tuned RoBERTa-base that scores whether an issue or pull-request discussion comment contains toxic language (label 1 = toxic). Trained on manually annotated GitHub comments plus one active-learning round, from the study Toxicity in Open Source: Does It Hit Gaming Projects Differently?. This repository holds an 8-bit quantized ONNX export for in-browser use with transformers.js.

Input: comment text cleaned as in the study (quoted text, code, and URLs removed; @-mentions and emails replaced with <USER>), truncated to 256 tokens. Decision threshold: 0.35.

Held-out test set (988 comments) Precision Recall F1
Original PyTorch model 0.840 0.582 0.688
This quantized ONNX model (transformers.js) 0.838 0.585 0.689

Use it to raise awareness, not to make automatic moderation decisions: some toxic comments are missed and some non-toxic comments are flagged.

Downloads last month
33
Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support