More
Submit build

Models / Gemma 4 31B

Best home rig for Gemma 4 31B

Quick answer

How much VRAM does Gemma 4 31B need?
The weights are about 18.8 GB at Q4_K_M (30.7B params × 4.89 bits ÷ 8, before context/KV cache). Add memory for context (KV cache) and the runtime. The smallest-memory setup with a measured result here, fully in memory, is RTX 4090 (24 GB) at 43.8 tok/s.

What is the fastest measured hardware for Gemma 4 31B?
RTX 5090: 71.3 tok/s generation (llama.cpp b11658 (llama-bench), Q4_K_M), from https://localllmadvisor.com/can-run/gemma-4-31b-on-rtx-5090-32gb.html.

Last updated:

Current model30.7B dense12 measured resultsfastest plain decode: 71.3 tok/s model info ↗

Will it fit my GPU? Best value GPU per euro →

Real, measured generation speeds for Gemma 4 31B on home hardware, fastest first. Different quants/engines aren't directly comparable.

BuildQuantEnginetok/sPrompt processing (tok/s)CostSource
RTX 5090 running Gemma 4 31B Q4_K_M (llama-bench)Q4_K_Mllama.cpp b11658 (llama-bench)71.33,841 @512 · est. TTFT @8k ≈2.1 s*localllmadvisor.com ↗
RTX 5090: 2026 models (llamabench community)llama-bench tg128 (quant per result)llama.cpp70.0–llamabench.ai ↗
RX 9070 XT + Radeon AI PRO R9700 (48 GB, ROCm 7.2): Qwen3.8 27B 71.6 tok/s with MTP at 128K contextQ6_K + MTP drafter, f16 KVllama.cpp b11434 (ROCm), layer split, MTP52.2 ⚡279 @128K depthgithub.com ↗
RTX 4090: 2026 models (llamabench community)llama-bench tg128 (quant per result)llama.cpp43.8–llamabench.ai ↗
RTX 3090 running Gemma 4 31B Q4_K_M (llama-bench)Q4_K_Mllama.cpp b11658 (llama-bench)38.81,292 @512 · est. TTFT @8k ≈6.3 s*localllmadvisor.com ↗
RX 9070 XT + Radeon AI PRO R9700 (48 GB, ROCm 7.2): Qwen3.8 27B 71.6 tok/s with MTP at 128K contextQ6_K, f16 KVllama.cpp b11434 (ROCm), layer split, no drafter19.3–github.com ↗
Ryzen AI Max+ 388 mini PC (64 GB): Qwen3.6 35B-A3B at 68.0 tok/s, still 21.7 at 256K context (llama.cpp ROCm, GEEKOM records)q4_0llama.cpp (ROCm)11.2869.53 @8,192 · est. TTFT @8k ≈118 s*github.com ↗
Framework Desktop (Ryzen AI Max+ 395, 128 GB): Qwen3.8 27B UD-Q4_K_M at 12.82 tok/s, Gemma 4 31B Q4_K_M at 11.27 (llama-bench tg128)Q4_K_M (17.07 GiB)llama.cpp (Vulkan, commit f5222f25c)11.27360 @512 · est. TTFT @8k ≈22.8 s*valerian.dtdg.fr ↗
HP ZBook Ultra G1a (Strix Halo laptop, 128 GB): Qwen3.6 35B-A3B at 59.4 tok/s, gpt-oss 120B at 44.74-bitOllama 0.34.08.8–petronellatech.com ↗
Framework Desktop (Ryzen AI Max+ 395, 128 GB): Qwen3.8 27B UD-Q4_K_M at 12.82 tok/s, Gemma 4 31B Q4_K_M at 11.27 (llama-bench tg128)Q6_K (23.47 GiB)llama.cpp (Vulkan, commit f5222f25c)8.1348 @512 · est. TTFT @8k ≈23.5 s*valerian.dtdg.fr ↗
Mac mini M6 32 GB: Qwen3.6 35B-A3B at 63 tok/s, Nemotron 3.5 Lightning 45 (LM Studio)QAT (google/gemma-4-31b-qat)LM Studio7.4–github.com ↗
Framework Desktop (Ryzen AI Max+ 395, 128 GB): Qwen3.8 27B UD-Q4_K_M at 12.82 tok/s, Gemma 4 31B Q4_K_M at 11.27 (llama-bench tg128)Q8_0 (30.39 GiB)llama.cpp (Vulkan, commit f5222f25c)6.46412 @512 · est. TTFT @8k ≈19.9 s*valerian.dtdg.fr ↗

