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/GPT-OSS.md: one guess a layer with --stand-ins

1picassoai6706b9f4da47
diff --git a/docs/GPT-OSS.md b/docs/GPT-OSS.md
index 6edc108..f9f383b 100644
--- a/docs/GPT-OSS.md
+++ b/docs/GPT-OSS.md
@@ -24,7 +24,7 @@ Speed on a 16 GB Mac is set by one thing: how many bytes each word reads from th
- **The squeeze.** `prepare` takes each expert from 13.2 MB (MXFP4) to 8.7 MB (Q2_K, rows padded to whole 256-weight blocks), so the bank on the GPU holds 25 experts a layer instead of 15. On this task the squeezed file scores the same as the original download.
- **The expert bank.** Recently used experts stay on the GPU and are reused; with every expert read for real, about 4 picks in 5 are already there.
-- **The early guess.** While the GPU works on one layer, Coachwhip runs the router of a later layer on the same input and reads the experts it will want; for gpt-oss, 2 guesses a layer, 2 layers ahead.
+- **The early guess.** While the GPU works on one layer, Coachwhip runs the router of a later layer on the same input and reads the experts it will want; for gpt-oss, 2 guesses a layer, 2 layers ahead; with `--stand-ins` 1 guess a layer, since most picks are already in the bank and extra guesses only queue reads in front of the ones a word needs (1,000-word answers: 8.4 to 10.9 tok/s).
- **Flash reads (`--flash-reads`).** Experts are read straight from the SSD, past macOS's page cache.
- **Stand-ins (`--stand-ins`).** A word's first pick is always read for real, and so is the second whenever the router gives it at least 0.3 of the weight. A lighter pick that is not in the bank is replaced by the best expert that is, by the router's own scores, and the weights are recomputed over the experts actually used. The substitute is used only when its router score is within 1.0 of the real pick's (logits); a pick that far ahead of every expert in the bank is read for real. Bank hits go from about 78% to about 97%, and the bytes read per word fall by about seven-eighths.
- **Lean attention.** gpt-oss looks back only 128 words on every other layer; those layers keep only that window, and the shared keys are never copied out per head.