steerlab

deslop

Measure and remove the writing habits of chat models: em dashes, “it’s not X, it’s Y”, lists of three, questions answered on the spot, signposts, stock phrases, slop words, markdown in prose, invented studies.

The research note that built and tested it, with every number: the deslop note. The de-slopped Qwen3-4B it produced: albertlieadrian/qwen3-4b-deslop.

Install

pip install "steerlab-deslop @ git+https://github.com/albertlieyingadrian/steerlab#subdirectory=packages/deslop"
# with the sampler and hooks (torch, transformers):
pip install "steerlab-deslop[models] @ git+https://github.com/albertlieyingadrian/steerlab#subdirectory=packages/deslop"

Use

deslop score essay.txt              # score, human percentile, habits, and the text with each habit marked
deslop score - --json --spans < essay.txt
deslop check essay.txt --genre opinion --words 250
deslop habits                       # the habits, their weights and the human band
deslop generate --model Qwen/Qwen3-4B-Instruct-2507 --prompt "Write a blog post about sleep." --sampler
deslop voice profile my-essays/*.txt --name me -o me.json
deslop voice compare draft.txt --voice me.json
deslop voice rewrite draft.txt --voice me.json --samples my-essays/a.txt my-essays/b.txt --api-model gpt-5.4-mini
from deslop import score

s = score("Remote work isn't just a trend — it's a revolution. Here's the thing: it works.")
s.score  # points per 1000 words
s.counts  # {"em_dash": 1, "not_x_but_y": 1, "signpost": 1, ...}
s.human_percentile  # share of human passages that score at or below this text
s.in_human_band  # at or below the human 90th percentile
from deslop.sampler import antislop_generate

out = antislop_generate(model, tokenizer, [{"role": "user", "content": "Write about sleep."}], max_new_tokens=400)
out.text, out.backtracks

What this is not

Not a detector bypass. Removing the habits that people notice does not remove what detectors measure: in the note, open detectors still flag most de-slopped replies. Disclose AI assistance wherever it is required or expected (school, journals, many workplaces); this toolkit is for writing better, not for hiding where text came from.

What the score is and is not

The score is a pointer, not a verdict. People use em dashes and lists of three too: the human passages score a median of 12.8, and 90% of them score 33.6 or less, which is where the band ends. On 48 held-out prompts, Qwen3-4B-Instruct-2507 scores 89.7, and EQ-Bench’s independent slop score orders the 13 setups in the note much the same way (Spearman 0.84). It is not an AI detector, and a low score does not make writing good: in the note, an LLM judge preferred the high-scoring original in most pairs.

Credits

The habit list follows Erik Markus Kannike’s qwen3-4b-deslop style guide and Wikipedia’s Signs of AI writing; the word list draws on Kobak et al. (Science Advances, 2025) and EQ-Bench’s slop-score (MIT); the sampler follows Paech et al.’s Antislop. MIT licence.