# My M5 Max, Gemma 4, MLX LOCAL Stack. (This KILLS MODEL PROVIDERS) <!-- ref: @content/youtube/indy-dev-dan/2026-04-20-m5-max-gemma-4-mlx-local-model-benchmark version: 3 updated_at: 2026-10-31T20:20:45.089Z --> Local (Indy Dev Dan, 2026-04-20): Local models on Apple silicon are now genuinely capable — but the binding constraint is no longer intelligence, it is **context length**. *Synthesized from Indy Dev Dan on Indy Dev Dan, 2026-04-20.* Indy Dev Dan benchmarks a fully specced M5 Max MacBook Pro against a maxed M4 Max, running Qwen 3.5 and Gemma 4 in both GGUF and MLX builds across three test suites. ## Core Thesis Local models on Apple silicon are now genuinely capable — but the binding constraint is no longer intelligence, it is **context length**. Accuracy holds up on hard reasoning tasks; what collapses is wall-clock time as the prompt grows, which is exactly the dimension agentic work stresses. Dan's practical conclusion is that local models belong in micro-agent and sub-agent roles today, and the reason to learn their shape now is to be ready when the hardware makes them viable for more. ## Key Insights - **Always pick the MLX build on Apple silicon.** Dan calls this the least debatable finding of the episode: Qwen 3.5 GGUF decoded at 60 tok/s on the M5 while the MLX variant hit a rock-steady 118 tok/s across every prompt — roughly double. Prefill nearly doubled too. Part of the gain he credits to NVIDIA's NVFP4 format layered on the MLX build. - Interestingly, GGUF sometimes *prefills* faster than MLX (Gemma 4 GGUF hit ~550 tok/s prefill), so the ranking flips depending on which metric you look at — which is why he insists the metric that matters is **wall clock time**, the full end-to-end wait including cold start, prefill, decode, and hidden overheads. - **M5 Max vs M4 Max: roughly 15–50% faster overall**, with the gap widest in prefill (nearly 2x) and therefore widest on long prompts. On the 32K GraphWalks prompt the M4 took ~400 seconds and the M5 ~280 — about a 40% improvement. The M4's fans ran hard throughout while the M5 stayed comparatively quiet, drawing 35W against the M4's 40W. - Memory: the machine has 128GB RAM, peaking around 42–55GB during runs. **Gemma 4 MLX was the most compact model tested, fitting in 16GB** — Dan credits Google with genuinely maximizing intelligence per parameter. He monitors live with `macmon`. - Usability thresholds he states plainly: above 30 tok/s is fully usable, below 20 is the dead zone. - The context-scaling suite ran **GraphWalks** (breadth-first search over a graph embedded in the prompt) at 1K through 32K tokens, scoring F1. Errors appeared as early as 8K; both models degraded badly at 32K — Qwen produced nothing and Gemma answered incorrectly. He'd already cut the 64K rung before filming because it took too long. - His verdict on the usable envelope: **32K is the practical ceiling for models at 35B parameters and below**, 16K is still viable but already costs ~30 seconds per response, and the falloff begins around 8K. Accuracy survives longer than latency does — you get the right answer, just not in a tolerable time. - Both tested models are mixture-of-experts (A4B and A3B active), which is why a 35B and a 26B model can perform at this speed at all. - For scale contrast, he notes Mythos was reported at roughly 80% on GraphWalks all the way to a million tokens, while these local models stumble at 8K. - The agentic suite ran both models inside the Pi coding agent on six escalating tasks — write a hello file, memoized Fibonacci printing fib(10) = 55, up to generating a multi-file package of pure functions — with correctness verified by actually executing the produced code, plus total tokens and tool calls tracked. Tasks 1–4 took ~3 tool calls; tasks 5 and 6 took 14 and 26+. M5 times ran 7s, 10s, 14s, 25s, 50s, 180s versus the M4's 9s, 10s, 20s, 40s, 60s, 160s. Qwen 3.5 and its MLX build both hit 26 tool calls on the hardest task; Gemma finished with only five and scored 0.7 on package generation. - Dan's own use pattern: local models slotted into skills and sub-agent processes as **micro agents** for parsing, summarizing, and small coding chores — sorting work across cheap/fast, workhorse, and state-of-the-art tiers across three buckets (engineering, personal, product). - His hardware watch item is an M5 Ultra or M6 Mac Mini; if such a machine ships with ~500GB of RAM he expects a genuine industry shift. His prediction is a Sonnet/Opus 4.0-class model running on-device by end of year, and today he still puts ~90% of tasks with a model provider. ## Actionable Takeaways 1. On any Apple silicon machine, search for the MLX variant of a model before downloading the GGUF — expect up to 2x on decode. 2. Judge local models on wall-clock time, not tokens per second. Prefill and decode rankings disagree with each other, and only end-to-end latency reflects your actual wait. 3. Keep local-model prompts under ~8K tokens for comfortable interactive use; treat 16K as the tolerable edge and 32K as unusable for anything with a person waiting. 4. Warm the model before measuring — the first run pays a cold-start penalty that pollutes the benchmark. 5. Track peak RAM per model; if it doesn't fit, it doesn't run. Gemma 4 MLX at 16GB is the compact option worth starting with. 6. Verify agentic benchmarks by executing the generated code, and record tool-call counts alongside timing — a model finishing fast with 5 tool calls where others used 26 is failing, not winning. 7. Use local models for micro-agent work — parsing, summarizing, small file edits inside a sub-agent or skill — rather than as the primary driver of a long agentic session. 8. Plug the machine in before any local-model run; sustained GPU and fan load drains battery fast. ## Notable Quotes > "If you're on Apple silicon, use MLX." — Indy Dev Dan > "Anything over 30 tokens per second, I consider fully usable. Once you drop below 20, I consider that the dead zone." — Indy Dev Dan > "As prompt size increases, local model performance goes down very very quickly." — Indy Dev Dan > "Context window length is the true limitation for local models now." — Indy Dev Dan > "If you don't need a large model, don't use one." — Indy Dev Dan > "Those who prepare for local models and understand what's possible will be the ones saving resources." — Indy Dev Dan > "Control your agent harness to control your results." — Indy Dev Dan --- *You're reading a protocol on [protocol.supply](https://protocol.supply) — hosted, searchable knowledge for AI agents. Think Agent Skills, as an API: bootstrap once (`curl -sL https://api.protocol.supply/bootstrap`), search (`/search?q=…`), fetch (`/@repo/slug`).* *Any skill can become a protocol, and any protocol installs as a local skill — tell your agent "install this as a skill" or see [`@protocol/protocol-to-skill`](https://api.protocol.supply/@protocol/protocol-to-skill).*