/ Модель

Характеристики

Контекст
32 768 токенов
Параметры
3,7 млрд
Лицензия
AGPL 3.0
Архитектура
qwen3 · dense
Базовая модель
Qwen3-4B-Base
Библиотека
transformers
Опубликована
21 авг 2026

prose-rewriter-4b-v1.2

Генерация текстаТекст → текст3 профессии

prose-rewriter-4b-v1.2 — текстовая модель для переписывания прозы на уровне абзацев, разработанная chartreuse-verte на базе Qwen/Qwen3-4B-Base.

464скачиваний за 30 дней2лайкавеса обновлены29 авг 2026

Бенчмарки

Как модель справилась с задачами пользователей ailist и что о ней публикуют открытые лидерборды

Тесты пользователейпока нет

Никто ещё не опубликовал тест этой модели. Соберите бенчмарк из своих задач — результат появится здесь.

  1. Добавьте модель в бенчмарк

    Вместе с другими моделями категории «Текст» — сравнение идёт внутри одной категории.

  2. Опишите свои задачи

    Напишите запросы, при необходимости приложите файлы и эталонные ответы.

  3. Запустите и опубликуйте

    Модели ответят на каждую задачу, судья оценит ответы. Опубликованный результат появится на этой странице.

Публичные оценки

Из открытых лидербордов. Сравнивайте результаты одного теста при одинаковых условиях — отсутствие оценки не значит, что модель хуже.

В подключённых источниках результатов для этой модели пока нет.

Что умеет модель

Описание составлено по карточке модели и метаданным Hugging Face

Она преобразует текст, сгенерированный крупной языковой моделью, в более естественную и «человеческую» форму, стремясь сохранять исходную семантику. Модель ориентирована на редактирование прозы, перенос стиля, улучшение литературного качества и удаление характерных следов машинной генерации. Заявленный язык — английский.

Модель содержит около 4 млрд параметров и использует архитектуру Qwen3; поверх базовой модели применён LoRA-адаптер ранга 32, объединённый с весами с коэффициентом 1,15. Поддерживаются варианты в формате safetensors BF16, а также GGUF Q8_0 и Q4_K_M для llama.cpp и llama-cpp-python. Обрабатывается один абзац за вызов; рекомендуемый режим match сохраняет длину текста. Также доступны режимы inflate и compress для сокращения или расширения исходного текста. Документированный предел входа составляет 512 токенов, максимальный объём генерации — 512 новых токенов.

Сильными сторонами модели являются низкая склонность к самоповторениям и стабильная остановка генерации на диапазоне входов примерно от 15 до 120 слов. Ограничения включают заметную склонность дополнять и выдумывать содержание для очень коротких входов, особенно короче 15 слов; в таких случаях значительная часть результатов содержит материал, не подтверждённый исходным текстом. Модель не является универсальным чат-ассистентом: требуется специальный шаблон с ролями source и edit, причём блок edit обязателен. Распространяется по лицензии AGPL-3.0.

Для каких профессий подходит3

Разделы каталога профессий, в задачах которых используется эта модель

Все профессии

Карточка модели

README от автора на Hugging Face, как он его опубликовал

Открыть на Hugging Face

prose-rewriter-4b-v1.2

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-4B-Base with a rank-32 LoRA merged in at strength 1.15.

This is the larger of two checkpoints trained on the same pool and pipeline. A smaller version here: 1.7B

Variants

PathFormatUse with
/safetensors bf16, qwen3 archtransformers
GGUF/prose-rewriter-4b-v1.2-Q8_0.ggufGGUF Q8_0, 4.69 GBllama.cpp / llama-cpp-python
GGUF/prose-rewriter-4b-v1.2-Q4_K_M.ggufGGUF Q4_K_M, 2.72 GBllama.cpp / llama-cpp-python

VRAM

Measured on an RTX 3090 with llama-server -ngl 99 at stock settings (flash attention auto, f16 KV), read as the server process's resident VRAM after load and before the first request.

-c is the TOTAL context and llama.cpp divides it by --parallel. A -c 4096 --parallel 8 server gives each slot 512 tokens and silently truncates long paragraphs. Ask for slots x 1280: 512 source tokens is the documented input ceiling, the generation budget never exceeds 512, and the prompt's three blocks are a dozen more.

slots-cQ8_0Q4_K_M
112804,624 MiB2,922 MiB
225604,804 MiB3,102 MiB
451205,164 MiB3,462 MiB
8102405,884 MiB4,182 MiB

