Skip to content

How much VRAM does Gemma 4 31B need?

Gemma 4 31B needs 17.7 GB for its weights at 4-bit, 19.9 GB with an 8K context and 20.8 GB with 32K. At 8-bit, 33.2 GB.

Parameters
31.3B
Longest context
256K
Released
Mar 2026
License
Apache 2.0
Strongest at
Chat, Coding, Agents, Docs

Memory at each precision

Memory Gemma 4 31B needs at each precision and context length
PrecisionWeightsWith 8KWith 32KWith 128K
16-bit58.2 GB60.5 GB61.4 GB65.1 GB
8-bit30.9 GB33.2 GB34.1 GB37.8 GB
6-bit23.9 GB26.1 GB27.0 GB30.8 GB
5-bit20.7 GB22.9 GB23.9 GB27.6 GB
4-bit17.7 GB19.9 GB20.8 GB24.6 GB
3-bit14.2 GB16.4 GB17.4 GB21.1 GB
2-bit10.9 GB13.1 GB14.1 GB17.8 GB
1.6-bit6.0 GB8.2 GB9.2 GB12.9 GB

One conversation, 16-bit context cache, runtime overhead included.

What runs it

The best way Gemma 4 31B runs on common GPUs, Macs and AI boxes
MachineBest fitContextSpeedFirst reply
RTX 3060 12 GBToo big
RTX 4060 Ti 16 GBToo big
RTX 30904-bit80K33 tok/s1.9 s
RTX 40904-bit80K35 tok/s0.8 s
RTX 50906-bit112K45 tok/s0.6 s
2× RTX 30908-bit256K19 tok/s1.1 s
RTX PRO 6000 Blackwell8-bit256K35 tok/s0.5 s
M4 Max 128 GB8-bit256K10 tok/s10 s
M5 Max 128 GB8-bit256K11 tok/s3.0 s
Ryzen AI Max+ 395 128 GB8-bit256K4.6 tok/s6.0 s
DGX Spark 128 GB8-bit256K5.7 tok/s2.1 s
M3 Ultra 256 GB8-bit256K15 tok/s5.9 s
M5 Ultra 512 GB8-bit256K21 tok/s1.8 s
H100 SXM8-bit256K63 tok/s0.4 s
DGX Station GB3008-bit256K118 tok/s0.2 s
8× H200 NVL8-bit256K86 tok/s0.1 s

Best fit is the highest quality, up to 8-bit, that leaves 16K of context. First reply is the wait for a 2K prompt. Speeds are rough, plus or minus 25%.

How to run it

Ollama
ollama run gemma4:31b
llama.cpp
llama-server -hf unsloth/gemma-4-31B-it-GGUF
vLLM
vllm serve google/gemma-4-31B-it
MLX (Mac)
mlx_lm.chat --model mlx-community/gemma-4-31b-it-4bit

Questions

How much VRAM does Gemma 4 31B need?

Gemma 4 31B needs 17.7 GB for its weights at 4-bit, 19.9 GB with an 8K context and 20.8 GB with 32K. At 8-bit, 33.2 GB.

Can Gemma 4 31B run on an RTX 4090?

Yes. At 4-bit it holds 80K of context and writes about 35 tokens a second.

More models