Prompt processing = prefill speed reported by the source, @ prompt length. * est. TTFT @8k is calculated from measured prefill, not measured. Why it matters.

Quality cost of each quant for Gemma 4 31B

How far each quantization drifts from the full-precision (BF16) model, as published by the quant maker. Lower KL divergence (KLD) is closer to the original; same-top-token % is how often the quant picks the same next token as BF16. Q4_K_M is usually the sweet spot; below Q4 the drift grows fast, which is why RigBase only lists Q4-or-higher speed results.

QuantFile sizeMean KLD vs BF16Same top token
QAT UD-Q4_K_XL (Unsloth)17.29 GB0.0140396.67%
QAT Q4_0 (plain llama.cpp conversion)17.65 GB0.0934987.91%

Source: unsloth.ai ↗. Unsloth (quant publisher) Gemma 4 QAT docs: KLD on wikitext. Both rows are 4-bit files made from Google's QAT checkpoint: Unsloth's UD-Q4_K_XL versus a plain llama.cpp Q4_0 conversion. Unsloth publishes no higher-precision QAT file, saying higher precisions did not improve accuracy. KLD from different publishers, datasets or llama.cpp builds isn't directly comparable.

Rent before you buy: try this model on a cloud GPU for a few dollars first: Runpod (referral link; sign up with Google to get the new-user bonus)

Memory math: how much VRAM / RAM does Gemma 4 31B need?

Gemma 4 31B has 30.7B parameters (source: GGUF param count via llamabench.ai). Weight size = parameters × bits-per-weight ÷ 8, before context (KV cache) and runtime overhead.

FormatBits/weightWeightsSmallest common memory size that holds the weights alone
Q8_08.5032.6 GB48 GB
Q6_K6.5625.2 GB32 GB
Q5_K_M5.7021.9 GB24 GB
Q4_K_M4.8918.8 GB24 GB
Q3_K_M4.0015.3 GB16 GB
Q2_K3.1612.1 GB16 GB

Bits-per-weight for GGUF quants are llama.cpp's own figures (llama.cpp quantize README). "As measured" rows apply the source's stated bits-per-weight to the parameter count; real files differ slightly because some layers stay at higher precision. Try other combinations in the VRAM calculator.

FAQ

How much VRAM does Gemma 4 31B need?

The weights are about 18.8 GB at Q4_K_M (30.7B params × 4.89 bits ÷ 8, before context/KV cache). Add memory for context (KV cache) and the runtime. The smallest-memory setup with a measured result here, fully in memory, is RTX 4090 (24 GB) at 43.8 tok/s.

What is the fastest measured hardware for Gemma 4 31B?

RTX 5090: 71.3 tok/s generation (llama.cpp b11658 (llama-bench), Q4_K_M), from https://localllmadvisor.com/can-run/gemma-4-31b-on-rtx-5090-32gb.html.

Which GPUs have measured results for Gemma 4 31B?

RTX 3090, RTX 4090, RTX 5090, Strix Halo (Radeon 8060S).

Can it run on… RTX 3090 · RTX 4090 · RTX 5090 · Strix Halo (Radeon 8060S)

Related: what GPU do you need for 2026 models · all builds

Search answer: How much VRAM do you need for Gemma 4 31B? · Will it fit my GPU?

Speed with and without MTP / DFlash on the same machines: measured speed-ups.