CoolFace
Modelpublic

chartreuse-verte/prose-rewriter-1.7b-v1.5

sourceHugging Faceagpl-3.0updated 24d agoView on Hugging Face
0likes706downloads
Model Card

prose-rewriter-1.7b-v1.5

A paragraph-level prose rewriter: it takes prose written by a large model and re-renders it to be more human, preserving the semantics it was given.

Qwen/Qwen3-1.7B-Base with a rank-32 LoRA merged in at strength 1.20.

Successor to prose-rewriter-1.7b-v1.4. It edits where v1.4 passed -- it hands a paragraph back essentially unchanged a third as often -- on a pool that adds a roleplay-forum register, and a negation slop banishment (e.g. He didn't answer.).

See Evaluation.

Variants

PathFormatUse with
/safetensors bf16, qwen3 archtransformers
GGUF/prose-rewriter-1.7b-v1.5-Q8_0.ggufGGUF Q8_0, 2.17 GBllama.cpp / llama-cpp-python
GGUF/prose-rewriter-1.7b-v1.5-Q4_K_M.ggufGGUF Q4KM, 1.28 GBllama.cpp / llama-cpp-python

The quants carry the chat template and stop on <|im_end|>, and the adapted output head is kept separate from the token embeddings in both — Q80 stores it at Q80, Q4KM at Q6_K.

Prompt format

<|im_start|>source
{paragraph}<|im_end|>
<|im_start|>edit
match<|im_end|>
<|im_start|>rewrite

The chat template in this repo builds exactly that string, byte for byte, from two roles:

python
messages = [
    {"role": "source", "content": paragraph},
    {"role": "edit",   "content": "match"},
]
tok.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)

It is not a chat model. The template rejects an edit value outside the three modes rather than quietly building a prompt the weights have never seen. Any other role is treated as the source paragraph, so a runtime that probes the template with a user message still gets a valid prompt.

The edit block is mandatory

edit names which of three length transforms is being asked for. The values describe the input, not the instruction. They say what kind of text you are handing over:

`edit`what it says about the inputwhat the model does
matchthe source is about the length it should berewrite in place
inflatethe source is padded relative to what it should becut
compressthe source is flattened and too shortopen it back out

match is the setting for "rewrite it, do not trim it". It's strongly recommended you use this mode.

Sending no block is the worst thing you can do to this checkpoint. It was trained with the block, so omitting it collapses the model onto its deletion-heaviest mode.

Serving recipe

Sampled at temperature=0.9, top_p=0.9. Temperature 0.9 has been tested and internally to be the most optimal value. It's recommended you use this.

python
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer

repo = "chartreuse-verte/prose-rewriter-1.7b-v1.5"
tok = AutoTokenizer.from_pretrained(repo)
model = AutoModelForCausalLM.from_pretrained(repo, dtype=torch.bfloat16, device_map="cuda").eval()

def rewrite(paragraph, mode="match"):
    text = tok.apply_chat_template(
        [{"role": "source", "content": paragraph},
         {"role": "edit",   "content": mode}],
        tokenize=False, add_generation_prompt=True,
    )
    ids = tok(text, return_tensors="pt", add_special_tokens=False).input_ids.to(model.device)
    out = model.generate(ids, max_new_tokens=512, do_sample=True, temperature=0.9, top_p=0.9)
    return tok.decode(out[0, ids.shape[1]:], skip_special_tokens=True).strip()

Same thing under llama.cpp. The roles are source and edit, which no chat API models, so build the string yourself; <|im_end|> stops it:

bash
llama-cli -m GGUF/prose-rewriter-1.7b-v1.5-Q8_0.gguf -no-cnv -n 512 --temp 0.9 --top-p 0.9 \
  -p '<|im_start|>source
{paragraph}<|im_end|>
<|im_start|>edit
match<|im_end|>
<|im_start|>rewrite
'

Input length

The training pool's median input is 42 words and most of it is under 70, so serve it on anything from a full sentence up.

The practical floor is about 15 words. Below it the failure mode is padding and fabrication rather than gibberish: the model stretches the line toward its learned length and adds material the input never supported. Below 80 bytes, pass the text through unchanged.

Evaluation

Both releases measured as they ship -- v1.4 baked at strength 1.025, v1.5 at 1.20 -- on 365 held-out paragraphs of LLM-written prose that neither model saw in training, both sent the identical prompt at temperature=0.9, top_p=0.9, three swipes each. Paired over the 356 inputs of 51 words or more.

v1.4v1.5paired *t*
words changed31.6%37.7%+8.94
passed through unchanged12.6%4.8%-6.67
below the training edit floor62.6%49.7%-7.08
near-verbatim outputs6.4%2.0%-4.67
sentence count moved69.8%77.2%+4.09
sentence-length variety vs input+0.112+0.128+2.33
words kept from the input0.7270.674-10.69
length preserved0.8990.880-3.84
truncated below 0.75x13.6%15.8%+1.59
repeated 3-grams0.0050.006+1.01

