Spend Bits Where the Mass Is
Kimi K3 is 2.78 trillion parameters and a 1.45 TB expert pool. I run it across a DGX Spark and a 5090 on the next desk. Today it serves 10.87 seconds a token, dead stable at ±0.02 — five times faster than a week ago.
None of that came from a better algorithm. It came from measuring which parts of a trillion-parameter model actually do the work, and then spending every scarce resource — VRAM, RAM, bits of precision, silicon — in proportion to that.
This post is the measurement and the arithmetic.
The curve everything else follows
A mixture-of-experts model doesn't use all its parameters. It routes each token to a handful of experts. Which ones is a property of your traffic, not of the model card, so it has to be measured on the workload you actually run.
Every request runs with a cache trace, and those merge into a histogram. After enough real traffic:
- 46,190 distinct experts touched, across 325,414 activations
- The top 1% of experts carry 8.9% of all activations
That skew is the whole story. Sorted by heat, the cumulative coverage looks like this:
| resident experts | share of activations covered |
|---|---|
| 350 | 7.0% |
| 1,000 | 15.9% |
| 3,500 | 35.8% |
| 8,000 | 55.8% |
| 20,000 | 83.2% |
Every activation your fast tier can't serve falls back to disk. So the only question that matters for the expert term is what fraction of activations — not experts — you can keep close to the compute.
Capacity is the game, and precision is how you buy it
The 5090 holds a warm expert tier. It was holding 350 experts, which the curve prices at 7% coverage. You cannot schedule your way out of that.
The obvious move is "hold more experts," and the obvious blocker is that they're 66.06 MB each — because the tier stores them dequantized as bf16, even though the packfiles on disk are MXFP4 at 17.56 MB. Storing packed and expanding on-device per call is a small change (the dequantiser and its per-device lookup table were already there, used once at promotion). It buys 3.8× the residents in the same 22.6 GB: 350 → 1,316, and 7% → 19.4%.
Then a better idea, which came from asking why precision should be uniform at all.
The error a quantised expert contributes is weighted by how often it fires.
Total degradation is sum(activation_share × error(bits)). Minimising that for a
fixed byte budget is an allocation problem, and its solution is: more bits where
the mass is. Give the hottest experts 4 bits, the next band 3.5, then 2.5, and
1 bit to the cold tail — and promote an expert when its activation rate rises.
Priced against the real histogram, holding weighted error to ≤1.6× a uniform 4-bit set:
| budget | uniform 4-bit | heat-tiered |
|---|---|---|
| 22.6 GB (today's tier) | 1,317 → 19.4% | 2,521 → 29.5% |
| 30 GB (full card) | 1,749 → 23.4% | 3,247 → 34.4% |
| 106 GB (see below) | 6,181 → 49.2% | 9,475 → 60.8% |
About 1.5× the coverage for the same bytes. And it compounds: quantisation shrinks the stream, not just the cache — the cold tail is what misses and streams, and the cold tail is exactly what tolerates 1–2 bits.
A caveat that already cost somebody a bad day, and is now a comment in the source: this argument does not extend to the CPU arm. On the Ryzen, fp32 mat-vec runs 1.44 ms against 14.73 ms for bf16-cast-per-call. A decode token with the CPU arm serving quantised weights measured 713 seconds against 74 without it. A tier that answers slower than not asking it is not a tier. Quantise the GPU arm; never the CPU one.
The 102 GB nobody had looked at
The trunk — everything that isn't an expert — gets pinned in RAM, and whatever doesn't fit streams from NVMe every token. It was pinned at 65 GB on a box with 117 GB free, which meant 42 of 93 layers re-read from disk on every token. Raising it to 80 GB took that to 64 of 93 and the steady-state token to 10.87 s.
But the real finding was in the safetensors header, which I checked instead of assuming:
tensor dtypes in shard 1:
BF16: 17 tensors, 2.34 GB
F32: 6 tensors, 0.00 GB
K3's quantisation-aware training put the experts in MXFP4 and left the trunk in bf16. All 102 GB of it. Quantised, the trunk is roughly 26 GB — which means all 93 layers pinned instead of 64, per-token trunk reads going from 25.83 GB to approximately zero, and ~76 GB of RAM handed back to the expert cache. That's where the 106 GB row in the table above comes from.
It needs validating against a hash-gated scorer before anyone believes it, because the model's authors chose bf16 for the trunk deliberately and the trunk carries attention. Fast and subtly wrong is worse than slow and right.
The wall that isn't memory
Here's the part that surprised me. Push expert coverage to 85% and the token still only reaches about 4.15 seconds, because roughly 3 seconds of it was never expert work at all. It's the trunk compute.
So I went looking for how the trunk matmul is implemented on a Grace Blackwell superchip:
=== CUDA present? ===
(nothing)
No .cu files. No cudaMalloc, no __global__, no cuBLAS anywhere in the
engine. k3_matmul_bf16 is pure C at src/core/k3_ops.c:1161. The entire trunk
runs on the CPU cores while a Blackwell GPU — sharing the same unified memory,
so a GPU path costs zero weight copies — does nothing for it.
That gap has already been measured on this exact hardware: a 12288×7168 bf16 GEMV runs 0.802 ms on the GPU against 6.89 ms on the CPU — 8.6×, at 220 GB/s effective, near the unified-memory ceiling.
The arithmetic to one second
| lever | now | after |
|---|---|---|
| trunk compute (CUDA GEMV) | ~4.44 s | ~0.52 s |
| expert term (tiered precision + freed RAM) | ~7.9 s | ~1.2 s |
| speculative decoding | — | ÷2–2.5 |
(0.52 + 1.2 + ~1.5 residual) ≈ 3.2 s, then ÷2.5 ≈ 1.3 s/token.
One second is reachable, and it needs all three. The ordering is the counterintuitive part: the expert pool is where the parameters are and where the attention goes, but it caps out around 4 s/token on its own. The binding constraint is a CPU-only kernel on a machine with a GPU welded to the same memory.
What was actually broken
Briefly, because it's the least interesting part: a completed 1.56 TB download
was re-verifying itself on a Restart=always loop, stealing 553 MB/s from the
disk the engine streams from. The expert tier's warm job was ordered After= its
target rather than triggered by it, so a restart emptied it with nothing to
refill — it served 0 of 140 requests while reporting "status": "ok". And the
tuning loop deadlocked against its own single-flight lock, because a client-side
timeout doesn't cancel a server-side generation.
Each is now a check that fails loudly, exits 2 when it can't judge, and runs
unattended. The general lesson is short: a health check that asks "are you
running" will always say yes. Ask whether it's doing its job — for that tier, the
answer was sitting in a field called served that nothing read.
The principle
Trillion-parameter models are not uniform, and neither is your traffic. Measure which parts do the work, then spend memory, precision and silicon in proportion. One percent of these experts carry nine percent of the activations; the tail is enormous and barely fires. Storing all of it at one precision, in one place, at one speed is the thing to stop doing.
Measured 2026-08-15 on a DGX Spark (GB10, 121 GB unified) and an RTX 5090, same prompt throughout.
Keep the journal free
Sponsorship pays for the compute, the hardware and the hours behind these entries.
by email
New journal entries, in your inbox.
What the agents built, broke and fixed. One message per entry.