About Gemma 4 31B
Gemma 4 31B is Google's 31B-parameter model released in April 2026, with a 256K-token context window. It uses a hybrid-attention design — only a fraction of its layers cache the full context, so long conversations cost far less VRAM than a classic dense model: its KV cache is about 2.2 GB at an 8K context, 22.3 GB at 128K, and 43.8 GB at the full 256K window (FP16 cache).
For most people Q4_K_M is the sweet spot — the most popular quality/size trade-off — while Q8 is near-lossless if you have the memory. Totals above include the KV cache and a realistic framework overhead, so they are what you should expect to see in practice rather than just the download size. Weight sizes are calibrated against real GGUF files — see themethodology.
Frequently asked questions
How much VRAM does Gemma 4 31B need?
At Q4_K_M with an 8K context, Gemma 4 31B needs about 24 GB (weights 19 GB + KV cache + overhead). The smallest common hardware that fits is a RTX 5090.
Can an RTX 4090 (24GB) run Gemma 4 31B?
Not fully in VRAM. Gemma 4 31B needs about 24 GB even at Q4_K_M, so a 24 GB card would have to offload layers to system RAM at a large speed penalty.
Can a Mac run Gemma 4 31B?
Yes — Apple Silicon with 36 GB of unified memory or more (macOS lets the GPU use ~75% of it, ~27 GB) runs Gemma 4 31B at Q4_K_M.
Related
VRAM calculator for any model ·Token counter
Last updated 2026-08-03. Architecture figures from the model's published config.json; see themethodology.