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
| Precision | Weights | With 8K | With 32K | With 128K |
|---|---|---|---|---|
| 16-bit | 58.2 GB | 60.5 GB | 61.4 GB | 65.1 GB |
| 8-bit | 30.9 GB | 33.2 GB | 34.1 GB | 37.8 GB |
| 6-bit | 23.9 GB | 26.1 GB | 27.0 GB | 30.8 GB |
| 5-bit | 20.7 GB | 22.9 GB | 23.9 GB | 27.6 GB |
| 4-bit | 17.7 GB | 19.9 GB | 20.8 GB | 24.6 GB |
| 3-bit | 14.2 GB | 16.4 GB | 17.4 GB | 21.1 GB |
| 2-bit | 10.9 GB | 13.1 GB | 14.1 GB | 17.8 GB |
| 1.6-bit | 6.0 GB | 8.2 GB | 9.2 GB | 12.9 GB |
One conversation, 16-bit context cache, runtime overhead included.
What runs it
| Machine | Best fit | Context | Speed | First reply |
|---|---|---|---|---|
| RTX 3060 12 GB | Too big | |||
| RTX 4060 Ti 16 GB | Too big | |||
| RTX 3090 | 4-bit | 80K | 33 tok/s | 1.9 s |
| RTX 4090 | 4-bit | 80K | 35 tok/s | 0.8 s |
| RTX 5090 | 6-bit | 112K | 45 tok/s | 0.6 s |
| 2× RTX 3090 | 8-bit | 256K | 19 tok/s | 1.1 s |
| RTX PRO 6000 Blackwell | 8-bit | 256K | 35 tok/s | 0.5 s |
| M4 Max 128 GB | 8-bit | 256K | 10 tok/s | 10 s |
| M5 Max 128 GB | 8-bit | 256K | 11 tok/s | 3.0 s |
| Ryzen AI Max+ 395 128 GB | 8-bit | 256K | 4.6 tok/s | 6.0 s |
| DGX Spark 128 GB | 8-bit | 256K | 5.7 tok/s | 2.1 s |
| M3 Ultra 256 GB | 8-bit | 256K | 15 tok/s | 5.9 s |
| M5 Ultra 512 GB | 8-bit | 256K | 21 tok/s | 1.8 s |
| H100 SXM | 8-bit | 256K | 63 tok/s | 0.4 s |
| DGX Station GB300 | 8-bit | 256K | 118 tok/s | 0.2 s |
| 8× H200 NVL | 8-bit | 256K | 86 tok/s | 0.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.