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