arunprasath/gemma4-cpu-moe-gguf
Gemma-4 26B on a CPU, no GPU: the benchmarked GGUFs
These are the exact model files behind a measured result: a 26-billion-parameter mixture-of-experts model running at about 40 tokens per second single-stream (output identical to plain Q40) and about **124 tokens per second aggregate at batch 32**, on an i9-13900K with 64 GB of DDR5-4800 and no graphics card. Plain Q40 with no tricks does about 25.
The write-up with the byte budget, the roofline, the dead ends and the exact commands: https://apeg.dev/writing/running-gemma4-26b-on-a-cpu/
Scripts, results and a one-command reproduce: https://github.com/arun-prasath2005/gemma4-cpu-moe, archived as DOI 10.5281/zenodo.22762963.
By Arun Prasath E G, agentic AI architect and forward deployed engineer (apeg.dev).
Files
The base model and the drafter are Google releases under the Gemma Terms of Use. Nothing here is fine-tuned; these are conversions and quantizations of the official weights so that the numbers reproduce exactly.
Run it
Two public forks of llama.cpp, pinned to the commits the numbers were measured on: atomic-llama at d86eb0b for the speculative-decode path and the batched benchmark, and ik_llama.cpp at f96eadd for the low-bit quantization kernels. The reproduce script builds both.
git clone https://github.com/arun-prasath2005/gemma4-cpu-moe
cd gemma4-cpu-moe
bash scripts/reproduce.sh # builds both engines, downloads these GGUFs, runs both recipesSingle-stream recipe: 3 of 8 experts plus MTP speculative decoding, 8 threads, because single-stream decode is bound by memory bandwidth and more threads do nothing.
llama-cli -m models/gemma-4-26B_q4_0-it.gguf \
--override-kv gemma4.expert_used_count=int:3 \
--model-draft models/mtp-q4.gguf --spec-type draft-mtp --spec-draft-n-max 3 --spec-draft-threads 8 \
-t 8 -f prompt.txt -n 200 --temp 0 --seed 1 -st --simple-io --no-display-promptBatched recipe: read the S_TG column for aggregate generation tokens per second, 24 threads, because batching moves the bottleneck to compute.
llama-batched-bench -m models/gemma-4-26B_q4_0-it.gguf \
--override-kv gemma4.expert_used_count=int:3 \
-c 8192 -npp 64 -ntg 128 -npl 1,2,4,8,16,32 -t 24What was measured
Measured RAM bandwidth was 64.5 GB/s achievable against 76.8 on paper, and single-stream decode already used about 48 of it. That is the wall: tokens per second is bandwidth divided by bytes read per token. Thread count from 8 to 24 changed nothing single-stream.
Running 3 of 8 experts is an approximation. It was checked by generating on real prompts (a word problem, code, a factual question) at top-3 and top-8 and comparing the answers, which matched. Raw-text perplexity rose 1.6x, which is expected for a chat-tuned model on raw text and is not a quality signal here.
Numbers drift with turbo and temperature. What should reproduce is the shape: threads flat for latency, threads helping for throughput, the byte-budget proportions, and the head compressing for free. If the shape does not hold on your machine, that is a bug: open an issue on the repository, and add a row to its community results file.
Cite
Arun Prasath E G. Running Gemma-4 26B at 124 tokens/sec on a CPU, no GPU: recipe, byte budget, roofline.
Version 1.0, September 2026. https://doi.org/10.5281/zenodo.22762963