How Much VRAM Does Gemma 4 31B Need to Run Locally?
See devices that run itGemma 4 31B is a dense model with 31.3B parameters. At Q4 it needs at least 26GB of VRAM, and 32GB is the comfortable amount for an 8K context. The cheapest device that holds it is the Arc Pro B65, with no used-price data yet, at roughly 12.6 tokens/s.
Gemma 4 31B details
VRAM needed for Gemma 4 31B by quantization and context
Total at 8K| Quantization | WeightsGB | Total at 8KGB | Total at 32KGB | Total at 128KGB |
|---|---|---|---|---|
| Q4_K_M | 18.3GGUF | 25.9 | 48.4 | 138.4 |
| Q5_K_M | 21.7GGUF | 29.6 | 52.1 | 142.1 |
| Q8_0 | 32.6GGUF | 40.9 | 63.4 | 153.4 |
| FP16 | 61.4GGUF | 69.7 | 92.2 | 182.2 |
Total = weights + KV cache (FP16) + 1GB runtime overhead. Weights marked GGUF are measured file sizes from the repository; the rest are estimated from bytes per parameter. Contexts beyond this model's 256K limit show a dash.
Which GPUs can run Gemma 4 31B?
Q4_K_M · 8K context · sorted by eBay used price| Device | VRAMGB | Used price | Est. t/s | Suggested context |
|---|---|---|---|---|
| 32 | —No listings | 12.6 | 8K | |
| 32 | —No listings | 12.6 | 8K | |
| 32 | —No listings | 23.4 | 8K | |
| 32 | —No listings | 55.6 | 8K | |
| 32 | —No listings | 55.6 | 8K | |
| 32 | —No listings | 27.8 | 8K | |
| 32 | —No listings | 14.7 | 8K | |
| 32 | —No listings | 13.2 | 8K | |
| 32 | —No listings | 28.4 | 8K | |
| 40 | —No listings | 48.5 | 8K | |
| 48 | —No listings | 31.9 | 8K | |
| 48 | —No listings | 19.7 | 8K | |
| 48 | —No listings | 42.1 | 8K | |
| 64 | —No listings | 36.9 | 32K | |
| 72 | —No listings | 42.1 | 32K | |
| Mac Studio M4 Max 128GB | 128 | —No listings | 13.8 | 32K |
| Mac Studio M3 Ultra 256GB | 256 | —No listings | 20.5 | 128K |
| Mac Studio M3 Ultra 512GB | 512 | —No listings | 20.5 | 128K |
Fits when weights + KV cache + runtime overhead is at or below usable memory, single card. "Offload" on MoE models means it runs with expert weights in system RAM (only attention layers and KV cache stay in VRAM); that speed assumes 70 GB/s RAM bandwidth. The context column is the largest tier that fits.
Run Gemma 4 31B with Ollama, llama.cpp or vLLM
The Ollama library has no official tag for it yet.
llama.cpp pulls the GGUF straight from Hugging Face; -c sets the context length.
llama-server -hf unsloth/gemma-4-31B-it-GGUF:Q4_K_M -c 8192
vLLM serves the original-precision weights, which needs far more memory than GGUF and usually more than one GPU.
vllm serve google/gemma-4-31B-it
File names follow that week's model-library snapshot; the definitions are in the methodology. Methodology
FAQ
How much VRAM does Gemma 4 31B need?
At Q4_K_M with an 8K context Gemma 4 31B needs about 26GB of VRAM; 32GB leaves comfortable headroom.
What is the cheapest GPU that runs Gemma 4 31B?
The Arc Pro B65: 32GB of VRAM at roughly 12.6 tokens/s. We have no used-price data for it yet.
Can you run Gemma 4 31B with Ollama?
Not yet: the Ollama library has no official tag for it. You can load the GGUF with llama.cpp instead.