It is linear, so extrapolate freely: the weights are a fixed 4,444 MiB (Q8_0) or 2,742 MiB (Q4_K_M), and every 1280-token slot adds 180 MiB of KV cache on either quant. Only the total matters -- -c 2048 --parallel 1 and -c 2048 --parallel 2 allocate the same bytes.

Four slots is a sensible default. Eight reserves better than a gigabyte of KV before the first request arrives, which on a small card is the difference between fitting and not. The 1.7B runs the same eight slots in 3,202 MiB.

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:

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 user / assistant / system, and an edit value outside the three modes, rather than quietly building a prompt the weights have never seen.

One paragraph per call. Generation stops on <|im_end|>, which is set as an eos_token_id in generation_config.json. Temperature is the only knob.

The edit block is mandatory

edit names which of three length transforms is being asked for. The values are the corruptor's, so they read backwards. They name what was done to build the input, not what the model should do to it:

editwhat it says about the inputwhat the model does
matchthe source is the human's lengthrewrite in place
inflatethe source was padded relative to the human originalcut
compressthe source was flattened and shortenedopen 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.

import torch
from transformers import AutoModelForCausalLM, AutoTokenizer

repo = "chartreuse-verte/prose-rewriter-4b-v1.2"
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:

llama-cli -m GGUF/prose-rewriter-4b-v1.2-Q8_0.gguf -st -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

input wordsgenerationslength ratioinvention3-gram self-repetition
< 152881.4168%0.000
15-242191.0031%0.001
25-391080.9632%0.000
40-59600.9527%0.001
60-791800.9124%0.002
80-1191700.9024%0.002

length ratio is median output words over input words. invention is the share of generations carrying a sentence the input does not entail (DeBERTa-MNLI, min entailment < 0.5). 3-gram self-repetition is the fraction of a generation's 3-grams that repeat inside it -- the degeneracy signal.

Nothing degenerates at any length. Self-repetition sits at noise across the whole range, and not one of these generations failed to stop or came back empty. What actually happens below ~15 words is that the model pads and invents: it stretches the line toward its learned length and roughly 70% of outputs add material the input never supported, against ~25% at paragraph length. Between 15 and 120 words nothing moves much.

So serve it on anything from a full sentence up. Below 80 bytes, pass the text through unchanged.

Evaluation

1.7B4B
val loss0.82140.7539
train loss0.97350.9104
invention rate0.1770.146
copy rate0.0620.062
copy excess vs target+0.001−0.009
distinct-40.9820.982
entropy0.5300.506
length ratio1.0251.004

The 4B invents less and copies no more, at flat diversity, which is the direction scale was expected to move.

A known quirk is that human-written texts use less rare vocabulary than LLM texts. This is a trade-off that must be accepted.

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 60/40 r/WritingPrompts (Mollymo/Human-to-AI-writing) and AO3 (midwestern-simulation-active/ao3_random_subset), with a sliver of fanfiction.net (atom-in-the-universe/fanfics-10k-10k).

The input side was generated by eight corruptor endpoints, weighted so no single model's tics dominate:

pool axiscomposition
rows60,323 over 48,395 distinct targets
corruptords-flash-nano 21%, artemis 21%, ds-flash 18%, gemma-31b 16%, qwen-flash 12%, then muse-spark, ds-pro
corruption bandmedium 38%, heavy 34%, light 25%
len_modematch 60%, inflate 23%, compress 10%, unmarked 7%
kindprose 93%, dialogue 7%, structural no-ops 0.7%

Pairs pass invariant gates before they reach the GPU: POV, tense, who is in the scene, grammatical correctness on the target side, and NLI entailment both ways. About 44k of 317k raw corruptions survive; the training pool is the seeded subset of those. This is the same pool the 1.7B was trained on, in the same order.

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

LoRAr=32, alpha=32, dropout 0.05
target modulesq, k, v, o, gate, up, down, and lm_head
trainable71,004,160 params (1.73%)
schedule1 epoch, lr 1e-4 cosine, batch 4 × accum 8, seq 2048
steps1,659 on one RTX 3090, 2h14
losstrain 0.9104, val 0.7539 (601 val rows, document-disjoint)

The merge, and one thing not to do

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

lm_head is adapted, and Qwen3-4B-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.

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-4B-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.

Как запустить

На своей GPU в ailist. Цена — по текущим предложениям провайдеров

GPU в ailist

Универсальный рантайм · transformers

Можно запустить

Подбираем GPU…

Класс архитектуры
Qwen3ForCausalLM
Ревизия весов
3f2a2e6

0 моделей