<!-- Markdown mirror of https://getrigbase.com/models/gemma-4-31b/ . Source of truth is the HTML page. Data licence: CC BY 4.0, please cite RigBase (https://getrigbase.com/models/gemma-4-31b/). -->
Source: https://getrigbase.com/models/gemma-4-31b/
Last updated: 2026-11-08

[Models](https://getrigbase.com/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: 8 Nov 2026

Current model 30.7B dense 12 measured results fastest plain decode: 71.3 tok/s  [model info ↗](https://llamabench.ai/browse/rtx5090)

[Will it fit my GPU?](https://getrigbase.com/can-it-run/) [Best value GPU per euro →](https://getrigbase.com/guides/best-value-gpu-local-llm-europe/)

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

| Build | Quant | Engine | tok/s | Prompt processing (tok/s) | Cost | Source |
|---|---|---|---|---|---|---|
| [RTX 5090 running Gemma 4 31B Q4_K_M (llama-bench)](https://getrigbase.com/builds/lla-rtx-5090-gemma-4-31b/) | Q4_K_M | llama.cpp b11658 (llama-bench) | **71.3** | 3,841 @512 · est. TTFT @8k ≈2.1 s* |  | [localllmadvisor.com ↗](https://localllmadvisor.com/can-run/gemma-4-31b-on-rtx-5090-32gb.html) |
| [RTX 5090: 2026 models (llamabench community)](https://getrigbase.com/builds/llamabench-rtx-5090/) | llama-bench tg128 (quant per result) | llama.cpp | **70.0** | – |  | [llamabench.ai ↗](https://llamabench.ai/browse/rtx5090) |
| [RX 9070 XT + Radeon AI PRO R9700 (48 GB, ROCm 7.2): Qwen3.8 27B 71.6 tok/s with MTP at 128K context](https://getrigbase.com/builds/9800x3d-rx-9070-xt-plus-r9700-rocm-llamacpp/) | Q6_K + MTP drafter, f16 KV | llama.cpp b11434 (ROCm), layer split, MTP | **52.2** ⚡ | 279 @128K depth |  | [github.com ↗](https://github.com/kr4ckhe4d/local-llm-benchmarks/blob/main/r9700%2Brx9070.md) |
| [RTX 4090: 2026 models (llamabench community)](https://getrigbase.com/builds/llamabench-rtx-4090/) | llama-bench tg128 (quant per result) | llama.cpp | **43.8** | – |  | [llamabench.ai ↗](https://llamabench.ai/browse/rtx4090) |
| [RTX 3090 running Gemma 4 31B Q4_K_M (llama-bench)](https://getrigbase.com/builds/lla-rtx-3090-gemma-4-31b/) | Q4_K_M | llama.cpp b11658 (llama-bench) | **38.8** | 1,292 @512 · est. TTFT @8k ≈6.3 s* |  | [localllmadvisor.com ↗](https://localllmadvisor.com/can-run/gemma-4-31b-on-rtx-3090-24gb.html) |
| [RX 9070 XT + Radeon AI PRO R9700 (48 GB, ROCm 7.2): Qwen3.8 27B 71.6 tok/s with MTP at 128K context](https://getrigbase.com/builds/9800x3d-rx-9070-xt-plus-r9700-rocm-llamacpp/) | Q6_K, f16 KV | llama.cpp b11434 (ROCm), layer split, no drafter | **19.3** | – |  | [github.com ↗](https://github.com/kr4ckhe4d/local-llm-benchmarks/blob/main/r9700%2Brx9070.md) |
| [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)](https://getrigbase.com/builds/geekom-a9-mega-ryzen-ai-max-388-64gb-qwen36-qwen38-gemma4/) | q4_0 | llama.cpp (ROCm) | **11.28** | 69.53 @8,192 · est. TTFT @8k ≈118 s* |  | [github.com ↗](https://github.com/GEEKOMOfficial/geekom-a9-mega-local-llm-benchmarks/blob/main/docs/A9-Mega-388/README.md) |
| [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)](https://getrigbase.com/builds/framework-desktop-strix-halo-qwen38-gemma4-valerian/) | Q4_K_M (17.07 GiB) | llama.cpp (Vulkan, commit f5222f25c) | **11.27** | 360 @512 · est. TTFT @8k ≈22.8 s* |  | [valerian.dtdg.fr ↗](https://valerian.dtdg.fr/blog/2026/amd-strix-halo-llm-benchmark-follow-up/) |
| [HP ZBook Ultra G1a (Strix Halo laptop, 128 GB): Qwen3.6 35B-A3B at 59.4 tok/s, gpt-oss 120B at 44.7](https://getrigbase.com/builds/hp-zbook-ultra-g1a-strix-halo-laptop-petronella/) | 4-bit | Ollama 0.34.0 | **8.8** | – |  | [petronellatech.com ↗](https://petronellatech.com/blog/dgx-spark-vs-strix-halo-vs-gorgon-halo-local-llm-benchmarks/) |
| [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)](https://getrigbase.com/builds/framework-desktop-strix-halo-qwen38-gemma4-valerian/) | Q6_K (23.47 GiB) | llama.cpp (Vulkan, commit f5222f25c) | **8.1** | 348 @512 · est. TTFT @8k ≈23.5 s* |  | [valerian.dtdg.fr ↗](https://valerian.dtdg.fr/blog/2026/amd-strix-halo-llm-benchmark-follow-up/) |
| [Mac mini M6 32 GB: Qwen3.6 35B-A3B at 63 tok/s, Nemotron 3.5 Lightning 45 (LM Studio)](https://getrigbase.com/builds/mac-mini-m6-32gb-lm-studio-oct-2026/) | QAT (google/gemma-4-31b-qat) | LM Studio | **7.4** | – |  | [github.com ↗](https://github.com/HDZucht/Mac-Mini-M6-LLM-benchmarks) |
| [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)](https://getrigbase.com/builds/framework-desktop-strix-halo-qwen38-gemma4-valerian/) | Q8_0 (30.39 GiB) | llama.cpp (Vulkan, commit f5222f25c) | **6.46** | 412 @512 · est. TTFT @8k ≈19.9 s* |  | [valerian.dtdg.fr ↗](https://valerian.dtdg.fr/blog/2026/amd-strix-halo-llm-benchmark-follow-up/) |

Prompt processing = prefill speed reported by the source, @ prompt length. * est. TTFT @8k is calculated from measured prefill, not measured. [Why it matters](https://getrigbase.com/can-it-run/#prefill).

## 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.

| Quant | File size | Mean KLD vs BF16 | Same top token |
|---|---|---|---|
| QAT UD-Q4_K_XL (Unsloth) | 17.29 GB | **0.01403** | 96.67% |
| QAT Q4_0 (plain llama.cpp conversion) | 17.65 GB | **0.09349** | 87.91% |

Source: [unsloth.ai ↗](https://unsloth.ai/docs/models/gemma-4/qat). 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.
Ad · this space is available **Sponsor this spot: reach people building local AI rigs.** One clearly-labeled slot per page, no tracking scripts.  [Sponsor this spot →](https://getrigbase.com/advertise/#inquiry)

**Rent before you buy:** try this model on a cloud GPU for a few dollars first: [Runpod](https://runpod.io?ref=77qcpl2c) (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](https://llamabench.ai/browse/rtx5090): GGUF param count via llamabench.ai). Weight size = parameters × bits-per-weight ÷ 8, before context (KV cache) and runtime overhead.

| Format | Bits/weight | Weights | Smallest common memory size that holds the weights alone |
|---|---|---|---|
| Q8_0 | 8.50 | 32.6 GB | 48 GB |
| Q6_K | 6.56 | 25.2 GB | 32 GB |
| Q5_K_M | 5.70 | 21.9 GB | 24 GB |
| Q4_K_M | 4.89 | **18.8 GB** | 24 GB |
| Q3_K_M | 4.00 | 15.3 GB | 16 GB |
| Q2_K | 3.16 | 12.1 GB | 16 GB |

Bits-per-weight for GGUF quants are llama.cpp's own figures ([llama.cpp quantize README](https://github.com/ggml-org/llama.cpp/blob/master/tools/quantize/README.md)). "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](https://getrigbase.com/can-it-run/).

## 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](https://getrigbase.com/can-i-run/gemma-4-31b-on-rtx-3090/) · [RTX 4090](https://getrigbase.com/can-i-run/gemma-4-31b-on-rtx-4090/) · [RTX 5090](https://getrigbase.com/can-i-run/gemma-4-31b-on-rtx-5090/) · [Strix Halo (Radeon 8060S)](https://getrigbase.com/can-i-run/gemma-4-31b-on-strix-halo-radeon-8060s/)

Related: [what GPU do you need for 2026 models](https://getrigbase.com/guides/what-gpu-for-qwen3-6-gemma-4-gpt-oss/) · [all builds](https://getrigbase.com/builds/)

**Search answer:** [How much VRAM do you need for Gemma 4 31B?](https://getrigbase.com/vram/gemma-4-31b/) · [Will it fit my GPU?](https://getrigbase.com/can-it-run/)

Speed with and without MTP / DFlash on the same machines: [measured speed-ups](https://getrigbase.com/guides/speculative-decoding-mtp-dflash-speedup/).
