Written by Jakub Rusinowski · Last updated June 3, 2026
Yes
Yes — Gemma 4 31B at Q4_K_M needs about 21.3 GB of the 24 GB usable on RTX 4090 Desktop (24 GB VRAM, 64 GB RAM) (~2.7 GB spare), at ~35.5 tok/s (estimated), with room for about 16,384 tokens of context.
Confidence: medium · Recommended quantization: Q4_K_M · Estimated speed: ~35.5 tok/s
| Usable memory for models | 24 GB |
| Memory bandwidth | 1008 GB/s |
| Form factor | Desktop |
| Operating system | Windows or Linux |
| Memory upgradeable | Yes |
| Quant | Memory needed | Fits 24 GB? | Max context | Est. speed | Download |
|---|---|---|---|---|---|
| F16 | 64.6 GB | ✗ No | — | — | 62 GB |
| Q8_0 | 35.5 GB | ✗ No | — | — | 32.9 GB |
| Q6_K | 28 GB | ✗ No | — | — | 25.4 GB |
| Q5_K_M | 24.6 GB | ✗ No | — | — | 22 GB |
| Q4_K_M | 21.3 GB | ✓ Yes | 16K | ~35.5 tok/s | 18.7 GB |
| Q3_K_M | 15.8 GB | ✓ Yes | 32K | ~47.8 tok/s | 13.2 GB |
| Q2_K | 12.8 GB | ✓ Yes | 32K | ~59.1 tok/s | 10.2 GB |
| Variant | Needs at Q4_K_M | Fits? | Est. speed |
|---|---|---|---|
| Gemma 4 31B | 21.3 GB | ✓ Fits | ~35.5 tok/s |
| Gemma 4 26B-A4B | 18.2 GB | ✓ Fits | ~152.2 tok/s |
| Gemma 4 12B (Unified) | 9.4 GB | ✓ Fits | ~78.8 tok/s |
| Gemma 4 E4B | 6.8 GB | ✓ Fits | ~106.5 tok/s |
| Gemma 4 E2B | 4.9 GB | ✓ Fits | ~143.2 tok/s |
Ollama or llama.cpp (CUDA/ROCm) — vLLM if you need concurrent serving
Yes — Gemma 4 31B at Q4_K_M needs about 21.3 GB of the 24 GB usable on RTX 4090 Desktop (24 GB VRAM, 64 GB RAM) (~2.7 GB spare), at ~35.5 tok/s (estimated), with room for about 16,384 tokens of context.
Q4_K_M — it needs about 21.3 GB of the 24 GB available, downloads as roughly 18.7 GB, and runs at an estimated 35.5 tokens/sec with up to 16K of context.
Nothing binding — the model fits with headroom and generates at a usable speed on this hardware.
Ollama or llama.cpp (CUDA/ROCm) — vLLM if you need concurrent serving