Skip to content

A 2.78-trillion-parameter Kimi K3 running inference on a single CPU in 8.24 GB of RAM. Portable C99: no BLAS, no framework, no GPU.

3.6 KB
Raw Blame

Measured speed, August 2026

Every figure below is a run on the full released 2.78T checkpoint, decoding with --incremental. Output is byte-identical to the reference at every budget: the speed work never changes what the model emits, only how fast it emits it. Two machines were used:

  • VM: 32 vCPU, ~2.9 GB/s block storage. Device-bandwidth bound; quoted where noted.
  • Workstation: 124 cores (matching the published docs/PERFORMANCE.md box's core count), 720 GB RAM, 4.6 GB/s local NVMe. Note the disk is faster than the published box's 3.2 GB/s, so the streaming rows below benefit partly from the drive and are not a pure code comparison; the trunk-resident row is compute-bound, where the disk drops out and the comparison is clean.

s/token is the steady-state average over a generation; the first token of any run also pays a one-time load and is higher.

Decode, by resident memory

Laptop-class rows are enforced with a cgroup MemoryMax cap on the workstation NVMe, so they are honest RAM limits at a good-SSD read rate rather than an emulation.

Resident RAM s/token peak RSS notes
8 GB (laptop preset) 26.5 8.73 GB streams the whole trunk every token; the floor
32 GB 24.2 19.5 GB partial trunk pinned
64 GB 19.8 51.6 GB more of the trunk resident
128+ GB (trunk resident) 5.59 179 GB trunk fully resident and compute-bound, so the disk drops out; 3.0x vs the published 16.80 (128 GB well-allocated) on the matched core count

The 128 GB figure is the median of three runs (5.52, 5.59, 9.44; the 9.44 carried the one-time load). Token ids matched the reference on every row.

The mechanical wins that produced those numbers

  • Fused matmul kernels. The fp32, bf16 and MXFP4 dot products moved from one unfused accumulator to sixteen (two for the short MXFP4 group) with explicitly fused products, taking the trunk matmul to its memory floor (2.48 s/token of compute, from ~20). The scalar and AVX2 paths stay bitwise identical; test_ops gates it.
  • --preset auto. Gives the trunk all available RAM before the expert cache, measured worth about 70x an equal gigabyte of cache at the margin, and caps the pin below the RAM ceiling after a heavy-pin regression was measured (51 GB pinned ran slower than 0 GB pinned).
  • Chunk-union prefill. A batched-prefill MoE fetches each unique routed expert once per chunk instead of once per token. Measured on a 40-token prefill: expert bytes read fell from 648.76 GB to 330.73 GB, 1.96x, with the generated token bit-identical to the per-token path.

Conversation resume

--save-state / --load-state carry the recurrent state and KV cache to disk so a second turn resumes instead of re-reading the prior context. Measured, same continuation:

wall s/token
turn two, from scratch 706.8 s 175.4
turn two, resumed 182.6 s 42.9

3.9x, restore itself 0.3 s, token ids identical to the from-scratch run. The advantage grows with history length.

Hybrid decode (draft proposes, exact verifies)

Correctness is proven: on the real checkpoint the int8-derived draft's teacher-forced agreement is 94.2% against a 96.2% measurement ceiling, and a first flight accepted 66.7% of drafts with byte-identical output. The SPEED half needs a true int8 container (56.7 GB resident); the current bf16-format draft (109 GB) cannot be resident at 64 GB and measured slower there. See docs/notes/int8-draft-container.md.

Not pursued

Lossless trunk compression was investigated and shelved on a decode-speed measurement; the codec works and the reasoning is in docs/notes/compressed-trunk.md.