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 |
| 7.5B | 9.6 | 8.2 | 7.2 | 6.3 | 5.4 |
| 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 |
| 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 |
| 7.5B | 4.2 | 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 |
| 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.
- 5.1Bneeds about 5.0 GB
Smallest: RTX 3060 Laptop 6GB (6 GB), RTX 4050 6GB (6 GB), CMP 170HX (8 GB), M1 8GB (8 GB), and 102 more.
- 7.5Bneeds about 6.3 GB
Smallest: CMP 170HX (8 GB), M1 8GB (8 GB), M2 8GB (8 GB), M3 8GB (8 GB), and 100 more.
- 8Bneeds about 6.6 GB
Smallest: CMP 170HX (8 GB), M1 8GB (8 GB), M2 8GB (8 GB), M3 8GB (8 GB), and 100 more.
- 12Bneeds about 8.9 GB
Smallest: RTX 2080 Ti (11 GB), D700 12GB (12 GB), Intel Arc B580 12GB (12 GB), Intel Arc Pro B70 (12 GB), and 92 more.
- 26B · 4B activeneeds about 17 GB
Smallest: RTX 3080 20GB (20 GB), RX 7900 XT (20 GB), L4 (24 GB), M4 24GB (24 GB), and 62 more.
- 31Bneeds about 20 GB
Smallest: L4 (24 GB), M4 24GB (24 GB), M4 Pro 24GB (24 GB), RTX 3090 (24 GB), and 60 more.
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.