Instructions to use quest-lab/oss-toxicity-roberta with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers.js
How to use quest-lab/oss-toxicity-roberta with Transformers.js:
// npm i @huggingface/transformers import { pipeline } from '@huggingface/transformers'; // Allocate pipeline const pipe = await pipeline('text-classification', 'quest-lab/oss-toxicity-roberta');
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