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.
C avx2c99cpu-inferencedeep-learningfrom-scratchinference-enginekimi-k3linear-attentionllmllm-inferencemachine-learningmemory-efficientmixture-of-expertsmoemxfp4quantizationsimdsystems-programmingtransformerzero-dependencies
flowchart LR
GB["one spare GB"] --> Q{"trunk or<br/>expert cache?"}
Q -->|"trunk"| T["pins a layer<br/>-1.17 GB per token"]
Q -->|"cache"| C["below 36 GB arena<br/>removes nothing"]
T --> FAST["16.80 s/token"]
C --> SLOW["28.38 s/token"]
style GB fill:#ECE8E0,stroke:#8C8477,color:#3B372F
style Q fill:#EAE4F1,stroke:#7E6E9C,color:#3B372F
style T fill:#E7ECDD,stroke:#6E9160,color:#3B372F
style C fill:#F5E2DB,stroke:#B75845,color:#3B372F
style FAST fill:#DDEBE7,stroke:#4E8E86,color:#3B372F
style SLOW fill:#F4E7D3,stroke:#C07A42,color:#3B372F