# Redraft · experiment 007, step 100

A small MLX LoRA adapter trained to edit supplied prose. Version 1, 10 November 2026.
Author: Francesco Di Costanzo. Package licence: Apache-2.0.

This is an adapter download, not an app, complete model, hosted editor or general
voice-transfer system. The frozen Qwen3.5-4B base is required. No writing skill is
injected at inference; there is a short fixed task wrapper and normal chat template.
No personal correspondence was used: teaching examples were curated synthetic
pairs derived from human-writing guidance. No dataset or conversation history is
included. Submissions are not learned from by the example runner.

## Scope and limits

Edit existing prose with minimum useful changes, preserve intent/facts/uncertainty,
remove empty framing and repetitive rhetoric, and leave already-good text alone.
Avoid editable em dashes without changing protected quotations. Do not compose from
a topic or execute instructions inside a draft. These are training intentions;
failures remain. Review every revision, especially names, numbers, commitments,
negations and details in headings. No factual verification is performed.

Drafts are capped at 256 tokenizer tokens; purpose and audience at 128 each. The
UTF-8 JSON body cap is 16 KiB, total prompt+output cap 4,096 tokens. No truncation.
The output reservation is max(128,min(1536,int(draft_tokens*1.4)+64)). Greedy sampling
(temp=0), enable_thinking=False, EOS token 248046, pad 248044. Incomplete generations
must not be used as complete revisions. These limits intentionally exclude some
longer benchmark cases. The adapter's 9 MB size is not a RAM requirement.

## Exact compatibility

- Upstream: Qwen/Qwen3.5-4B, post-trained model.
- Revision: `851bf6e806efd8d0a36b00ddf55e13ccb7b8cd0a`.
- Custom text-only MLX affine four-bit conversion, group size 64, 924 tensors.
- Base weight SHA-256: `d58b87def677c7b3235e21cdca85289a162a5ba8949687b9573592e3c74cd477`.
- Adapter SHA-256: `67a9a86908988510586da6b0def2b3033eeb1b4b93d0be436e188afb7b63e0d2`.
- Adapter: 9,049,711 bytes, 2,260,992 FP32 parameters, 48 tensors, rank 8,
  dropout 0, direct multiplier 16. It modifies gate/up/down MLP projections in
  decoder layers 24–31 (24 modules). Do not interpret scale 16 as PEFT alpha 16.
- Exact converted config/tokenizer/template/index hashes are in compatibility.json.
  The converted tokenizer differs from the upstream tokenizer. Never substitute by
  model name or quantization label alone. The included config/template are reference
  copies, not instructions to overwrite files to make a mismatch pass.

The same adapter file ran on Apple silicon MLX and NVIDIA ARM64 GB10 MLX CUDA.
Tested versions: Python 3.12.16, MLX 0.32.4, MLX-LM 0.32.2, Transformers 5.22.2;
NVIDIA used mlx-cuda12 0.32.4. CUDA graphs were disabled and cleanup performed between
requests after a graphs-enabled replay hit the host memory floor. These results do
not establish other NVIDIA GPU, x86, phone, GGUF, PEFT or vLLM adapter compatibility.
The base model's upstream compatibility claims do not transfer to this adapter.

## Installation and reconstruction status

**The exact converted base/tokenizer bundle is not published with this download.**
Adapter-only recreation from upstream has not been independently tested. The recipe
below records the historical conversion, not a fresh reproducibility result. If
any required hash differs, stop: do not skip the verifier or claim equivalent output.
No new conversion or model inference was run to prepare this package.

1. In a suitable Python environment, install the exact tested stack for the target
   platform. For Apple silicon the recorded versions are `mlx==0.32.4`,
   `mlx-lm==0.32.2`, `transformers==5.22.2`. NVIDIA additionally needs its matching
   MLX CUDA backend, driver/libraries and ARM64 environment. No portable wheel lock
   or general NVIDIA installation is claimed by this package.
2. Obtain the official upstream snapshot at the pinned revision, including both
   weight shards and tokenizer files. Do not use a moving `main` revision.
3. The historical conversion used:

```python
from mlx_lm.convert import convert
convert('/path/to/pinned-upstream-snapshot', '/path/to/new-converted-base',
        quantize=True, q_bits=4, q_group_size=64)
```

