HeadlinesBriefing favicon HeadlinesBriefing.com

GitHub waste engine runs Kimi K3 2.78T model on consumer laptop

Hacker News •
×

WASTE (Weight-Aware Streaming Tensor Engine) runs the full 2.78 trillion-parameter Kimi K3 model on a 64 GB MacBook Pro by streaming activated expert weights directly from NVMe storage. The engine keeps the model trunk resident in RAM (29.05 GB minimum) and uses remaining memory as a bounded expert cache, achieving 0.49–0.54 tok/s (about 0.51 tok/s in the demo). The converted model container occupies 982 GiB, requiring a terabyte of internal NVMe for usable throughput.

The approach exploits the mixture-of-experts sparsity: only ~4% of weights are active per token, so idle weights stay on disk until needed. Each expert read costs exactly one `pread` thanks to a custom 4 KiB-aligned layout. Reads bypass the OS page cache (via `F_NOCACHE`/`O_DIRECT`) to avoid fictitious hit rates. The engine is written in dependency-free C11, exposes a 26-function embeddable API (`libwaste.a`), and validates every layer against a PyTorch reference (logits match to 3.6e-06).

Running K3 demands a 64 GB machine with internal NVMe; a 32 GB system pages badly. For testing, the same engine runs the 48B Kimi-Linear variant from a 19 GB container at 10.7 tok/s with a 1.87 GB RAM floor. WASTE demonstrates that trillion-scale inference is engineering-feasible on consumer hardware, enabling fully local, no-API execution.