llama.cpp MoE cache now runs missed experts on the CPU, adds a tuning script
A llama.cpp pull request adds --moe-cache-cpu-share, computing a share of MoE cache misses on the CPU from host experts instead of uploading them to the GPU. A new moe-cache-tune.py script benchmarks llama-server at several settings and recommends…
Why it matters
Makes running large MoE models on limited-VRAM GPUs faster and easier to tune.
What happened
1 min readA llama.cpp pull request adds --moe-cache-cpu-share, computing a share of MoE cache misses on the CPU from host experts instead of uploading them to the GPU. A new moe-cache-tune.py script benchmarks llama-server at several settings and recommends --moe-cache-mib and the CPU share for the machine.
Our analysis
Splitting expert compute between CPU and GPU exists in tools like ktransformers, but having it in mainline llama.cpp with an auto-tuning script matters more for everyday users. The PR text gives no headline speedup numbers. Worth trying for anyone running MoE models larger than their VRAM.