CoolFace
Modelpublic

yaoandy107/greyscope-qwen3.5-4b

sourceHugging Facecc-by-nc-sa-4.0updated 3mo agoView on Hugging Face
2likes355downloads
Model Card

Greyscope (Qwen3.5-4B)

This model is a `unsloth/Qwen3.5-4B-Base` model finetuned for AI-text detection on the EditLens dataset. It classifies text as human-written, AI-edited, or AI-generated, and loads with plain transformers.

English-only for now; Traditional Chinese and Japanese are planned for v2.

Repository: `yaoandy107/greyscope`

Model details

  • The task is ternary AI-text detection (human / AI-edited / AI-generated), plus a continuous 0–1 score for the degree of AI involvement.
  • The head is AutoModelForSequenceClassification with 4 buckets over edit magnitude; the bf16 LoRA (r=32) is merged into the base.
  • The license is CC BY-NC-SA 4.0, research and non-commercial only, inherited from the dataset.
  • The task and data follow the EditLens paper (arXiv:2510.03154).

The 4-bucket distribution is decoded to a 0–1 score by a weighted average; two validation-calibrated thresholds (shipped in calibration.json) split it into human / AI-edited / AI-generated.

Uses

  • Intended use: flagging likely AI-written or AI-edited English text, with a 0–1 score so you can set your own threshold.
  • Out of scope: it is not a substitute for human judgment. Don't use it as sole evidence in high-stakes decisions like academic integrity or employment.

How to use

Requires transformers>=5.5.0 (Qwen3.5 architecture support).

python
import torch
from transformers import AutoModelForSequenceClassification, AutoTokenizer

repo = "yaoandy107/greyscope-qwen3.5-4b"
tok = AutoTokenizer.from_pretrained(repo)
model = AutoModelForSequenceClassification.from_pretrained(repo, dtype=torch.bfloat16).eval()
model.config.pad_token_id = tok.pad_token_id or tok.eos_token_id

This loads the raw model, which outputs 4 bucket logits. The calibrated decode to a human / AI-edited / AI-generated label and 0–1 score (using calibration.json) is in greyscope/inference.py.

Weights are ~9 GB in bf16. The calibrated thresholds are tuned for bf16; re-validate them if you load another dtype or quantization.

Evaluation

Greyscope is evaluated against the open detectors from the OpenPangram blog, on the same splits and protocol. It leads in-domain and on the unseen generator, ties editlens-Llama on Enron, and has the lowest false-positive rate on non-native English; editlens-Llama leads on RAID.

In-domain (ternary, n=6,115)

DetectorAccuracyMacro-F1Human F1AI F1AI-edited F1
Greyscope0.9240.9240.9120.9770.882
editlens-Llama-3.2-3B0.8950.8950.8950.9480.842
editlens-roberta-large0.8810.8810.9000.9230.819
Fast-DetectGPT0.5850.5450.2460.8310.558
Binoculars0.5690.5230.2130.8110.545

Held-out domain: Enron (ternary, n=6,147)

DetectorAccuracyMacro-F1Human F1AI F1AI-edited F1
Greyscope0.8640.8670.8820.9050.816
editlens-Llama-3.2-3B0.8630.8680.8550.9360.812
editlens-roberta-large0.6950.6730.8470.5150.657
Fast-DetectGPT0.6250.5890.2610.8860.619
Binoculars0.6180.5750.2660.8570.601

Held-out generator: Llama-70B (ternary, n=5,957)

DetectorAccuracyMacro-F1Human F1AI F1AI-edited F1
Greyscope0.9390.9380.9300.9810.903
editlens-Llama-3.2-3B0.9210.9200.9180.9650.877
editlens-roberta-large0.8600.8590.9080.8790.791
Fast-DetectGPT0.5620.5060.2620.8170.440
Binoculars0.5400.4780.2270.7960.411

RAID (TPR at 5% FPR, n=10,000)

DetectorTPR@5%FPR ↑AUROC ↑
Greyscope0.9690.991
editlens-Llama-3.2-3B0.9860.996
editlens-roberta-large0.8520.960
Fast-DetectGPT0.9610.989
Binoculars0.9640.989

Scored with RAID's fixed-FPR protocol (per-domain, 5% FPR) on its non-adversarial 10k sample. The OpenPangram blog reports macro-F1, but that leaves detectors at different false-positive rates, so the scores aren't comparable; a detector can rank higher just by flagging more humans.

Human-Detectors (binary, n=300)

DetectorMacro-F1FPR ↓FNR ↓
Greyscope0.9830.0330.000
editlens-Llama-3.2-3B0.9870.0270.000
editlens-roberta-large0.9600.0200.060
Fast-DetectGPT0.7350.4870.013
Binoculars0.8460.0870.220

Non-native English (humans only, n=91), FPR (lower is better):

DetectorFPR ↓
Greyscope0.011
editlens-Llama-3.2-3B0.055
editlens-roberta-large0.099
Fast-DetectGPT0.670
Binoculars0.560

Footprint

Warm forward pass on an M1 Pro (MPS, bf16, batch=1; median of 20, one-time model load excluded):

DetectorParamsMemory512-token passage
Greyscope4.2B9.4 GB2.6 s
editlens-Llama-3.2-3B3.2B6.9 GB1.6 s
editlens-roberta-large0.4B1.0 GB0.2 s

Limitations and biases

  • Research and non-commercial use only (CC BY-NC-SA 4.0).
  • English only; Traditional Chinese and Japanese are planned for v2.
  • Least reliable on lightly-edited and out-of-domain text.
  • The default threshold favors few false accusations (~1% even on non-native English); raise it if you need more recall.

Training

A single bf16 LoRA run on Qwen3.5-4B-Base with a 4-bucket sequence-classification head, about 4 hours on one A100-80GB. The task and data follow EditLens.

Citation

bibtex
@article{Thai2025EditLens,
  title   = {EditLens: Quantifying the Extent of AI Editing in Text},
  author  = {Thai, Katherine and Emi, Bradley and Masrour, Elyas and Iyyer, Mohit},
  journal = {arXiv preprint arXiv:2510.03154},
  year    = {2025}
}

Acknowledgements

  • Open Pangram — the EditLens paper, open dataset, and open-source code this model learned from and builds on.
  • Modal — training ran on their free monthly compute credits.
  • Unsloth — efficient LoRA fine-tuning.