llama.cpp build b12191 can now split mixture-of-experts work between a GPU cache and the CPU, instead of making the GPU wait while every missing expert crosses PCIe.[5][6] The new path is experimental and needs fast system memory, but contributor tests suggest it can turn a small-VRAM gaming card into a much better partner for 20GB-plus MoE models.[1]
This is not magic VRAM.
The full model still has to live somewhere, usually system RAM, and the GPU still needs room for the layers and expert cache assigned to it.[6][11] What changed is how llama.cpp handles the weights that do not fit on the card.[5]
A smarter split for models that do not fit
A mixture-of-experts model contains many feed-forward networks called experts, but activates only a few for each token.[8] Qwen3.6-35B-A3B, for example, has 35 billion total parameters while activating 3 billion; its architecture routes each token through eight of 256 experts plus one shared expert.[8] That sparsity makes the arithmetic relatively light. Storing and moving the complete set of weights is the awkward part.
llama.cpp already had an experimental MoE cache.[6] Users could keep expert weights in host memory and reserve part of the GPU for the experts selected most often.[6] A cache hit runs on the GPU.[6] A miss previously meant uploading the required expert over PCIe before generation could continue.[6]
Build b12191 adds a second choice for those misses.[5] The new moe-cache-cpu-share setting tells llama.cpp to calculate some missed experts directly on the CPU while the GPU handles cached experts and any misses still selected for upload.[5][6] The two results are combined before the layer finishes.[5] In a well-matched system, CPU memory bandwidth does useful work while the GPU is busy, rather than leaving one processor waiting on the other.
llama.cpp’s documentation says the CPU route helps when the processor can read host-resident experts faster than the GPU can receive them.[6] Fast RAM, slower PCIe transfers and unpinned model memory can favor the CPU.[6] If expert weights are pinned and already saturate the PCIe link, diverting work to the processor may do nothing or make generation slower.[6]
The release includes a tuner rather than one recommended setting. It starts llama-server six times using two cache sizes and three CPU shares, records a few thousand generated tokens, estimates the machine’s upload and CPU speeds, then recommends the lowest CPU share within 5% of the predicted maximum.[1][6][7] The process takes a few minutes and depends on the exact model, context, memory mode and hardware.[6]
The early numbers are promising, not settled
The largest gains come from contributor tests attached to the development pull request, not from a finished independent review.[1]
On an RTX 3070 with 8GB of VRAM, a Qwen3.6-35B-A3B derivative using a roughly 3.1GiB expert cache generated 41.0 tokens per second with CPU sharing disabled and 62.4 tokens per second with a 0.95 share.[1] That is a 52% increase by HighVRAM’s calculation.
The same contributor reported 64.5 tokens per second on an 11GB RTX 2080 Ti, versus a 42.11-token baseline with the MoE cache disabled.[1] A 16GB RTX 5060 Ti reached 61.1 tokens per second, compared with a 44.23-token baseline.[1] Those work out to gains of 53% and 38% respectively.
These are useful measurements because they cover cards people might plausibly own, not a rack of accelerators. They are still community results from pre-merge branches, with different cache sizes and an unusually large Q6 quant.[1] HighVRAM has not reproduced the model runs, and no independent post-merge benchmark was available when this article was prepared.
The mechanism has credible upside, but an 8GB card does not automatically become 50% faster.
A second cache-policy change merged one day earlier may help too.[2] llama.cpp replaced its older policy with a frequency-and-recency system designed to retain experts that remain useful across tokens.[2] Its author measured 6% to 7% faster decoding on two MoE workloads and 8% fewer uploads, again in contributor testing.[2] Build b12191 includes both that policy and the CPU fallback.[2][5]
What you need at home
The feature is available now in llama.cpp’s b12191 prerelease binaries for Windows, Linux and macOS, with CUDA, Vulkan, ROCm, SYCL and CPU packages among the published assets.[5] HighVRAM downloaded the 15.9MB macOS Arm binary, verified that it identifies itself as build 12191 at commit e95426f, and confirmed that its help text exposes the MoE cache size, CPU share and CPU-MoE controls. The matching source archive contains the tuner and documentation.
Hardware needs depend more on the model than on the feature. The published Qwen3.6-35B-A3B GGUF set includes a UD-Q4_K_S file of 19.46GiB, UD-Q4_K_M at 20.61GiB and UD-Q6_K_XL at 29.66GiB.[11] An 8GB GPU can cache only part of that. The remainder needs system memory, along with the operating system, runtime overhead and context cache.[6][11]
For the roughly 20GiB Q4 files, 32GB of system RAM is a practical floor if context is kept modest and other applications are closed.[11] A 48GB or 64GB machine gives the runtime breathing room; the 29.66GiB Q6 build belongs in that roomier tier. Qwen lists a 262,144-token default context.[8] Reserving the full window also consumes memory for KV state, so start around 32K while tuning. A heroic context setting is an efficient way to turn a promising speed test into an out-of-memory message.
Storage is simpler: allow the model’s file size plus several gigabytes for alternate quants, downloads and temporary files. The feature is local and does not add a cloud service or send prompts away. Its privacy story is the usual llama.cpp one: the model, tuning traces and conversations stay on the machine unless the surrounding application transmits them.
Who should try it
This update is for people with ample system RAM, a discrete GPU that cannot hold their chosen MoE model, and a CPU-memory subsystem fast enough to participate. Owners of 8GB to 16GB cards running Qwen3.6-class models are the obvious experimenters. Users whose model already fits entirely in VRAM should leave the feature alone; a CPU detour cannot improve a cache miss that never happens.
Use build b12191 or newer, keep the model and context fixed, and let the supplied tuner compare configurations on the actual machine. Watch generation speed after the cache warms, not just prompt processing. Also compare against MoE caching disabled. A clever cache that loses to the plain baseline is still a loss.
The missing evidence is a clean post-merge test matrix across PCIe generations, RAM speeds and current 8GB, 12GB and 16GB GPUs. Until that exists, b12191 is worth trying rather than blindly adopting. If the tuner cannot beat the no-cache baseline on your model, reclaim the VRAM and wait for the next round of measurements.
Sources
- [1] llama.cpp PR 30966: run missed experts on CPU
- [2] llama.cpp PR 31233: hybrid MoE cache
- [5] llama.cpp build b12191
- [6] llama.cpp MoE cache documentation at b12191
- [7] llama.cpp MoE cache tuning script at b12191
- [8] Qwen3.6-35B-A3B GGUF local-app page
- [11] Qwen3.6-35B-A3B GGUF file tree at revision a483e9e