Guides

Two agents, one Mac: MLX serves both at full speed

Two callers on Gemma 4 31B got 11.5 tokens a second each on MLX and 5.7 each on llama.cpp.

0:00
Two agents, one Mac: MLX serves both at full speed
Illustration: StrideNote

In September we pointed two agents at one local model and each got half of it. Two identical requests to Gemma 4 31B through LM Studio ran at half speed apiece, and the server’s total output stayed at about 11 tokens a second. On 12 October 2026 we repeated the test on LM Studio’s MLX engine and the second caller cost almost nothing: each request ran at 11.5 tokens a second and the total doubled to 23. LM Studio parallel requests, on the page that documents them, are still listed as supported on llama.cpp, with MLX to follow. This is what we measured on both engines, with two models, on a 48 GB Mac, and what it means for how many staff one Mac server can carry.

What the LM Studio parallel requests setting does on each engine

LM Studio loads every model with a setting called Max Concurrent Predictions. Its documentation page for parallel requests says the setting lets several requests be processed in parallel through continuous batching, where they would otherwise queue, and that the default is 4. When we read the page on 12 October 2026 it also said this is supported for LM Studio’s llama.cpp engine, “with MLX coming soon”.

Our loads matched the default. On LM Studio 0.4.25, lms ps reported a parallel value of 4 for every model in this test, on the llama.cpp engine at version 2.47.0 and on the MLX engine at version 1.11.0 alike. We changed nothing. LM Studio’s MLX engine is a separate project from its llama.cpp runtime: the mlx-engine repository lists Apple’s mlx-lm as the inference engine it is built with. So the same setting is carried out by two different pieces of software, and there is no reason to expect the same result from both.

A batch is the useful picture here. To write one token, a model passes over its weights once. If two requests can share that pass, the second request rides along and the total output rises. If they cannot share it, the two requests take turns and each gets half. Our September test, described below, found the second case on llama.cpp with Gemma 4 31B.

If the model you want is not yet in MLX form, how to get an MLX model into LM Studio on a Mac covers the conversion and the gotchas.

How we tested LM Studio parallel requests on MLX and llama.cpp

The test machine is an M4 Pro with 48 GB of unified memory on macOS 27.0.1. We used two models, each as a GGUF on llama.cpp and as a 4-bit build on MLX: Gemma 4 31B, a dense model, and Qwen3.6 35B-A3B, a mixture-of-experts model. Each build was loaded alone, because two large models generating together on 48 GB slow each other down and would have spoiled the timing.

One Python script sent a short question, about 72 prompt tokens, with a 500-token cap on the reply. It ran the question three times on its own. Then it started two copies at the same moment on two threads, each with a different random session id at the top so that neither could be answered from the other’s cache. The script streams each reply and times it from the stream, so tokens per second means the same thing on both engines. Temperature was 0.

The single-request figure we quote for each build is the middle of its three runs. The two-request figures come from one pair per build. That is a small sample, and we say below what it does not cover.

What two requests at once cost on Gemma 4 31B and Qwen3.6 35B-A3B

On MLX, close to nothing. On llama.cpp, it depended on the model.

Bar chart of combined tokens per second. Gemma 4 31B: llama.cpp 11.7 with one request and 11.4 with two, MLX 12.6 and 23.0. Qwen3.6 35B-A3B: llama.cpp 49.4 and 78.8, MLX 61.5 and 129.4.

Gemma 4 31B and Qwen3.6 35B-A3B on llama.cpp 2.47.0 and MLX 1.11.0: total tokens written per second with one request and with two at once. Tested 12 October 2026.

Model and engineOne requestTwo at once, eachTwo at once, combined
Gemma 4 31B, llama.cpp11.75.711.4
Gemma 4 31B, MLX12.611.523.0
Qwen3.6 35B-A3B, llama.cpp49.439.478.8
Qwen3.6 35B-A3B, MLX61.564.7129.4

All figures are tokens written per second.

Gemma 4 31B on llama.cpp repeated the September result almost to the decimal. Alone it wrote 11.7 tokens a second. With a second caller each request got 5.7, and the pair took 91.5 seconds where one request had taken 43 to 45. The combined rate was 11.4, so the second caller added nothing.

