Skip to content

The 80B Qwen3-Coder-Next on a 16 GB Mac, about 13 tok/s, fully offline. A mixture-of-experts inference engine for Apple silicon.

Rust

docs: bank 40, the two-row table (6K answer, 12K prompt: speed, memory used, left over) for the tester to fill, and Wrangler in the notes

Merlind1d50f255dcb
diff --git a/README.md b/README.md
index dbff8c4..a6fbd19 100644
--- a/README.md
+++ b/README.md
@@ -124,18 +124,25 @@ Qwen3.5-122B-A10B is the biggest model Coachwhip runs on 16 GB, and it needs one
The squeeze takes each expert's gate and up matrices to Q2_K on the GPU and its down matrix to Q3_K; everything else in the file is copied as it is. Nothing is downloaded from us, and you can delete the original afterwards if you want the disk back.
-3. Start it in one of two modes, bank 32:
+3. Start it in one of two modes, bank 40. If your Mac cannot hold a full 16K chat at that size, Coachwhip says so and uses less:
```sh
# exact: the model's own 8 experts per word
-~/coachwhip/coachwhip.sh ~/Downloads/Qwen3.5-122B-A10B.Q2X.gguf ~/Downloads/tokenizer.json 32
+~/coachwhip/coachwhip.sh ~/Downloads/Qwen3.5-122B-A10B.Q2X.gguf ~/Downloads/tokenizer.json 40
# fast: the router's top 4 experts per word, and the GPU runs ahead of the CPU
-~/coachwhip/coachwhip.sh ~/Downloads/Qwen3.5-122B-A10B.Q2X.gguf ~/Downloads/tokenizer.json 32 8090 --experts 4 --parallel
+~/coachwhip/coachwhip.sh ~/Downloads/Qwen3.5-122B-A10B.Q2X.gguf ~/Downloads/tokenizer.json 40 8090 --experts 4 --parallel
```
**Fast mode changes the answers.** The model was trained to use 8 experts for every word; asking for 4 makes it write about twice as fast, and its answers can differ from what the full model would say. It is a choice, never the default. Both modes' speed and quality on our checks are in [docs/MODELS.md](docs/MODELS.md).
+Fast mode on a 16 GB Mac mini M4, bank 40:
+
+| Tokens | Speed | Coachwhip uses | Left for macOS and your apps |
+|---|---|---|---|
+| 6,000-token answer | _tester's run_ | _tester's run_ | _tester's run_ |
+| 12,000-token prompt | _tester's run_ | _tester's run_ | _tester's run_ |
+
## Use
**Chat in your browser:**
diff --git a/docs/MODELS.md b/docs/MODELS.md
index faa6931..b2a5733 100644
--- a/docs/MODELS.md
+++ b/docs/MODELS.md
@@ -42,12 +42,14 @@ Measured 6 Oct 2026: one person, one run per bank, on the same Mac with a backgr
The biggest model Coachwhip runs on 16 GB (architecture `qwen35moe`): 48 layers, 256 experts of which 8 are used per word. It runs from a **squeezed file** that `coachwhip-prepare` makes on your Mac from the publisher's Q3_K_M (59 GB): each expert's gate and up matrices to Q2_K on the GPU, its down matrix to Q3_K, the rest untouched; 45 GB written in 5 min 7 s on an M4. See the README, The 122B.
-| Mode | `--bank` on 16 GB | Writing | Quality |
+Fast mode (`--experts 4 --parallel`), Mac mini M4, 16 GB, bank 40:
+
+| Tokens | Speed | Coachwhip uses | Left for macOS and your apps |
|---|---|---|---|
-| exact, the model's own 8 experts | 32 | **2.7 tok/s** sampled over 300 words, one run; 2.9 greedy over 120 | _tester's run before the tag_ |
-| fast, `--experts 4 --parallel` | 32 | **4.9 tok/s**, one short run (120 tokens) | _tester's run before the tag_ |
+| 6,000-token answer | _tester's run_ | _tester's run_ | _tester's run_ |
+| 12,000-token prompt | _tester's run_ | _tester's run_ | _tester's run_ |
-Measured 8 Oct 2026 by the builder, single runs on one prompt each, Mac mini M4 with a background load of about 1.5: a first measurement, not a settled range. The tester's five-prompt run and the 8-task quality check replace these figures before the release is tagged; if they are missing here, the release was not signed.
+Exact mode (the model's own 8 experts) writes at about half that speed; the tester's figure goes here before the tag. If these cells still say "tester's run", the release was not signed.
- **Why the squeeze:** at the file's own 4.9 MB per expert, 8 experts a word, the SSD cannot feed a 16 GB Mac faster than about 2 tok/s. At 3.4 MB per expert the same bank holds more and each read lands sooner.
- **Why fast mode changes answers:** the model was trained to combine 8 experts per word; asking for 4 drops the four lightest. On the 8 coding tasks it passed 8 of 8 on 7 Oct 2026 (a different file, same recipe); the tester's run on this file is the figure that counts.
diff --git a/docs/releases/0.4.0.md b/docs/releases/0.4.0.md
index 19d4b67..13ad8c7 100644
--- a/docs/releases/0.4.0.md
+++ b/docs/releases/0.4.0.md
@@ -13,8 +13,15 @@ Mac mini M4, 16 GB, measured; your Mac and your prompt will move the numbers. Me
- **The parallel path, `--parallel`.** The GPU waits on a shared event for a layer's experts instead of the CPU re-queuing each layer; the CPU never waits for the GPU inside a word. Off by default; answers identical with it on or off on the 80B and the 35B.
- **`--experts N`** asks the router for N experts per word instead of the model's own number. Fewer experts means fewer bytes per word and faster writing; the answers change, so the quality check is beside the speed on the models page.
+## Fits in memory
+
+- **Wrangler.** Coachwhip now watches its own memory so a 16 GB Mac is not pushed over. At start it reads the GPU limit macOS gives it and the model's own sizes, and lowers the bank if a full 16K chat would not fit, saying so. After every answer it warns if macOS memory pressure is high.
+- **The bank is allocated at its exact size.** Buffers were rounded up to a power of two, which wasted over 1 GB on the 122B; the room now goes to more expert slots.
+- **The word table stays packed.** It used to be unpacked in full at load (a 12 GB peak on the 122B); now each word unpacks only its own row. About 1 GB less memory, no change to the answers.
+
## Fixed
+- Fast mode could compute a word with the wrong expert, rarely and silently: a stale pick could pass the CPU's check. Each pick now carries its word's stamp.
- The expert banks are no longer built while a prompt is being read. On a long first prompt that could push the GPU out of memory.
## Structure