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');
|
Download README.md from quest-lab/oss-contributor-target-roberta: direct link, hf CLI and curl.
- Browser
- Download file 1.05 kB
-
https://huggingface.co/quest-lab/oss-contributor-target-roberta/resolve/main/README.md
- Command line
-
hf download hf://quest-lab/oss-contributor-target-roberta/README.md
-
curl -L -o README.md https://huggingface.co/quest-lab/oss-contributor-target-roberta/resolve/main/README.md
1.05 kB
| 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 `<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 | | |