Gemma 4 31B hardware requirements
Gemma 4 31B (30.7B parameters) needs about 20.0 GiB of memory at 4-bit (Q4_K_M) and 59.9 GiB unquantised (F16), with a 8,192-token context. It runs fully in memory on 19 of the 26 devices we track. The smallest is NVIDIA RTX 4060 Ti 16GB with Q2_K; for 4-bit or better you need at least NVIDIA RTX 3090 24GB.
Maximum context 262,144 tokens · released 2026-03.
VRAM by quantization (8,192-token context)
| Quantization | Memory | Quality |
|---|---|---|
| F16 | 59.9 GiB | Unquantized reference |
| Q8_0 | 33.1 GiB | Near-lossless |
| Q6_K | 26.1 GiB | Very close to F16 |
| Q5_K_M | 23.0 GiB | Great quality/size |
| Q4_K_M | 20.0 GiB | Best default for most |
| IQ4_XS | 17.9 GiB | Smaller 4-bit (imatrix) |
| Q3_K_M | 16.7 GiB | Noticeable loss |
| Q2_K | 14.7 GiB | Last resort; big loss |
Which GPUs and Macs can run Gemma 4 31B?
The best quantization that fits each device, with an estimated single-stream speed. Open a device for the full breakdown.
| Device | Best fit | Est. speed |
|---|---|---|
| NVIDIA RTX 3060 12GBGPU · 12 GiB · 360 GB/s | Q2_K, with CPU offload | — |
| Intel Arc B580 12GBGPU · 12 GiB · 456 GB/s | Q2_K, with CPU offload | — |
| NVIDIA RTX 4070 12GBGPU · 12 GiB · 504 GB/s | Q2_K, with CPU offload | — |
| NVIDIA RTX 5070 12GBGPU · 12 GiB · 672 GB/s | Q2_K, with CPU offload | — |
| CPU only, dual-channel DDR4 (16GB)CPU only · 16 GiB · 45 GB/s | Q2_K, with CPU offload | — |
| Apple M2 (16GB)Mac · 16 GiB · 100 GB/s | Q2_K, with CPU offload | — |
| Apple M4 (16GB)Mac · 16 GiB · 120 GB/s | Q2_K, with CPU offload | — |
| NVIDIA RTX 4060 Ti 16GBGPU · 16 GiB · 288 GB/s | Q2_K (tight) | ~13 tok/s |
| NVIDIA RTX 5060 Ti 16GBGPU · 16 GiB · 448 GB/s | Q2_K (tight) | ~20 tok/s |
| NVIDIA RTX 5070 Ti 16GBGPU · 16 GiB · 896 GB/s | Q2_K (tight) | ~41 tok/s |
| NVIDIA RTX 5080 16GBGPU · 16 GiB · 960 GB/s | Q2_K (tight) | ~43 tok/s |
| Apple M5 (24GB)Mac · 24 GiB · 153 GB/s | Q2_K (fits) | ~7 tok/s |
| NVIDIA RTX 3090 24GBGPU · 24 GiB · 936 GB/s | Q4_K_M (fits) | ~30 tok/s |
| AMD RX 7900 XTX 24GBGPU · 24 GiB · 960 GB/s | IQ4_XS (fits) | ~35 tok/s |
| NVIDIA RTX 4090 24GBGPU · 24 GiB · 1008 GB/s | Q4_K_M (fits) | ~33 tok/s |
| CPU only, dual-channel DDR5 (32GB)CPU only · 32 GiB · 80 GB/s | Q5_K_M (fits) | ~2 tok/s |
| NVIDIA RTX 5090 32GBGPU · 32 GiB · 1792 GB/s | Q6_K (fits) | ~44 tok/s |
| Apple M3 Pro (36GB)Mac · 36 GiB · 150 GB/s | Q5_K_M (fits) | ~4 tok/s |
| Apple M4 Pro (48GB)Mac · 48 GiB · 273 GB/s | Q6_K (fits) | ~7 tok/s |
| Apple M3 Max (64GB)Mac · 64 GiB · 400 GB/s | Q8_0 (fits) | ~8 tok/s |
| NVIDIA RTX PRO 6000 Blackwell 96GBGPU · 96 GiB · 1792 GB/s | F16 (fits) | ~19 tok/s |
| AMD Ryzen AI Max+ 395 (128GB)Unified memory · 128 GiB · 256 GB/s | F16 (fits) | ~3 tok/s |
| NVIDIA DGX Spark (128GB)Unified memory · 128 GiB · 273 GB/s | F16 (fits) | ~3 tok/s |
| Apple M4 Max (128GB)Mac · 128 GiB · 546 GB/s | F16 (fits) | ~6 tok/s |
| Apple M3 Ultra (192GB)Mac · 192 GiB · 819 GB/s | F16 (fits) | ~8 tok/s |
| Apple M3 Ultra (512GB)Mac · 512 GiB · 819 GB/s | F16 (fits) | ~8 tok/s |
Free lessons · no sign-up
Get Gemma 4 31B running, and running fast
- Your first run in ten minutes: install a runtime, download a model, chat with it and call it from code.
- GGUF and the K-quant family: what names like Q4_K_M mean, and which file to download.
- Memory bandwidth: why the speed estimate above is what it is.
Free email course
Why your LLM runs at the speed it does
One short email a day for five days, each built on a free lesson, then the occasional new lesson or offer. Unsubscribe in one click.
Questions
- How much VRAM does Gemma 4 31B need?
- About 20.0 GiB at Q4_K_M, 33.1 GiB at Q8_0 and 59.9 GiB at F16, including a 8,192-token KV cache. The smallest common quant, Q2_K, needs about 14.7 GiB.
- What is the smallest GPU or Mac that runs Gemma 4 31B?
- NVIDIA RTX 4060 Ti 16GB, with Q2_K at roughly 13 tokens/s. For 4-bit or better quality, NVIDIA RTX 3090 24GB.
- Can Gemma 4 31B run on a Mac?
- Yes. The smallest Mac we track that holds it is Apple M5 (24GB), with Q2_K at roughly 7 tokens/s.
- How fast does Gemma 4 31B run?
- Speed depends mostly on memory bandwidth. Among the devices we track, the fastest single-stream estimate is about 44 tokens/s on NVIDIA RTX 5090 32GB with Q6_K. These are bandwidth-based estimates; measure on your own machine.
How this is calculated
Memory is the weights (parameters × bits per weight ÷ 8) plus the KV cache for a 8,192-token context and runtime overhead. Speed is a bandwidth-bound estimate at 65% efficiency; real results vary by runtime, drivers and settings. Learn the maths in VRAM math and memory bandwidth, or set your own context and quant in the VRAM calculator.