# Kyle Howells: How to set up a local coding agent on macOS — 72 tokens/sec on Gemma 4

> A working recipe for a local coding agent on a Mac, with measured throughput numbers and an OpenAI-compatible endpoint.

- Org: Kyle Howells
- Date: 2026-06-12
- Category: tutorial
- Source: https://ikyle.me/blog/2026/how-to-setup-a-local-coding-agent-on-macos
- Canonical page: https://ai-tldr.dev/releases/kyle-howells-local-coding-agent-macos/

## In short

Step-by-step recipe for running a local coding agent on Apple Silicon with llama.cpp, Gemma 4 26B-A4B, and MTP speculative decoding. Lifts throughput from 58 to 72 tokens/sec. 352 points on HN.

## What it is

Kyle Howells walks through running an agentic coding setup entirely on a Mac, with no API keys. The stack is llama.cpp with Metal acceleration, Gemma 4 26B-A4B (Q4) as the main model, and a multimodal projector for image input. A coding-agent framework called Pi hits the model through an OpenAI-compatible local endpoint.

## How it works

He configures llama.cpp to serve Gemma 4 with an MTP (Multi-Token Prediction) draft model for speculative decoding, which lifts throughput from 58.2 to 72.2 tokens per second — about 24%. He also benchmarks Qwen 3.6 35B-A3B as an alternative at 55 tok/sec, slower but reportedly better at coding tasks. The post includes the exact CLI flags, model paths, and how to wire Pi to the local endpoint.

## Why it matters

Local coding agents have been slow and fiddly, with most setup posts skipping the speed numbers. This one is end-to-end on a Mac, lists actual tokens-per-second, and ships speculative decoding as a first-class step — useful for anyone who wants Copilot-class help without the cloud round-trip or API bill.

## Who it's for

Mac developers, local-LLM tinkerers, privacy-sensitive teams

## Try it

https://ikyle.me/blog/2026/how-to-setup-a-local-coding-agent-on-macos

## Links

- [Tutorial](https://ikyle.me/blog/2026/how-to-setup-a-local-coding-agent-on-macos)
- [Author Site](https://ikyle.me/about)
- [HN Discussion](https://news.ycombinator.com/item?id=48507020)