v1.5 rewrites where v1.4 passed. The move is in how much of the paragraph the model is willing to touch: it hands a paragraph back essentially unedited on 4.8% of inputs against v1.4's 12.6%, leaves a near-verbatim copy a third as often, and clears the edit floor its own training pairs were gated at on half again as many paragraphs. Sentence boundaries move more and sentence-length variety rises with them, so the extra editing is restructuring rather than word-swapping.

It keeps less of the input verbatim, which is the same fact from the other side, and length preservation slips about two points. Truncation does not move: +2.2 points with a 95% interval of [-0.5, +5.0], and repetition does not move either. Those are the two failure modes worth watching at this strength and neither one materialised.

The register numbers on the same paragraphs, this time unpaired and against the input rather than against v1.4:

inputv1.5human corpus
banned constructions /1k7.522.980.00
slop lexicon density0.0900.0560.021
purple score0.4980.319--

A note on strength

Every number above is measured at the strength the release is baked at, which is not the same as measuring the adapter. LoRA strength is spent at merge time (W + (B @ A) * 2.40 here), and the metrics move with it: read at the adapter's natural 1.0 this same checkpoint changes 31% of words and passes 12% of paragraphs through, which is a fair description of the training run and a wrong description of this artifact. Earlier cards in this series quoted the adapter figure.

Training

Corrupt forward, train backward. The human paragraph is the target; an on-policy LLM manufactures the input by slop-ifying it.

The target side is human prose: roughly half r/WritingPrompts (`Mollymo/Human-to-AI-writing`) and two-fifths AO3 (`midwestern-simulation-active/ao3_random_subset`), with a sliver of fanfiction.net (`atom-in-the-universe/fanfics-10k-10k`).

New in v1.5: a roleplay-forum register. Everything above is prose fiction, and this rewriter deploys on roleplay. A scrape of bluemoonroleplaying.com now supplies 9.3% of the target side — the only human writing in the pool that is already in the deployment's own register.

The input side is manufactured from those targets, weighted and share-capped so that no single generator's tics dominate:

pool axiscomposition
rows27,894 over 24,779 distinct targets
corruption bandmedium 37%, heavy 35%, light 24%, identity/no-op 4%
len_modematch 61%, inflate 29%, compress 10%
kindprose 97%, dialogue 2%, structural no-ops 1%
target sourcer/WritingPrompts 50%, AO3 39%, roleplay forum 9%, fanfiction.net 1%

Pairs pass invariant gates before they reach the GPU: POV, tense, who is in the scene, grammatical correctness on the target side, content recall stratified by target length, and NLI entailment both ways. Two further screens shape what reaches training — a floor on how much a pair actually changes, and a floor on the sentence-length variety of the target, applied at a higher threshold for long paragraphs than short ones.

Loss on the target paragraph only. Everything before rewrite is masked.

LoRAr=32, alpha=64, dropout 0.05
target modulesq, k, v, o, gate, up, down, and `lm_head`
trainable39,792,640 params (2.26%)
schedule2 epochs, lr 1e-4 cosine, batch 4 × accum 8, seq 2048
steps1,706 on one RTX 3090

The merge

Merged at strength 1.20. Rank 32 with alpha 64 is a LoRA scaling of 2.0, so the effective scaling is 2.40: W + (B @ A) * 2.40. Merged in float32, stored bfloat16.

lm_head is adapted, and Qwen3-1.7B-Base ties lm_head.weight to embed_tokens.weight. This checkpoint is untied: the merged output head is stored separately and the input embeddings are bit-identical to the base model's, which is what training assumed. config.json says tie_word_embeddings: false and it means it. Do not re-tie it, and if you convert to another format, check that the head survived.

Limitations

  • —Not an instruct model. It has one job and one prompt. There is nothing to ask it.
  • —Works on fictional prose only. May not work on technical documentation.
  • —One paragraph per call. Longer input degrades; split it.
  • —Will not pass AI detectors. Pangram and such will still know because this model preserves word choices and certain sentence structures.
  • —English only, narrative register (third and first person fiction, dialogue with quoted speech).
  • —Short input pads and invents. The floor is about 15 words, and below it the failure is fabrication rather than gibberish. See Input length.
  • —Repeats a noun sooner than an LLM would. Human prose reuses a plain noun where generated prose uses a synonym, and this model has learned that habit.

License

The weights in this repository are released under the GNU Affero General Public License, version 3. The full text is in LICENSE.

This is a derivative of `Qwen/Qwen3-1.7B-Base`, which is licensed under Apache License 2.0. That license is preserved and its terms continue to apply to the base weights this model was built from; the AGPL covers the combined work as distributed here. Apache-2.0 is one-way compatible with AGPLv3, which is what makes this combination possible.

If you run a modified version of this model as a network service, AGPL section 13 requires you to offer the corresponding source of your modifications to its users.