The same model on MLX wrote 12.6 tokens a second alone and 11.5 for each of two callers. The pair finished in 38.2 seconds, against 34 to 36 seconds for one request. Combined output was 23.0 tokens a second, twice what llama.cpp produced with the same two requests.

Qwen3.6 35B-A3B behaved differently on llama.cpp. Alone it wrote 49.4 tokens a second. With two callers each got 39.4, so the combined rate rose to 78.8. Parallel requests do pay on llama.cpp for this model, at a cost of about a fifth of each caller’s speed. On MLX the cost was not measurable. One request ran at 61.5 tokens a second, and each of two ran at 64.8 and 64.6. The pair finished in 8.4 seconds, the same as a single request, with a combined rate of 129.4.

The wait before the first token grew a little under load on both engines. On Gemma it went from under 2 seconds to 3.4 seconds on llama.cpp and to about 2.5 seconds on MLX. On Qwen3.6 it stayed under 0.7 seconds with two callers on both engines.

We can describe the pattern, though the cause is beyond what this run shows. A dense model like Gemma 4 31B uses all of its weights for every token, and on llama.cpp two requests appear to compete for that pass. A mixture-of-experts model computes with a small active share of its weights, which may be why llama.cpp could overlap two Qwen3.6 requests and not two Gemma ones. The MLX engine overlapped both. We did not read either engine’s scheduler, so that explanation is a reading of the numbers and should be treated as one.

What happens to long reasoning jobs when two agents share llama.cpp?

The September test used a much longer job. The endpoint was LM Studio’s OpenAI compatible server with gemma-4-31b-qat loaded at 64K context on the llama.cpp engine. The request was the 16 by 16 ARC-AGI-3 board from the reasoning effort tests, four legal actions, one action back, a 16,384 token cap so that nothing could be truncated. First the request ran alone. Then two threads sent the identical request within the same millisecond and each timed its own response. Nothing else was using the model. The series this board comes from starts at what a local model does with an ARC-AGI-3 board.

The two paired requests finished at 310 seconds and 725 seconds. Alone, the same request had finished in 306.

RunWall clockReasoning tokensOutput tokens a second
Solo305.8s3,45011.3
Paired, finished first310.6s1,8035.8
Paired, finished second725.4s6,3438.8

The reasoning counts differ by a factor of three and a half between the two paired calls, which is the same run to run spread this model shows on identical input and has nothing to do with concurrency. The per second rates are the signal. The call that finished first ran its whole life alongside the other and got 5.8 tokens a second, half the solo rate. The call that finished second got half speed for its first 310 seconds and full speed for the remaining 415, which blends to 8.8.

Add the two paired outputs, 1,810 and 6,350 tokens, and divide by the 725 seconds the pair took: 11.2 tokens a second, against 11.3 solo. The server did exactly as much work per second with two callers as with one.

All three calls had 16,384 tokens of room and all three finished with finish_reason: stop, so no number above is a truncation artefact. And the wall clock of a paired call on its own says nothing: 310 seconds looks like the solo time until you notice it produced half the tokens. Divide output tokens by elapsed seconds for every call, always. It is the only figure that separates a slow model from a shared one, and it is the figure that a control ladder reads for the same reason.

Our reading in September was that a 31B model on this hardware is bound by memory bandwidth: every generated token reads the whole set of weights once, and the machine can do that about eleven times a second whether the tokens belong to one conversation or two. On llama.cpp the server accepted both requests and interleaved them, which is fair, and fairness here means each caller waits twice as long. LM Studio’s endpoint documentation describes the request shape and says nothing about scheduling. The October MLX result shows that reading does not hold for every engine: MLX served two Gemma 4 31B callers at 11.5 tokens a second each on the same machine, though with short prompts rather than this long reasoning job.

Compare the ARC-AGI-3 API’s own rate limit, 600 requests a minute per key. A local 31B on llama.cpp answers this board about once every five minutes. The bottleneck for a local agent is never the benchmark’s server; it is the tokens a second at home.

When to point two agents at one MLX model in LM Studio

The September result meant that a shared endpoint on a 48 GB machine only divided the same output between its callers. On the MLX engine that no longer follows from the numbers. Two callers on Gemma 4 31B got 11.5 tokens a second each, almost exactly the 11.7 that one caller gets on llama.cpp. If your work splits into two independent jobs, such as one agent that writes and one that checks, the MLX build of the model gives you the second one nearly free.

