gemma-4-31B-it
google/gemma-4-31B-itgemma-4-31B-it at Q4_K_M is exactly 18,323,733,440 bytes (17.07 GiB / 18.32 GB) — an effective 4.687 bits per weight, not the nominal 4. Its KV cache at 32K is 6.17 GiB, not the 30.00 GiB a flat formula predicts.
Shipped quantizations
| Quant | Size● | Exact bytes● | Effective bpw● | Tensors● | Publisher |
|---|---|---|---|---|---|
| UD-IQ2_XXS | 7.95 GiB | 8,534,295,488 | 2.183 | — | unsloth |
| IQ1_M | 9.42 GiB | 10,112,172,384 | 2.587 | — | bartowski |
| UD-IQ2_M | 10.01 GiB | 10,752,820,160 | 2.751 | — | unsloth |
| IQ2_XXS | 10.09 GiB | 10,830,190,944 | 2.771 | — | bartowski |
| IQ2_XS | 10.71 GiB | 11,500,943,712 | 2.942 | — | bartowski |
| UD-IQ3_XXS | 11.02 GiB | 11,837,782,976 | 3.028 | — | unsloth |
| IQ2_S | 11.25 GiB | 12,075,358,560 | 3.089 | — | bartowski |
| Q2_K | 11.76 GiB | 12,631,624,032 | 3.231 | — | bartowski |
| IQ2_M | 11.78 GiB | 12,649,773,408 | 3.236 | — | bartowski |
| Q2_K_L | 12.08 GiB | 12,972,935,520 | 3.319 | — | bartowski |
| IQ3_XXS | 12.09 GiB | 12,981,709,152 | 3.321 | — | bartowski |
| Q3_K_S | 12.30 GiB | 13,210,856,384 | 3.380 | — | unsloth |
| IQ3_XS | 12.89 GiB | 13,841,353,056 | 3.541 | — | bartowski |
| Q3_K_S | 13.34 GiB | 14,329,063,776 | 3.666 | — | bartowski |
| Q3_K_M | 13.72 GiB | 14,736,608,192 | 3.770 | 833 | unsloth |
| IQ3_M | 14.09 GiB | 15,129,829,728 | 3.870 | — | bartowski |
| Q3_K_M | 14.24 GiB | 15,287,102,912 | 3.911 | — | angelwind |
| Q3_K_M | 14.24 GiB | 15,287,102,912 | 3.911 | — | douyamv |
| Q3_K_M | 14.24 GiB | 15,287,102,912 | 3.911 | — | jie1888 |
| Q3_K_M | 14.82 GiB | 15,918,123,360 | 4.072 | — | bartowski |
| IQ4_XS | 15.25 GiB | 16,372,460,480 | 4.188 | 833 | unsloth |
| Q3_K_L | 15.66 GiB | 16,810,625,376 | 4.300 | — | bartowski |
| IQ4_XS | 15.98 GiB | 17,155,893,600 | 4.389 | 833 | bartowski |
| IQ4_NL | 16.10 GiB | 17,287,670,720 | 4.422 | — | unsloth |
| Q4_0 | 16.15 GiB | 17,338,248,128 | 4.435 | 833 | unsloth |
| Q4_K_S | 16.20 GiB | 17,399,835,584 | 4.451 | — | unsloth |
| IQ4_NL | 16.79 GiB | 18,025,687,392 | 4.611 | — | bartowski |
| Q4_K_S | 16.95 GiB | 18,195,655,008 | 4.655 | — | bartowski |
| Q4_K_M | 17.07 GiB | 18,323,733,440 | 4.687 | — | unsloth |
| Q4_02 shards | 17.16 GiB | 18,425,426,784 | 4.713 | — | bartowski |
| Q4_K_M | 17.40 GiB | 18,687,057,344 | 4.780 | — | douyamv |
| Q4_K_M | 17.40 GiB | 18,687,057,344 | 4.780 | — | jie1888 |
| Q4_K_M | 17.40 GiB | 18,687,057,344 | 4.780 | — | angelwind |
| Q4_K_M | 17.40 GiB | 18,687,063,904 | 4.780 | 833 | lmstudio-community |
| Q4_1 | 17.81 GiB | 19,118,091,200 | 4.891 | — | unsloth |
| Q4_K_M | 18.25 GiB | 19,598,489,952 | 5.013 | 833 | bartowski |
| Q4_1 | 18.41 GiB | 19,765,274,976 | 5.056 | — | bartowski |
| Q4_K_L | 18.57 GiB | 19,939,801,440 | 5.101 | — | bartowski |
| Q5_K_S | 19.67 GiB | 21,124,672,448 | 5.404 | — | unsloth |
| Q5_K_S | 20.03 GiB | 21,504,862,560 | 5.501 | — | bartowski |
KV cache by context
| Context | KV cache (f16)● | Flat formula | Overstated by | Full / windowed / recurrent |
|---|---|---|---|---|
| 4,096 | 1.80 GiB | 3.75 GiB | 2.09× | 10 / 50 / 0 |
| 8,192 | 2.42 GiB | 7.50 GiB | 3.10× | 10 / 50 / 0 |
| 16,384 | 3.67 GiB | 15.00 GiB | 4.09× | 10 / 50 / 0 |
| 32,768 | 6.17 GiB | 30.00 GiB | 4.86× | 10 / 50 / 0 |
| 65,536 | 11.17 GiB | 60.00 GiB | 5.37× | 10 / 50 / 0 |
| 131,072 | 21.17 GiB | 120.00 GiB | 5.67× | 10 / 50 / 0 |
50 of 60 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 16.38 GiB. The real file is 17.07 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 30.00 GiB at 32K context where the real figure is 6.17 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-31B-it need?
- Q4_K_M is exactly 18,323,733,440 bytes (17.07 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-31B-it's KV cache?
- 6.17 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-31B-it 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.