Gemma 4 VRAM requirements
Memory needed to run Gemma 4 at every published size and quant, with an 8k context. Each figure is weights plus KV cache plus runtime buffers, from the same memory model as the VRAM calculator.
Total memory by size and quant
GB at an 8k context. Bold is the Q4_K_M column, the usual starting point.
| Size | Q8_0 | Q6_K | Q5_K_M | Q4_K_M | Q3_K_M |
|---|---|---|---|---|---|
| 5.1B | 7.2 | 6.2 | 5.6 | 5.0 | 4.3 |
| 8B | 10 | 8.6 | 7.6 | 6.6 | 5.6 |
| 12B | 14 | 12 | 10 | 8.9 | 7.4 |
| 26B · 4B active | 28 | 23 | 20 | 17 | 14 |
| 26B | 28 | 23 | 20 | 17 | 14 |
| 31B | 33 | 28 | 24 | 20 | 16 |
KV cache by context length
GB the context alone adds on top of the weights. Add this to a weights figure to size a longer session.
| Size | Weights at Q4_K_M | 4k ctx | 16k ctx | 32k ctx | 128k ctx |
|---|---|---|---|---|---|
| 5.1B | 2.9 | 0.2 | 0.5 | 0.9 | 3.3 |
| 8B | 4.5 | 0.2 | 0.5 | 0.9 | 3.3 |
| 12B | 6.8 | 0.3 | 0.6 | 1.1 | 3.9 |
| 26B · 4B active | 15 | 0.4 | 1.0 | 1.7 | 6.1 |
| 26B | 15 | 0.4 | 1.0 | 1.7 | 6.1 |
| 31B | 17 | 0.4 | 1.0 | 1.7 | 6.1 |
What each size fits on at Q4_K_M
Hardware whose memory holds the model with headroom, smallest pool first. Fits means under 85% of the pool at an 8k context. A Mac's pool is what macOS lets the GPU use - two thirds of its memory up to 32 GB, three quarters from 36 GB - not the whole of it.
- 5.1Bneeds about 5.0 GB
Smallest: AMD FirePro D700 6GB (6 GB), NVIDIA RTX 3050 6GB (6 GB), NVIDIA RTX 3060 Laptop 6GB (6 GB), NVIDIA RTX 4050 6GB (6 GB), and 131 more.
On a Mac: 16 GB or more, with macOS's default GPU limit.
- 8Bneeds about 6.6 GB
Smallest: AMD Radeon Pro W6600 (8 GB), AMD RX 480 8GB (8 GB), AMD RX 5700 XT 8GB (8 GB), AMD RX 6600 (8 GB), and 127 more.
On a Mac: 16 GB or more, with macOS's default GPU limit.
- 12Bneeds about 8.9 GB
Smallest: NVIDIA GTX 1080 Ti (11 GB), NVIDIA RTX 2080 Ti (11 GB), AMD RX 6700 XT (12 GB), AMD RX 6750 XT (12 GB), and 103 more.
On a Mac: 16 GB or more, with macOS's default GPU limit.
- 26B · 4B activeneeds about 17 GB
Smallest: AMD RX 7900 XT (20 GB), NVIDIA RTX 3080 20GB (20 GB), NVIDIA RTX 4000 Ada (20 GB), NVIDIA RTX 2080 Ti 22GB (modded) (22 GB), and 60 more.
On a Mac: 32 GB or more, with macOS's default GPU limit.
- 26Bneeds about 17 GB
Smallest: AMD RX 7900 XT (20 GB), NVIDIA RTX 3080 20GB (20 GB), NVIDIA RTX 4000 Ada (20 GB), NVIDIA RTX 2080 Ti 22GB (modded) (22 GB), and 60 more.
On a Mac: 32 GB or more, with macOS's default GPU limit.
- 31Bneeds about 20 GB
Smallest: AMD RX 7900 XTX (24 GB), Intel Arc Pro B60 24GB (24 GB), NVIDIA A10G (24 GB), NVIDIA A30 (24 GB), and 56 more.
On a Mac: 36 GB or more, with macOS's default GPU limit.
Frequently asked
How much VRAM does Gemma 4 need?
From about 5.0 GB for the 5.1B model to about 20 GB for the 31B model, at Q4_K_M with an 8k context and including the KV cache and runtime buffers. Q8 needs more and Q3 less; the table above lists every size and rung.
Can I run Gemma 4 on a 16GB GPU?
Yes. The 12B model needs about 8.9 GB at Q4_K_M with an 8k context, which fits a 16 GB card with headroom. Larger sizes need a smaller quant or a bigger card.
Can I run Gemma 4 on a 24GB GPU such as an RTX 3090 or 4090?
Yes. The 31B model needs about 20 GB at Q4_K_M with an 8k context, which fits a 24 GB card with headroom.
How are these numbers calculated?
Weights at the quant's bits per weight, plus a KV cache sized from the model's attention design for the chosen context, plus compute buffers and a fixed runtime allowance. It is the same memory model the VRAM calculator uses. A family whose attention profile is not on file is sized as plain grouped-query attention, which errs towards needing more memory.