Qwen3.6 Grammar Distill (GGUF)
A fast English grammar checker. Give it a passage of numbered paragraphs and it answers with JSON only. Each finding has the paragraph, the exact phrase, a one-sentence reason and a corrected phrase. It never rewrites the text.
It is Qwen3.6-35B-A3B made smaller and taught one job:
- Pruned. Half of its experts were removed (256 → 128 per layer) with a REAP-style saliency score calibrated on grammar-checking traffic.
- Distilled. It was fine-tuned with LoRA on Qwen3.6's own grammar findings for 15,000 public passages. It learned to work from a one-line prompt instead of a long instruction prompt, without thinking.
- Quantized. The weights are Q4_K_M, with an importance matrix.
| File | qwen3.6-grammar-Q4_K_M.gguf, 11.4 GB |
| Parameters | ≈19B total, ≈3B active per token (8 of 128 experts plus a shared expert, 40 layers) |
| Base | Qwen3.6-35B-A3B, text only; the vision tower and MTP head are removed |
| Context trained | passages up to 2,400 characters (sequences up to 1,408 tokens) |
| Tested with | llama.cpp 5bacb7c (llama-server) |
| License | Apache 2.0, as the base model |
Speed
Proofreading a 38,600-character novel chapter (about 6,500 words) in passages of up to 2,400 characters. Hardware: NVIDIA T1000 8 GB, AMD Ryzen 5 7600 (6 threads). All runs used the same llama.cpp build and the same harness.
| Model | Time |
|---|---|
| Qwen3.6-35B-A3B (UD-Q4_K_XL), full ~2,500-token instruction prompt | 17:16 |
| Same, with the instruction prompt cached between passages | about 6:00 |
| This model | 2:58 |
- Throughput. On that card the model reads about 108 tokens/s and writes about 30 tokens/s.
- Per passage. A 2,300-character passage takes about 9.5 s.
- Where the gain comes from. Mostly from the short prompt and the short replies, not from pruning. At 11.4 GB the file does not fit an 8 GB card, and llama.cpp offloads the rest to the CPU automatically. A 12 GB or larger GPU holds it whole and will be faster.
Quality
The model was measured against its teacher on 200 held-out passages: 40 from each of five sources, none seen in training. A finding counts as caught when it overlaps the teacher's finding in the same paragraph.
| This model | Qwen3.6 at Q4 on llama.cpp | |
|---|---|---|
| Teacher's findings caught | 79% | 90% |
| Same phrase and same fix | 48% | 66% |
| Extra findings (not the teacher's) | 19% | 12% |
| Readable JSON replies | 199 of 200 | 186 of 200 |
The teacher's findings are Qwen3.6 in bf16 with the full instructions. The right-hand column is the base model quantized and run locally, so it shows how far any local copy drifts from the teacher.
By source, this model catches:
| Source | Caught |
|---|---|
| C4_200M | 75% |
| GitHub Typo Corpus | 81% |
| OpenWebText | 79% |
| PG-19 fiction | 78% |
| PG-19 fiction with planted errors | 88% |
Limitations
- It is weaker on contemporary fiction than on the text it learned from. On a chapter of an unpublished modern novel, it found 55% of the issues the base model found with its full instructions. Most of what it missed were spellings, compounds and word choices the instructions tell a proofreader to leave alone. It also missed some slips that need the surrounding sentences: a tense shift, the wrong pronoun for a speaker, a missing "not". If you need the base model's recall, use the base model.
- Treat the reason as a hint and the suggestion as the fix. Reasons are concise (one sentence, usually under 15 words), but they often name the rule imprecisely.
- It sometimes flags acceptable text, especially in literary prose.
- It works on one passage at a time. It knows nothing outside the passage, such as earlier chapters, character names or invented words.
- English only. Its labels were made under a Canadian English setting, so Commonwealth spellings (colour, centre, travelled) are accepted.
- No speculative decoding. There is no MTP head, so llama.cpp's
draft-mtpcannot be used.
How to use
Start a server:
llama-server -m qwen3.6-grammar-Q4_K_M.gguf --jinja -c 16384 -fa on \
--reasoning-budget 0
Send each passage of up to about 2,400 characters with this exact
system prompt. Wrap each paragraph in <p id="N"> and end with the
closing line shown. Thinking must be off.
import json, requests
paragraphs = [
"The colourful banners was hanging in the centre of the hall.",
"He don't know whether the neighbours favoured the plan.",
]
user = "PASSAGE:\n" + "\n".join(
f'<p id="{i}">{p}</p>' for i, p in enumerate(paragraphs, start=1)
) + f"\n\nProofread paragraphs 1 to {len(paragraphs)}, then return the JSON object."
reply = requests.post("http://127.0.0.1:8080/v1/chat/completions", json={
"messages": [
{"role": "system", "content": "Proofread the passage for grammar "
"errors and answer with the JSON object only."},
{"role": "user", "content": user},
],
"temperature": 0, "top_p": 0.8, "top_k": 20, "min_p": 0, "seed": 0,
"max_tokens": 2048,
"chat_template_kwargs": {"enable_thinking": False},
}).json()["choices"][0]["message"]["content"]
print(json.loads(reply))
This file's answer on the hardware above, with line breaks added:
{"errors": [
{"paragraph": 1, "text": "The colourful banners was hanging",
"reasoning": "Subject-verb agreement requires plural verb 'were' for plural subject 'banners'.",
"suggestion": "The colourful banners were hanging"},
{"paragraph": 2, "text": "He don't know",
"reasoning": "The subject 'He' is third-person singular, so the auxiliary verb must be 'doesn't' instead of 'don't'.",
"suggestion": "He doesn't know"}
]}
A passage with no errors returns {"errors": []}.
Tips:
- Find offsets yourself. The model quotes phrases, not positions:
locate each
textin its paragraph, and drop any finding whose phrase is not there. - Optionally name your variety of English. Add a second line to the
system prompt, for example:
LANGUAGE: The novel is written in Canadian English. Judge grammar, usage and punctuation by the conventions of Canadian English, and never flag what Canadian English accepts.The model was not trained with this line. In a small check it still produced the same findings. - Watch for runaway replies. Rarely (1 in 200 here), a reply runs on. If one grows past about three times the passage's length, stop it and ask again with the passage split in two.
What it was taught
The teacher worked from a copy editor's rules. They count as errors:
- missing, doubled or wrong words;
- subject–verb disagreement;
- a wrong tense or word form;
- confused words (its/it's, their/there, then/than, loose/lose);
- punctuation that breaks a sentence.
They are not errors: spelling alone, names and invented or borrowed words, deliberate style (fragments, dialect, casual speech in dialogue), word choice and punctuation preferences.
Training
- Passages. 30,000 passages of up to 2,400 characters, shaped like a
proofreader's requests:
- C4_200M synthetic-error sentences (9,000);
- the GitHub Typo Corpus (3,000);
- OpenWebText (9,000);
- PG-19 fiction (9,000, about half with planted errors such as agreement, tense, confused words and dropped or doubled words).
- Labels. Qwen3.6-35B-A3B in bf16 (vLLM), greedy, thinking off, under the full proofreading instructions.
- Filtering.
- Unreadable replies were dropped.
- A passage with a known or planted error was dropped if the teacher missed that error.
- Long reasons were rewritten by the teacher into one short sentence.
- The result was 15,010 training pairs and 1,000 held out.
- Pruning. Experts were scored by router weight times output norm over 1,024 calibration samples. The top 128 of 256 per layer were kept, and the router was left unchanged.
- Fine-tuning.
- bf16 LoRA (r 32, α 32, dropout 0) on all linear layers including the experts, with the router frozen.
- Learning rate 2e-4, 3% warm-up, linear decay, loss on the JSON answer only (Unsloth + TRL).
- The best held-out checkpoint (end of epoch 1) was kept. Training took about 1 hour on one RTX PRO 6000 (96 GB), and the whole pipeline about 4 GPU-hours.
- Export. The model was merged and converted to GGUF, with an importance matrix from 1,000 training inputs, then quantized to Q4_K_M.
Acknowledgements
Built on Qwen3.6, REAP (expert pruning), Unsloth, TRL, vLLM and llama.cpp. Training text is from C4_200M, the GitHub Typo Corpus, OpenWebText and PG-19, under their own licenses.