--- library_name: transformers.js pipeline_tag: text-classification tags: [toxicity, open-source-software, github, onnx] --- # Contributor-target classifier for toxic GitHub comments Fine-tuned RoBERTa-base that scores whether a toxic issue or pull-request discussion comment is directed at a contributor within the project (label 1 = `contributor_within_project`), as opposed to code, external tools, game content, oneself, or other targets. 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:** a comment already classified as toxic, cleaned as in the study (quoted text, code, and URLs removed; @-mentions and emails replaced with ``), truncated to 256 tokens. **Decision threshold:** 0.50. | Held-out toxic test comments (407) | Precision | Recall | F1 | |---|---|---|---| | Original PyTorch model | 0.845 | 0.826 | 0.835 | | This quantized ONNX model (transformers.js) | 0.832 | 0.839 | 0.836 |