Build log #1 · Nov 9, 2026

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
Write-ups

Things I found, written up

The problem

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.

The design

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.

⚡ L1
Qwen3.5-9Bquick, simple tasks
15–33 tok/s
🧠 L2
Qwen3.6-35B-A3Bmost everyday coding · fits in RAM
53 tok/s
🦾 L3
Qwen3-Next-80B-A3Bhard tasks · streamed from SSD
2.1 tok/s
🐘 L4
Qwen3.5-122B-A10Blast resort · streamed from SSD
1.5 tok/s

↑ a task climbs only when its checks fail · L3 and L4 share one slot and swap in about a minute

This week's numbers

Big brains, streamed from the SSD

Writing speed, plus a 4-problem coding check graded by hidden tests. All on the same laptop.

ModelSpeedCoding check
Qwen3.5-122B-A10B, 4-bit1.52 tok/s3/4 · 550 s
Same, shrunk to my own code (rare experts at 2-bit)1.43 tok/s4/4 · 435 s
Qwen3-Next-80B-A3B, 4-bit (only a 5.7 GB cache)2.07 tok/s3/4 · 174 s

Smaller models that fit fully in RAM

Same prompt for speed, then one real task with a hidden test.

ModelSpeedReal task
Qwen3.5-9B · Python, 16-bit + MTP speculative decoding15.5 tok/spass · 52 s
Qwen3.5-9B · my Swift engine, 4-bit32.5 tok/sfail · misread the task
Qwen3.6-35B-A3B · Ollama53 tok/spass · 17 s
What worked, what didn't
Worked

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.

Didn't

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.

Worked

Swift doubled the 9B's speed compared with the Python path. Whether 4-bit costs it quality is still open.

Caught

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.

Next

Running tonight

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.

Meme: a tiny 2B robot sprays code symbols everywhere and misses the target; with a calm 9B robot steadying its aim, the same rapid fire hits the bullseye.

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.