A step-up coding brain that stays usable on a 32 GB MacBook
I have an M1 Pro with 32 GB of RAM and no way to upgrade it. I wanted a serious local coding model anyway, so I'm building my own way around the limit: a layered system where fast small models handle most work and only the hard tasks climb to bigger brains, up to a 122B streamed from the SSD by my own Swift and Metal engine on MLX. The goal isn't just that it runs. It has to be usable: small tasks in under 10 minutes. Because most people can't just buy a bigger computer, and the one you already have should be enough.
Now running
updated Nov 10, 2026 · 23:53 UTC- running12-task hidden-test exam on the Qwen3-Next-80B: 1 of 12 done (1 pass)
- queuedSpeed race for the exact 2-bit → 4-bit expert conversion
- queuedProfiling and shrinking Qwen3-Next-80B to my own code
- queuedPrompt-memory fix: stops re-reading an 8,000-word prompt at every phase change (goes in after the exams)
- done12-task hidden-test exam on the shrunk 122B: 12 of 12 done (9 pass, 2 false win caught, 1 fail)
- done35B in my Swift engine vs Ollama: winner ollama
Things I found, written up
- The bug that made every step of my local coding agent take 30 seconds (and it wasn't the hardware): a prompt-cache miss from memories injected at the top of the prompt. 25–35 s → 0.6–1.6 s per step.
The model is twice the size of the RAM
Mixture-of-experts models only use a small slice of their experts for each token. So the whole model lives on the SSD, and the experts that actually get used stay cached in RAM. Reads run through 8 parallel lanes, plus a separate relay for rarely used experts so they never block the common ones. In this setup, 74–80% of expert reads come straight from RAM.
I approached it like a network engineer: layers with one job each, one protocol between parts, separate links so traffic never blocks, and escalation when a layer can't handle something.
A four-layer brain stack
Each layer only gets a task if the one below it fails its own checks. Most tasks should never reach the slow giants.
↑ a task climbs only when its checks fail · L3 and L4 share one slot and swap in about a minute
Big brains, streamed from the SSD
Writing speed, plus a 4-problem coding check graded by hidden tests. All on the same laptop.
| Model | Speed | Coding check |
|---|---|---|
| Qwen3.5-122B-A10B, 4-bit | 1.52 tok/s | 3/4 · 550 s |
| Same, shrunk to my own code (rare experts at 2-bit) | 1.43 tok/s | 4/4 · 435 s |
| Qwen3-Next-80B-A3B, 4-bit (only a 5.7 GB cache) | 2.07 tok/s | 3/4 · 174 s |
Smaller models that fit fully in RAM
Same prompt for speed, then one real task with a hidden test.
| Model | Speed | Real task |
|---|---|---|
| Qwen3.5-9B · Python, 16-bit + MTP speculative decoding | 15.5 tok/s | pass · 52 s |
| Qwen3.5-9B · my Swift engine, 4-bit | 32.5 tok/s | fail · misread the task |
| Qwen3.6-35B-A3B · Ollama | 53 tok/s | pass · 17 s |
The shrink kept quality. I profiled 200k tokens of my own code, kept the experts covering 90% of the router's picks at 4-bit, and pushed the rest to 2-bit. Loss on held-out code rose only 0.66%, and the common-expert set dropped from 63.7 GB to 41 GB.
The shrunk model wasn't faster. Mixed 4-bit and 2-bit layers sent every pick through both precision paths. The fix converts 2-bit experts to 4-bit exactly as they come off the SSD: 2-bit levels sit on the 4-bit grid at a ×4 step, and power-of-two scales keep bf16 exact. Verified at 0.00000% difference. Speed race pending.
Swift doubled the 9B's speed compared with the Python path. Whether 4-bit costs it quality is still open.
The self-checking loop can be fooled. On one exam task the model's own checks said "solved" and the hidden tests said no. That's why every task gets hidden tests, and false wins never reach training.
Running tonight
- A 12-task hidden-test exam on the 122B, then on the 80B
- The 35B in my Swift engine against the Ollama version
- The exact 2-bit-to-4-bit conversion: does it make the shrunk model faster?
- Profiling and shrinking the 80B
The code goes public when it reaches my finish line: 10 of 12 on the exam with zero false wins, and small tasks done in under 10 minutes.
Help wanted: run the 3-model squad on a bigger Mac
One model writes the code (Nemotron 3.5), a second model from a different family takes another shot when the first one misses (Qwen3.5 9B), and a third model checks both (Qwen2.5-Coder 7B). On my 32 GB MacBook the three together don't fit in memory, so everything slows down. If you have 64 GB or more and want to try it, open an issue on this repo and I'll send the setup.
Next experiment: the "secret formula"
Can a tiny, fast model write good code if a bigger model checks its work? The idea: one model guesses fast, a different model writes the tests, so they don't share the same blind spots. Tonight it's a fast guesser plus a 9B checker; next, a full bracket of guesser + checker pairs to find the fastest combination that's also accurate.

Battle AI, Season 1
Five local models fought every matchup in a locked hacking sandbox. The best coder went 1-3; the undefeated one just picked better targets. Results and how I found out why.