Downloads · 30 days
10
15% of all-time downloads
TheSky0908/gpt-neo-1.3B-toxicity-surrogate
gpt-neo-1.3B-toxicity-surrogate is a text classification model from TheSky0908. Use it when you need a label for a piece of text. It is set up for transformers. The card lists the license as apache-2.0.
A GPTNeoForSequenceClassification head fine-tuned on the Jigsaw Toxic Comment Classification corpus. It outputs a continuous P(toxic) ∈ [0, 1] for a piece of English text (softmax probability of the toxic class, label…
Downloads · 30 days
10
15% of all-time downloads
All-time downloads
65
Public
Parameters
1.3B
5.3 GB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors5.3 GB · 100%
From the Hugging Face model README
A GPTNeoForSequenceClassification head fine-tuned on the Jigsaw Toxic Comment
Classification corpus. It outputs a continuous P(toxic) ∈ [0, 1] for a piece
of English text (softmax probability of the toxic class, label index 1).
The model is used as an external violation scorer (a CDD-style surrogate) in research on guided discrete diffusion for controllable text generation: at evaluation time it scores decoded samples, and it also provides the soft labels used to train the per-timestep guidance classifiers.
softmax(logits)[1] = P(toxic).import torch
from transformers import AutoTokenizer, AutoModelForSequenceClassification
repo = "TheSky0908/gpt-neo-1.3B-toxicity-surrogate"
tok = AutoTokenizer.from_pretrained(repo)
model = AutoModelForSequenceClassification.from_pretrained(repo).eval()
text = "I hope you have a wonderful day."
enc = tok(text, return_tensors="pt", truncation=True, max_length=256)
with torch.no_grad():
p_toxic = torch.softmax(model(**enc).logits, dim=-1)[0, 1].item()
print(f"P(toxic) = {p_toxic:.4f}")
Arsive/toxicity_classification_jigsaw.
The six Jigsaw sub-labels (toxic, severe_toxic, obscene, threat,
insult, identity_hate) are consolidated into a single binary target:
label 1 if any sub-label is positive, else 0.
EleutherAI/gpt-neo-1.3B, 2-way sequence-classification head.1e-5, weight decay 0.01, linear schedule with 6% warmup, grad-clip 1.0.| Metric | Value |
|---|---|
| F1 | 0.9885 |
| Accuracy | 0.9886 |
| ROC-AUC | 0.9986 |
| Precision | 0.9855 |
| Recall | 0.9916 |
Trained only on Jigsaw English comments, so it inherits that corpus's annotation biases (e.g. sensitivity to identity terms) and does not transfer to other languages or domains. High held-out F1 reflects in-distribution Jigsaw data, not real-world moderation performance. Use as a research surrogate signal, not as a safety-critical filter.