gemma-4-12B
google/gemma-4-12Bgemma-4-12B at Q4_K_M is exactly 7,740,990,944 bytes (7.21 GiB / 7.74 GB) — an effective 5.178 bits per weight, not the nominal 4. Its KV cache at 32K is 2.47 GiB, not the 12.00 GiB a flat formula predicts.
Shipped quantizations
| Quant | Size● | Exact bytes● | Effective bpw● | Tensors● | Publisher |
|---|---|---|---|---|---|
| IQ1_S | 2.72 GiB | 2,924,755,424 | 1.956 | — | Mungert |
| IQ1_M | 3.14 GiB | 3,372,361,184 | 2.256 | — | Mungert |
| IQ2_XXS | 3.38 GiB | 3,631,146,464 | 2.429 | — | Mungert |
| IQ2_XS | 3.68 GiB | 3,955,795,424 | 2.646 | — | Mungert |
| IQ2_S | 3.93 GiB | 4,222,445,024 | 2.824 | — | Mungert |
| IQ2_M | 4.16 GiB | 4,462,122,464 | 2.985 | — | Mungert |
| Q2_K_S | 4.38 GiB | 4,706,285,024 | 3.148 | — | Mungert |
| Q2_K_M | 4.57 GiB | 4,903,998,944 | 3.280 | — | Mungert |
| IQ3_XXS | 4.67 GiB | 5,013,853,664 | 3.354 | — | Mungert |
| IQ3_XS | 4.91 GiB | 5,272,393,184 | 3.527 | — | Mungert |
| IQ3_M | 5.41 GiB | 5,812,327,904 | 3.888 | — | Mungert |
| Q3_K_S | 5.66 GiB | 6,074,553,824 | 4.063 | — | Mungert |
| Q3_K_M | 5.87 GiB | 6,302,250,464 | 4.216 | — | Mungert |
| IQ4_XS | 6.18 GiB | 6,635,255,264 | 4.438 | — | Mungert |
| IQ4_NL | 6.26 GiB | 6,716,356,064 | 4.493 | — | Mungert |
| Q4_0 | 6.72 GiB | 7,219,672,544 | 4.829 | — | Mungert |
| Q4_K_S | 6.78 GiB | 7,275,705,824 | 4.867 | — | Mungert |
| Q4_1 | 7.01 GiB | 7,523,431,904 | 5.032 | — | Mungert |
| Q4_K_M | 7.21 GiB | 7,740,990,944 | 5.178 | — | Mungert |
| Q5_0 | 7.99 GiB | 8,582,165,984 | 5.741 | — | Mungert |
| Q5_K_M | 8.37 GiB | 8,988,468,704 | 6.013 | — | Mungert |
| Q5_1 | 8.63 GiB | 9,263,412,704 | 6.196 | — | Mungert |
| Q6_K | 9.11 GiB | 9,786,003,360 | 6.546 | — | sneedjak |
| Q6_K_M | 9.34 GiB | 10,029,815,264 | 6.709 | — | Mungert |
| Q8_0 | 11.80 GiB | 12,669,628,032 | 8.475 | — | ggml-org |
| Q8_0 | 11.80 GiB | 12,669,646,016 | 8.475 | — | Mungert |
| BF16 | 22.20 GiB | 23,832,047,232 | 15.941 | — | ggml-org |
| BF16 | 22.20 GiB | 23,832,065,216 | 15.941 | — | Mungert |
KV cache by context
| Context | KV cache (f16)● | Flat formula | Overstated by | Full / windowed / recurrent |
|---|---|---|---|---|
| 4,096 | 0.72 GiB | 1.50 GiB | 2.09× | 8 / 40 / 0 |
| 8,192 | 0.97 GiB | 3.00 GiB | 3.10× | 8 / 40 / 0 |
| 16,384 | 1.47 GiB | 6.00 GiB | 4.09× | 8 / 40 / 0 |
| 32,768 | 2.47 GiB | 12.00 GiB | 4.86× | 8 / 40 / 0 |
| 65,536 | 4.47 GiB | 24.00 GiB | 5.37× | 8 / 40 / 0 |
| 131,072 | 8.47 GiB | 48.00 GiB | 5.67× | 8 / 40 / 0 |
40 of 48 layers cache only a 1,024-token window rather than the full context, on a period of . Figures assume the default configuration; --swa-full disables the saving entirely.
Compare with
Will it run on your card?
Why other calculators give a different number
A parameters × bits ÷ 8 estimate puts Q4_K_M at roughly 6.27 GiB. The real file is 7.21 GiB, because a quantization is a mixture and some tensors are always kept at higher precision. The larger discrepancy is the cache: a flat formula gives 12.00 GiB at 32K context where the real figure is 2.47 GiB, because most of this model's layers cache a fixed window rather than the whole context.
Architecture
Questions people ask
- How much VRAM does gemma-4-12B need?
- Q4_K_M is exactly 7,740,990,944 bytes (7.21 GiB) in weights. Add the KV cache, which depends on your context length, plus roughly half a gigabyte of runtime overhead.
- How large is gemma-4-12B's KV cache?
- 2.47 GiB at 32K context with an f16 cache, computed per layer. Quantizing the cache to q8_0 roughly halves it, which is often the difference between a context length fitting and not.
- Which quantization of gemma-4-12B should I use?
- Q4_K_M is the usual default. Pick the largest quantization that fits your card at the context you actually need — the table above gives exact sizes for every one published.