Instructions to use arunprasath/gemma4-cpu-moe-gguf with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use arunprasath/gemma4-cpu-moe-gguf with llama.cpp:
Install (macOS, Linux)
curl -LsSf https://llama.app/install.sh | sh # Start a local OpenAI-compatible server with a web UI: llama serve -hf arunprasath/gemma4-cpu-moe-gguf:Q4_0 # Run inference directly in the terminal: llama cli -hf arunprasath/gemma4-cpu-moe-gguf:Q4_0
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf arunprasath/gemma4-cpu-moe-gguf:Q4_0 # Run inference directly in the terminal: llama cli -hf arunprasath/gemma4-cpu-moe-gguf:Q4_0
Use pre-built binary
# Download pre-built binary from: # https://github.com/ggerganov/llama.cpp/releases # Start a local OpenAI-compatible server with a web UI: ./llama-server -hf arunprasath/gemma4-cpu-moe-gguf:Q4_0 # Run inference directly in the terminal: ./llama-cli -hf arunprasath/gemma4-cpu-moe-gguf:Q4_0
Build from source code
git clone https://github.com/ggerganov/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-server llama-cli # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama-server -hf arunprasath/gemma4-cpu-moe-gguf:Q4_0 # Run inference directly in the terminal: ./build/bin/llama-cli -hf arunprasath/gemma4-cpu-moe-gguf:Q4_0
Use Docker
docker model run hf.co/arunprasath/gemma4-cpu-moe-gguf:Q4_0
- LM Studio
- Jan
- vLLM
How to use arunprasath/gemma4-cpu-moe-gguf with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "arunprasath/gemma4-cpu-moe-gguf" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "arunprasath/gemma4-cpu-moe-gguf", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/arunprasath/gemma4-cpu-moe-gguf:Q4_0
- Ollama
How to use arunprasath/gemma4-cpu-moe-gguf with Ollama:
ollama run hf.co/arunprasath/gemma4-cpu-moe-gguf:Q4_0
- Unsloth Desktop
- Pi
How to use arunprasath/gemma4-cpu-moe-gguf with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf arunprasath/gemma4-cpu-moe-gguf:Q4_0
Configure the model in Pi
# Install Pi: npm install -g @earendil-works/pi-coding-agent # Add to ~/.pi/agent/models.json: { "providers": { "llama-cpp": { "baseUrl": "http://localhost:8080/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "arunprasath/gemma4-cpu-moe-gguf:Q4_0" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Docker Model Runner
How to use arunprasath/gemma4-cpu-moe-gguf with Docker Model Runner:
docker model run hf.co/arunprasath/gemma4-cpu-moe-gguf:Q4_0
- Lemonade
How to use arunprasath/gemma4-cpu-moe-gguf with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull arunprasath/gemma4-cpu-moe-gguf:Q4_0
Run and chat with the model
lemonade run user.gemma4-cpu-moe-gguf-Q4_0
List all available models
lemonade list
- Hermes Agent
How to use arunprasath/gemma4-cpu-moe-gguf with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf arunprasath/gemma4-cpu-moe-gguf:Q4_0
Configure Hermes
# Install Hermes: curl -fsSL https://hermes-agent.nousresearch.com/install.sh | bash hermes setup # Point Hermes at the local server: hermes config set model.provider custom hermes config set model.base_url http://127.0.0.1:8080/v1 hermes config set model.default arunprasath/gemma4-cpu-moe-gguf:Q4_0
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use arunprasath/gemma4-cpu-moe-gguf with OpenClaw:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf arunprasath/gemma4-cpu-moe-gguf:Q4_0
Configure OpenClaw
# Install OpenClaw: npm install -g openclaw@latest # Register the local server and set it as the default model: openclaw onboard --non-interactive --mode local \ --auth-choice custom-api-key \ --custom-base-url http://127.0.0.1:8080/v1 \ --custom-model-id "arunprasath/gemma4-cpu-moe-gguf:Q4_0" \ --custom-provider-id llama-cpp \ --custom-compatibility openai \ --custom-text-input \ --accept-risk \ --skip-health
Run OpenClaw
openclaw agent --local --agent main --message "Hello from Hugging Face"
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 Q4_0) 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 Q4_0 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
| file | size | what it is |
|---|---|---|
gemma-4-26B_q4_0-it.gguf |
14.4 GB | Google's Gemma-4-26B-A4B instruction-tuned release, converted and quantized to Q4_0 with llama.cpp. The base of both recipes. |
mtp-q4.gguf |
321 MB | Google's official MTP drafter for Gemma-4, quantized to Q4. Used for speculative decoding, so the output stays identical to the base model. |
gemma-4-26B_q4_0_headQ2K.gguf |
14.3 GB | The same model with the output head (the projection to the 262K-token vocabulary) requantized from 6.5 to 2.4 bits per weight. Per token the head is 32 percent of the bytes read and the experts only 16 percent, so this is where the bytes are. No changed outputs were found on the test prompts. Needs the ik_llama.cpp kernels. |
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 recipes
Single-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-prompt
Batched 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 24
What was measured
| setting | tokens per second |
|---|---|
| Q4_0, single stream, no tricks | about 25 |
| Q4_0, 3 of 8 experts, MTP speculative decoding, single stream | about 40 (37.7 careful, about 41 on a cool machine) |
| Same, batch 32, aggregate | about 124 |
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
- Downloads last month
- 209
4-bit