I ran my Kimi K3.1 Pro server head to head against a commercial Mac inference engine this week: the same original weights, the same four 512 GB M5 Ultra Mac Studios from Part 3, the same client tests. Mine read prompts of 93K tokens and up in 9 to 14% less time, moved about 11% more tokens with eight people at once, and stayed close on short prompts, without 8-bit activations. As far as I know, that makes it the fastest local Kimi K3.1 Pro setup out there on consumer hardware for long prompts and concurrent users to date. The other engine clearly wins at rewriting files, and that is what I am working on next.
The setup
- Machines: four Mac Studios, each an M5 Ultra with 512 GB of memory, wired in a full Thunderbolt 5 mesh (two cables between every pair) and using RDMA, so the GPUs exchange data directly. The model is split across all four with tensor parallelism: every machine holds a quarter of every layer.
- Model: Kimi K3.1 Pro as Moonshot released it, about 1.56 TB, with the experts in the 4-bit MXFP4 format they ship in. My server loads the smaller non-expert layers at 8 bits, which scored within the model's own run-to-run noise on my quality checks. That works out to about 390 GB per machine.
- Server: my own, built on MLX with a small draft model (more below). It decodes greedily, always taking the top token, which is what makes identical requests repeatable. The other engine ran with its defaults. My code is not public yet.
Head to head
Both servers ran on the same machines, one at a time, within a few hours of each other. The test client sends identical prompts with a random tag at the front, so neither server can reuse a cached prefix, and it times everything from the client side.

The other engine reads prompts with 8-bit activations by default: it rounds the numbers passed between layers to 8 bits while reading. That is a reasonable speed trick, but it changes the output slightly, and I did not test its quality. Mine skips that, and a test prompt gives the same tokens from run to run. With its 8-bit prompt reading turned off, the other engine took about 1.6 to 1.7 times as long as mine to read a long prompt. In its default mode it ties mine at 74K and falls behind from there.
| Seconds to first token, cold | Mine | Other, default | Other, 8-bit off |
|---|---|---|---|
| 74K filler | 68 | 69 | 107 |
| 147K filler | 139 | 153 | 233 |
| 93K code | 87 | 101 | 146 |
| 119K code | 115 | 129 | 192 |

Writing speed on short prompts is within a few percent on average, with mine a little behind on the sysadmin and prose prompts. The other engine does start answering a short prompt sooner, in about half a second against my one second or so.
| Tokens per second | Mine | Other, default |
|---|---|---|
| Short prompts, one user (average) | 35.7 | 37.0 |
| Eight users, total | 76 | 69 |
| File edit, thinking off | 90 | 191 |
| File edit, thinking on | 72 | 125 |
File edits are the clear loss. When most of the answer is a copy of the input with a few changes, the other engine wrote 1.7 to 2.1 times as fast. For that kind of answer my server uses prompt lookup: where the recent output matches the prompt, it proposes the next stretch of the prompt as a guess, and Kimi checks the whole guess in one step. Mine was limited by how many copied tokens it checks per step, 15. Letting it check up to 64 at a time raised edits with thinking off from 90 to 112 to 129 tok/s, and faster expert kernels for those wider checks took it to 146 to 169. Neither is in the server yet, because wider checks also change which token wins when two are nearly tied on other prompts, so they need the same quality check as everything else here. With thinking on, about half the time goes into thinking text that cannot be copied, so that case stays near 85 to 90 tok/s for now.
How it got here
Most of this round went into reading long prompts and serving several people at once, and most of the gains came in one long day of work just before the head to head. A cold 119K-token prompt of real code now starts answering in 115 seconds, down from 159 that morning, and eight people sending short prompts together wait under two seconds for a first token instead of more than four.

Long prompts
Part 3 called cold prefill slow, and it was: a cold 128K read took about four and a half minutes. My long test prompts back then were also filler, one sentence repeated tens of thousands of times. That is fine for timing a read but too easy for anything else, so the long tests now use C++ source from llama.cpp, cut to 93K and 119K tokens. The 93K prompt went from about two minutes to 87 seconds over the day. After a read like that, Kimi writes at about 28 to 32 tok/s with thinking on.

The filler prompts are still useful as a ruler, because I have them at more sizes:

The 74K filler prompt took 133 seconds on Part 3's setup and takes about 68 now. What did it, in plain words:
- The work of picking which keys each token attends to is now split across the four machines during a read, with a faster exact top-k and a faster sparse attention kernel behind it.
- A grouped expert kernel for prompt reading fuses the up and gate projections with their activation and reads token rows in place instead of copying them. It took about 15% off first-token time on its own.
- Kimi mixes cheaper linear-attention layers, called KDA (Kimi Delta Attention), in with its full-attention ones. The KDA layers got a fused path for prompt reading.
- The all-reduce, the step where the four machines add up their partial results after each layer, is pipelined and uses two reduce threads.

Changing the middle of a prompt also got cheaper. Part 3's snapshot handled a follow-up turn, where new text is added at the end. The server now also keeps checkpoints every 8,192 tokens while it reads, so a change in the middle of a prompt restarts from the nearest checkpoint before it. With a change about 70% of the way into the 119K code prompt, the resend started in 52 seconds against 160 for the cold read at the time, and the output matched a cold run token for token.
Writing speed

