Views
No views yet
1import torch
2from transformers import AutoTokenizer, AutoModel
3from peft import PeftModel
4
5base = "Qwen/Qwen3-1.7B-Base"
6tok = AutoTokenizer.from_pretrained("reneeice/ood-editguard-qwen3-0.6b")
7backbone = PeftModel.from_pretrained(AutoModel.from_pretrained(base, torch_dtype=torch.bfloat16),
8 "reneeice/ood-editguard-qwen3-0.6b")
9head = torch.load("ood_head.pt") # downloaded from the repo
10# score(text) = orientation * ||proj(meanpool(backbone(text))) - center||^2pangram/editlens_iclr (held-out):| Metric | Value |
|---|---|
| AUROC (AI vs human) | 0.910 |
| AUPR | 0.952 |
| correlation with edit-magnitude | +0.730 |
editlens-qwen3-*-repro models (search HF: editlens qwen3 repro)
models bring it to a modern Qwen3 backbone.| Model | What it is | Use it when |
|---|---|---|
ood-editguard-qwen3-0.6b ← you are here | Standalone OOD AI-edit detector — a Qwen3 backbone fine-tuned (QLoRA) with an out-of-distribution head; outputs a continuous "how AI-edited" score. | You want one self-contained model that scores text end-to-end. |
editlens-ood-adapter-qwen3-0.6b | Tiny OOD adapter (a few MB) that snaps onto a frozen EditLens-Qwen3 (search HF: editlens qwen3 repro) checkpoint to add an anomaly / human-likeness score — no backbone training. | You already run EditLens and want to add an OOD score cheaply. |
editlens-ood-selective-guard-qwen3 | Reliability guard for selective prediction — an OOD gate that abstains on inputs unlike the training distribution so the edit-score isn't trusted blindly. | You need calibrated, low-false-positive decisions and can abstain on hard cases. |
Why three? They trade off cost and integration: A is a standalone model, B is a cheap add-on to an existing EditLens deployment, and C wraps either with an abstain-on-uncertainty safety layer. Pick the one that matches how you deploy.
Qwen/Qwen3-1.7B-Base, bf16 + LoRA (rank 8, all attn+MLP projections).c, push AI
embeddings away. Score = oriented squared distance to c.cosine_score (thresholds 0.03/0.15).Qwen/Qwen3-*-Base. The supervision labels derive from the
gated pangram/editlens_iclr
dataset; please honor its terms. Method credit: Human Texts Are Outliers
(2510.08602) and EditLens
(2510.03154).