Context The Mac study is part of the distributed AI research program; the research page separates it from the phone work. Distributed AI research.
Moonshot AI
Kimi Linear 48B
Kimi Linear 48B-A3B-Instruct is Moonshot AI's 48B-total, 3B-active hybrid linear-attention mixture-of-experts (MoE) model. This study is deliberately separate from the phone-cluster work. The platform is a 24 GB Apple M5 MacBook Air: fanless, CPU-only, and small enough that the model cannot be fully resident at a comfortable speed. The question was not “can the Mac run a 48B model?” It can, slowly. The question was how an expert cache changes the shape of the decode rate, and where the trade-off turns.
Protocol
The model was Kimi-Linear-48B-A3B-Instruct in four-bit Q4_K_M, run with llama.cpp on CPU (-ngl 0), context 4,096, no memory-mapped file access (mmap), seed 1, temperature 0, three repetitions per arm, and interleaved uncached controls. The cache ladder ran from 1 GB to 12 GB with a 15-second settle between arms. The workloads were a short reference prompt, a 128-token Rust LRU implementation, and a 128-token multi-step reasoning problem.
The deterministic columns — hit rate and SSD traffic — had zero dispersion across repetitions. The throughput columns are medians, and the uncached control is in-session for each workload. That matters because the machine is thermally bounded and because a cache arm can change the page-cache state for the next arm.
The plateau
Decode is token-by-token generation.
| Expert cache | Reference | Coding | Reasoning |
|---|---|---|---|
| Uncached | 2.68 tok/s | 2.61 tok/s | 2.61 tok/s |
| 1 GB | 3.75 | 3.78 | 3.48 |
| 2 GB | 4.43 | 4.57 | 4.10 |
| 4 GB | 4.91 | 5.39 | 4.58 |
| 6 GB | 4.52 | 5.09 | 4.58 |
| 8 GB | 4.71 | 5.18 | 4.96 |
| 10 GB | 4.89 | 4.82 | 4.51 |
| 12 GB | 4.36 | 4.10 | 3.82 |
The practical range is a 4–8 GB plateau at roughly 4.5–5.4 tok/s. The reference and coding workloads peaked at 4 GB; reasoning peaked at 8 GB. The older “4 GB sweet spot” reproduces for code generation, but it is not universal. A single default is a compromise, not a law.
The speedup over uncached was 1.3–1.5× at 1 GB, 1.6–1.8× at 2 GB, and 1.8–2.1× across the 4–8 GB plateau. At 12 GB the speedup fell back to 1.5–1.7×. More cache was not monotonically better.
Why the plateau exists
At small budgets, the miss path dominates: reading from SSD (`pread`) plus repacking the expert weights. A cached token at 4 GB still read about 0.29–0.37 GB from SSD, against about 0.85 GB uncached. That is a 55–66% reduction. Hit rates rose from 0.26–0.33 at 1 GB to 0.56–0.66 at 4 GB and 0.85+ at 12 GB. Coding had the best expert locality at every rung.
Above 10 GB, memory pressure changed the cost structure. Expert compute inflated sharply: at 12 GB, the coding workload spent 77.7 ms per step in expert compute, and reasoning spent 97.5 ms, against about 15.9 ms at 4 GB. The cache was still reducing I/O, but the machine was paying for residency in compute and memory pressure. Throughput degraded, though it did not collapse below uncached.
What it feels like
At 4–8 GB, the Mac produced 4.5–5.4 tok/s, roughly 185–220 ms per token. That is usable for streaming completions with patience, and marginal for interactive coding. The coding workload produced a coherent Rust LRU implementation. Uncached at 2.6 tok/s was too slow for interactive use.
The absolute rate is thermally bounded on this fanless machine. The study did not claim a sustained data-center number or a comparison to a GPU laptop. It describes one 24 GB Air, one four-bit artifact, and a cache ladder under a fixed protocol.
Takeaway
The cache is the machine. On a memory-constrained Mac, the useful question is not “how large can the cache be?” but “which cache size keeps the miss path from dominating without turning residency into the new bottleneck?” For this artifact, 4 GB was the best single default for code, 8 GB was better for reasoning, and the 4–8 GB plateau was the honest operating range.