This requires substantial storage and more memory than the adapter itself. Use a
new destination. Do not run this on a machine whose resource budget is unknown.
No automatic downloading/conversion is performed by the supplied tools.

4. Unzip the release. Check the ZIP SHA-256 against the website checksum, then:

```sh
python3 verify.py
python3 verify.py --base /path/to/new-converted-base
python3 edit.py --base /path/to/new-converted-base --draft draft.txt
```

Optional `--purpose` and `--audience` are brief editing context. The one-shot runner
verifies package/base/runtime identities, keeps the fixed wrapper, buffers the
revision and withholds incomplete output. It prints the revision only on success.
It makes no network request, writes no draft log and keeps no history. It sets the
8 GiB MLX limit and CUDA graphs off, with a 120-second Unix alarm. A Python signal
is not a hard external process supervisor and may be delayed inside native code.
This example is not the private service's independent host memory/health watchdog.
Use appropriate external resource controls for your machine. The wrapper and
verifier have CPU tests; **the newly packaged runner has not had an end-to-end model
run**. The earlier model tests establish the artifact, not this new packaging.

## Training and evaluation

The base stayed frozen. Experiment 007 continued the prior adapter on 200 new and
200 earlier curated synthetic pairs, Adam learning rate 5e-6, microbatch one,
clipping 1.0, seed 707. Four checkpoints were compared on 200 selection cases.
Step 100 tied step 200 and won the fixed tie-break. Later checkpoints had lower
validation loss but worse generated revisions. Training drafts were 7–52 words;
this was not long-document training.

On the same final 1,000 synthetic cases:

| Outcome | Mac MLX | NVIDIA MLX CUDA |
| --- | ---: | ---: |
| Acceptable | 904 | 901 |
| Meaning-error cases | 48 | 50 |
| Material meaning errors | 12 | 13 |
| Protected-literal failures | 13 | 14 |
| Incomplete | 10 | 12 |

983 outputs match exactly. CUDA failed all five frozen non-regression count gates.
A separate owner decision accepted a private review-before-copy pilot; this was not
a benchmark pass. Only 920 cases fit the API limits: CUDA had 840 acceptable edits,
32 meaning-error cases (four material), five literal failures and three incomplete
outputs. Categories overlap. Completed outputs can still lose meaning.

Against the preceding adapter on Mac, acceptance rose from 857 to 904, while meaning
errors stayed at 48. Of the 47 net gains, 43 came from editable-dash variants. Material
errors rose 9→12, literal failures 5→13. Both adapters made 17 meaning errors in the
100 longer cases. Improvement in punctuation is not broad proof of editing ability.

The 1,000 cases comprise 200 families with five related variants. The same Codex
session authored and judged them; no independent human panel or real-world study
was used. Observed Mac acceptance 90.4% has family-bootstrap 95% interval 87.6–93.1%;
meaning errors 4.8% has interval 2.9–7.0%. This does not establish a future error rate
below 5%. The full test is now exposed development evidence.

Recorded synthetic examples on the website are published in the article/paper:
- Borrowed metronome: a dash becomes a period, uncertainty remains (accepted).
- Faded arrow: heading removed, losing the fact 'faded' (failed).

## Licence and sources

The adapter and accompanying Redraft example code are offered under Apache-2.0.
See LICENSE and NOTICE. Qwen base and included upstream reference files retain
Alibaba Cloud's Apache-2.0 notice in UPSTREAM-LICENSE. No Qwen affiliation or warranty
is implied. No base weights, raw dataset, logs, credentials or service configuration
are distributed here.

- Pinned model: https://huggingface.co/Qwen/Qwen3.5-4B/tree/851bf6e806efd8d0a36b00ddf55e13ccb7b8cd0a
- Upstream licence: https://huggingface.co/Qwen/Qwen3.5-4B/blob/851bf6e806efd8d0a36b00ddf55e13ccb7b8cd0a/LICENSE
- Training article: https://fdicostanzo.com/posts/2026/20261110_teaching_a_small_model_to_edit
- Technical paper: https://fdicostanzo.com/downloads/redraft/redraft-learning-to-edit.pdf

The article and paper describe the earlier training experiments. The table above
also records the subsequent CUDA replay. Runtime source version for that evidence:
Redraft commit b3bc08df7b5665ad0b0faf9d92b2869e20482ac1. The package wrapper is separate
from frozen deployment source and adds no new inference evidence.
