google · text

gemma-4-31B-it-qat-q4_0-unquantized-assistant

google/gemma-4-31B-it-qat-q4_0-unquantized-assistant

gemma-4-31B-it-qat-q4_0-unquantized-assistant at Q4_K_M is exactly 353,485,920 bytes (0.33 GiB / 0.35 GB) — an effective 6.023 bits per weight, not the nominal 4. Its KV cache at 32K is 0.57 GiB, not the 2.00 GiB a flat formula predicts.

From the file· summed from 1 file(s)From the file· KV per layer
Parameters
470M
Architecture
gemma4-assistant
4 layers
Context
262,144
native (config.json)
License
apache-2.0

Shipped quantizations

exact bytes, summed from published files
QuantSizeExact bytesEffective bpwTensorsPublisher
Q2_K0.29 GiB309,704,7045.277mradermacher
Q3_K_S0.30 GiB322,457,6005.494mradermacher
Q3_K_M0.31 GiB332,484,6085.665mradermacher
Q3_K_L0.32 GiB341,921,7925.826mradermacher
IQ4_XS0.32 GiB342,878,2085.842mradermacher
Q4_K_S0.33 GiB349,161,4725.949mradermacher
Q4_K_M0.33 GiB353,485,9206.023Gaboo
Q4_K_M0.33 GiB357,812,2246.097mradermacher
Q5_K_M0.35 GiB376,521,8246.415Gaboo
Q6_K0.37 GiB400,997,4726.832Gaboo
Q8_00.48 GiB514,704,4808.770Gaboo
BF160.89 GiB954,860,64016.270Gaboo
BF160.89 GiB954,860,89616.270RachidAR

KV cache by context

computed per layer — this model uses sliding-window attention
ContextKV cache (f16)Flat formulaOverstated byFull / windowed / recurrent
4,0960.13 GiB0.25 GiB1.88×1 / 3 / 0
8,1920.20 GiB0.50 GiB2.56×1 / 3 / 0
16,3840.32 GiB1.00 GiB3.12×1 / 3 / 0
32,7680.57 GiB2.00 GiB3.51×1 / 3 / 0
65,5361.07 GiB4.00 GiB3.74×1 / 3 / 0
131,0722.07 GiB8.00 GiB3.86×1 / 3 / 0

3 of 4 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

same modality, comparable size

Will it run on your card?

full quant x context sweep

Why other calculators give a different number

A parameters × bits ÷ 8 estimate puts Q4_K_M at roughly 0.25 GiB. The real file is 0.33 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 2.00 GiB at 32K context where the real figure is 0.57 GiB, because most of this model's layers cache a fixed window rather than the whole context.

Architecture

from config.json
Layers
4
Attention heads
32
KV heads
16
Head dim
256
Hidden size
1024
Vocab
262,144
Sliding window
1024
SWA period
MLA
no
Experts
Experts per token
use_sliding_window

Questions people ask

How much VRAM does gemma-4-31B-it-qat-q4_0-unquantized-assistant need?
Q4_K_M is exactly 353,485,920 bytes (0.33 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-qat-q4_0-unquantized-assistant's KV cache?
0.57 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-qat-q4_0-unquantized-assistant 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.