Three limits apply before anyone rebuilds a setup around this. We tested two callers and no more, although the setting allows four. We tested short prompts, and two agents that each carry a 20,000-token prompt will also hold two sets of cached context in memory, which we did not measure. And the switch to MLX changes more than the batching. Our comparisons of Qwen3.6 35B-A3B on MLX and llama.cpp and of the Gemma 4 31B MLX build and the GGUF list what else moved, including a structured output fault on one and missing reasoning on the other.

If you stay on llama.cpp with a dense model

Two agents sharing one endpoint work best when they are not both waiting on the model at once. An agent that thinks for five minutes and then plays two thousand actions locally in a second leaves the endpoint idle for that second, and a second agent can use it. Two per move agents, each wanting a model call every turn, simply halve each other’s speed. That is the same shape as the design the ARC-AGI-3 milestone winners used and the one a per move agent measured here argues for from the other direction: move the expensive call out of the inner loop.

Heterogeneous agents are a different case. A small model for the frequent decision and the 31B for the rare one would share the memory rather than the endpoint, and on this machine two large models do not fit at once. A small one beside the 31B is a question this run did not test.

Serialise deliberately rather than by accident. Two agents sharing an endpoint without knowing it will each report the model as twice as slow as it is, and any latency figure taken during the overlap is wrong. If two things must share, put a queue in front of the endpoint so that each call runs at full speed and the wait is visible, rather than letting the server interleave and hide it.

Measure the solo rate first and keep it. On llama.cpp it was 11.3 output tokens a second for the 31B in September, and every decision about how often an agent may call the model is a division by that number, as it is for everything else this hardware does with the benchmark.

How many staff can share LM Studio parallel requests on one 48 GB Mac?

The measured answer is two at near full speed, because two callers is all we tested, and what each gets depends on the engine more than the Mac. On the MLX engine, two people sharing Gemma 4 31B each got 11.5 tokens a second, and two sharing Qwen3.6 35B-A3B each got about 64.7. On llama.cpp, two sharing Gemma 4 31B each got 5.7. That is the same halving we found in September, where the server’s total stayed near 11 tokens a second with one caller or two.

At the combined rates we measured, one Mac writes about 82,800 tokens an hour on Gemma 4 31B under MLX (23.0 tokens a second times 3,600), about 41,040 on the same model under llama.cpp (11.4 times 3,600), and about 465,840 on Qwen3.6 35B-A3B under MLX (129.4 times 3,600). Divided by the 500-token cap our test replies used, that is about 166, 82 and 932 replies of that length an hour, while two callers keep the server busy.

For long reasoning jobs on llama.cpp, the machine’s output per hour did not grow with a second caller. The solo September job took 305.8 seconds, so one Mac finishes about 12 jobs of that size an hour (3,600 divided by 305.8 is 11.8), with one caller or two, and each of two callers waits about twice as long. We have not run long reasoning jobs with two or four callers on MLX, so the doubling measured on short prompts is not a figure for that workload. That needs two and four concurrent requests at the 16,384 cap on the 16 by 16 board against the MLX build of Gemma 4 31B, with per-caller and combined tokens a second recorded.

Those figures do not give a staff ceiling. The third and fourth caller are untested, although LM Studio’s default allows four, and long prompts change the picture: the first request in our test of Claude Code on a local model was 29,424 tokens and the turn took eight minutes. On Gemma 4 31B, moving from llama.cpp to MLX doubled the combined output from 11.4 to 23.0 tokens a second on the same machine, with the other differences listed in the two engine comparisons above.

LM Studio’s published prices, read on 17 October 2026, list a Free plan at $0 that runs local models using llama.cpp and MLX; its paid plans, $20 and $100 a month, are for hosted cloud models, and it says subscription plans for teams are coming soon. For a team planning to share one machine, the budget is the machine and the wait.

What would settle the headcount is three and four concurrent callers on Gemma 4 31B and Qwen3.6 35B-A3B under MLX, plus a mixed load with long agent prompts, and that is on our list.

The documentation page still describes MLX support for parallel requests as on its way. On version 1.11.0 of the engine, on this machine, two requests were already sharing the model at full speed. The next thing to measure is the third and fourth caller, because the default allows them and a dense 31B model has to stop scaling somewhere.

More from Guides