Downloads · 30 days
12
2% of all-time downloads
DarrenJiaImbue/editlens-qwen3-4b
editlens-qwen3-4b is a text classification model from DarrenJiaImbue. Use it when you need a label for a piece of text. It is set up for peft. The card lists the license as cc-by-nc-sa-4.0.
A QLoRA adapter on top of Qwen/Qwen3-4B that scores text by the extent of AI involvement, from human-written through fully AI-generated. Trained for the EditLens paper: EditLens: Quantifying the Extent of AI Editing i…
Downloads · 30 days
12
2% of all-time downloads
All-time downloads
668
Public
Repo size
77.6 MB
Likes
0
Public
Click a slice to open those files.
.safetensors66.2 MB · 85%
From the Hugging Face model README
A QLoRA adapter on top of Qwen/Qwen3-4B that scores text by the extent of AI involvement, from human-written through fully AI-generated. Trained for the EditLens paper: EditLens: Quantifying the Extent of AI Editing in Text.
The classification head outputs four buckets:
| Bucket | Label |
|---|---|
| 0 | Human |
| 1 | Light AI Edit |
| 2 | Heavy AI Edit |
| 3 | AI Generated |
A continuous score in [0, 1] is also derivable as the expected value of the bucket distribution.
The training and inference code lives at pangramlabs/EditLens. Minimal load:
import torch
from peft import PeftModel
from transformers import (
AutoModelForSequenceClassification,
AutoTokenizer,
BitsAndBytesConfig,
)
base_model_name = "Qwen/Qwen3-4B"
adapter_name = "DarrenJiaImbue/editlens-qwen3-4b"
n_buckets = 4
tokenizer = AutoTokenizer.from_pretrained(base_model_name)
quantization_config = BitsAndBytesConfig(
load_in_4bit=True,
bnb_4bit_quant_type="nf4",
bnb_4bit_compute_dtype=torch.bfloat16,
)
base = AutoModelForSequenceClassification.from_pretrained(
base_model_name, num_labels=n_buckets, quantization_config=quantization_config,
)
model = PeftModel.from_pretrained(base, adapter_name)
model.eval()
The classification head is a custom NormedLinear (LayerNorm + Linear) defined in scripts/train.py of the training repo. The repo's scripts/inference.py handles head wiring automatically — see that script for end-to-end inference, including bucket and continuous-score computation.
@misc{thai2025editlensquantifyingextentai,
title={EditLens: Quantifying the Extent of AI Editing in Text},
author={Katherine Thai and Bradley Emi and Elyas Masrour and Mohit Iyyer},
year={2025},
eprint={2510.03154},
archivePrefix={arXiv},
primaryClass={cs.CL},
url={https://arxiv.org/abs/2510.03154},
}