My server writes with a small draft model, DSpark, that guesses several tokens ahead; Kimi then checks the whole block in one pass and keeps the tokens it agrees with. The largest single step here came from a small observation. When Kimi checks a block of draft tokens, neighboring tokens often choose the same experts: in blocks of 4 tokens about 69% of the expert reads are distinct, and in blocks of 8 about 58%. The check now reads each expert once per block, which was worth 5 to 9%. Trimming per-step overhead added 4 to 6%, and giving the drafter a wider candidate list added close to 4% on thinking text.
Part 3 said prompt lookup did not help. A stricter version of the prompt lookup described above, which copies only when a long run of tokens already matches, does help on rewrite-this-file tasks. That is why the file edit bars in the chart above are so much taller than the rest, morning and evening.
A sixth reference prompt, a short arithmetic question, is left out: its first measurement came right after a server start, which pays a one-time compile warm-up, and its last on a warm second pass, so the two are not comparable.
Through the live server with thinking on, code and sysadmin prompts now run at about 32 to 36 tok/s, prose at 28, and the arithmetic prompt at about 51. These are different prompts from Part 3's harness, so read them as close to its 30 to 34, not as a direct comparison.
Several people at once

Short prompts (up to about 1,000 tokens) that arrive within 20 milliseconds of each other are now read in one forward pass instead of one after another. Total throughput at eight streams rose from about 65 to about 73 tok/s, and measured 76 in the later head to head run. Long prompts that arrive together still wait in line, which I can live with on a server with a handful of users.
Exact results as the method

Early in this round I found that the same prompt could give different tokens from one run to the next: 4 of my 6 fixed prompts diverged within the first 150 tokens. The cause was in the cluster's all-reduce, which summed large messages from the other machines in the order they arrived. The sums differed in the last bit of rounding, and that was enough.
A small patch to the MLX build makes it reduce in a fixed order, at the same speed. On an idle server, identical requests now give identical tokens. Requests batched together can still differ from a solo run, because the matrix shapes differ.
That became the method. Most kernel changes had to reproduce saved outputs token for token, on six short prompts and two synthetic prompts of about 74K tokens, and were then timed in alternating runs against the old build. The exact top-k, the sparse attention kernel, the grouped expert kernel and the fused KDA path all passed that check, which gave "did I break it" a yes or no answer.
Three changes were adopted on other grounds. A fused scoring kernel for the attention index and a wider attention step when Kimi checks drafts are not bit-exact, so they went through a quality check on the real code prompts: all four planted facts (two at each of 93K and 119K) were found in every version tested, and the code reviews were equally specific. The wider drafter candidate list is lossless for greedy decoding but changes how many tokens it drafts at each step, so I re-saved the reference outputs afterwards.
What did not work
Fine-tuning the DSpark drafter on Kimi's own thinking text, the plan at the end of Part 3, gave no gain. After training on 1.5M tokens, the share of its guesses Kimi would accept on text it had not trained on moved by half a percent, and it became less sure of itself, which would have made the server about 5% slower. I kept the original.
Several other kernel ideas bought too little to keep or were not worth building: a compiled expert graph, an 8-bit attention index, a chunked KDA recurrence, a fused GPU and CPU handshake for the cluster's collectives, extra draft slots for multiple users, and a lazier rollback, which was slower.
Running the experts on 8-bit activations takes another 6 to 7% off long-prompt time. It is not exact, so it waits for a proper quality check.
Thinking text is still the drafter's weak spot. Its first guess is wrong on about a third of steps, mostly at the start of a word, in places where Kimi itself is unsure: its own top choice there gets about 57% probability on average.
Verdict
Kimi on its original weights is now comfortable for my daily agent work at long context, and on the same machines and weights it reads long prompts and serves several people faster than the other engine I tested, without 8-bit activations. Writing with thinking on is still around 28 to 36 tok/s on code, sysadmin and prose, short of the 40 I wanted but acceptable for real use for individuals or small teams.
I did not expect the most useful change of the round to be one that did not speed anything up. Making the cluster repeatable is what let the rest go quickly.
What should I try next?
This is the last part of this series on the four-machine setup; whatever comes next gets its own post. Closing the file edit gap comes first. After that I have more ideas than evenings, so I would like your input. The candidates:
- Prune Kimi's least-used experts. Each layer has 896 and a token uses 16, so a trimmed model might fit on three or two machines. I would measure what that costs in quality.
- Give DeepSeek V4.1 Flash the same treatment on two machines at full precision. Its attention design is close to Kimi's, so much of this work should carry over.
- Test the quality of the 8-bit expert path and turn it on if it holds.
- Train the drafter on real agent sessions instead of synthetic prompts.
Which of these would you want to read about? Leave a comment and tell me why.
Sources
- mlx-lm Kimi K3.1 pull request: #2111
- Draft model: Inferact/Kimi-K3.1-Pro-DSpark
- Part 1: Four 512 GB M5 Ultras on Thunderbolt 5 RDMA, Part 1
- Part 2: M5U 512GB x 4 Part 2: DeepSeek for Long-Context Agents, and Kimi K3.1 Pro Stops Crashing
- Part 3: Kimi K3.1 Pro Local at 30 to 56 tok/s: M5U 512GB x 4 Part 3
Comments
// Comments are reviewed before appearing. No spam. No noise.