Published on

Eight agents on one Mac, three times faster — and the model is not why

Authors

Listen to this article · Eight agents on one Mac, three times faster — and the model is not why

0:00 / 0:00

Watch this article · Eight agents on one Mac, three times faster — and the model is not why

Most claims about running AI on your own machine are about the model. This one is about the queue.

Locals is an open-source server, Apache 2.0 and 749 stars on GitHub, that runs models on Apple silicon for coding agents rather than for chatting with a raw model. Its headline is that with eight requests arriving at once it writes 271 tokens per second where mlx-lm, the standard way of running models on a Mac, writes 87. Three times, on the same chip, with the same 2.8 GB model.

3x
tokens per second with eight requests at once, against mlx-lm on an M2 Pro with 16 GB
2s
to the first word with eight agents asking at once, where Ollama takes 42 seconds
3GB
the default model, Qwen3.5-4B, quantised to four bits
178,000
tokens of conversation the default model holds on a 16 GB Mac

Where the speed comes from

Three mechanisms, and none of them is a bigger model.

Requests are computed together. The kernels are written for a handful of requests at a time rather than one, which is why the curve keeps climbing as agents are added instead of flattening. mlx-lm writes 87 tokens a second for four requests and the same 87 for eight; Locals goes from 160 to 271 over the same range.

The tool call is compiled, not sampled. A JSON format or a tool call can be described as a graph, and checking a reply against it as finding a path in that graph — the argument of the paper the project is built on, by Arip Asadulaev. Text the format already decides is written without running the model, the checks run on the graphics chip, and a format costs about 3 MB of memory instead of up to 1.5 GB. In practice an agent can only call the tools it offered, every argument arrives in the type its schema asks for, and a reply cut off by its length limit still closes its call.

The conversation is kept. The long system prompt an agent starts with, 3,000 to 16,000 tokens, stays on disk across restarts, so the next turn reads only what it added: the next turn of a 138,000-token conversation starts after 2.4 seconds.

  1. Batch

    Every agent’s request is computed in the same passes, with kernels built for a few requests at a time.

  2. Grammar

    Each model’s tool-call format becomes a grammar the GPU enforces, so a call cannot fail to parse.

  3. Cache

    The system prompt and the conversation stay on disk, so a restart does not re-read them.

  4. Guards

    Repetition and runaway tool calls are detected; a hung agent frees the server instead of blocking it.

Four layers. The first is where most of the speed is, the second is where most of the reliability is.

The comparison that matters

Against the other Mac servers, on the same 4-bit build of the same model, 1,000-token prompts and eight requests at once, the spread is not small:

Locals110 tokens/s

first token after 1.6 s

llama.cpp71 tokens/s

first token after 2.1 s

Magnitude42 tokens/s

first token after 16.1 s

Ollama34 tokens/s

first token after 41.8 s

Qwen3.5-4B on an M2 Pro with 16 GB, eight requests at once. The first-token times matter more than the throughput for an agent, because nothing happens until the first token arrives.

What the project says it does not do

The unusual part of this repository is a section titled "Where Locals is not faster", and it is the part worth reading first.

A single request with nothing to reuse runs at about mlx-lm's speed: 64 tokens a second against 61. Work bound by reading a long prompt does not speed up, because reading is limited by the chip's arithmetic rather than by batching — with 8,000-token prompts and eight requests the server writes 57 tokens a second. Formats outside the tuned kernels, such as mxfp4, run at mlx-lm's speed. And on an M5, the gain falls to about 1.5x rather than 3x, because MLX already has kernels for that chip's neural accelerators.

Eight requests271 tokens/s

the case the project is built for

Eight requests, mlx-lm87 tokens/s
One request alone64 tokens/s

against 61 for mlx-lm — no gain

The same measurement, three ways. The speed-up is real and it is conditional.

Eight requests, one chip

That honesty is the argument for the tool, more than the 3x is. A project that publishes the cases where it loses tells you what it was built for: several agents on one machine, which is now the normal way to work with coding assistants, and which every Mac server before it handled badly — eight agents waiting 42 seconds for a first word is not a speed problem, it is an unusable one.

Source: the Locals repository at github.com/Generated-Computers/Locals, README and benchmarks, read on 23 November 2026; measurements on a MacBook Pro with an M2 Pro (19-core GPU) and 16 GB, Qwen3.5-4B, MLX 0.32 and mlx-lm 0.32 unless stated. The paper behind it is Asadulaev, "Breaking the Space Barrier and its Application to Language Model Inference", arXiv 2610.09139. Star and fork counts are the repository's at the time of reading.

Contact: [email protected]