google · text

gemma-4-31B-it-assistant

google/gemma-4-31B-it-assistant

gemma-4-31B-it-assistant at Q4_K_M is exactly 353,468,640 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

Shipped quantizations

exact bytes, summed from published files
QuantSizeExact bytesEffective bpwTensorsPublisher
Q2_K0.29 GiB309,686,4965.277NotMe404
Q3_K_S0.30 GiB322,439,3925.494NotMe404
Q3_K0.31 GiB332,466,4005.665NotMe404
Q3_K_M0.31 GiB332,466,4005.665NotMe404
Q3_K_L0.32 GiB341,903,5845.826NotMe404
Q4_K_S0.33 GiB349,143,2645.949AtomicChat
Q4_K_S0.33 GiB349,143,2645.949NotMe404
Q4_K_M0.33 GiB353,468,6406.023AtomicChat
Q4_K_M0.33 GiB357,794,0166.096NotMe404
Q4_K0.33 GiB357,794,0166.096NotMe404
Q5_K_S0.35 GiB374,276,3206.377NotMe404
Q5_K_M0.35 GiB376,504,5446.415AtomicChat
Q5_K_M0.35 GiB378,732,7686.453NotMe404
Q5_K0.35 GiB378,732,7686.453NotMe404
Q6_K0.37 GiB400,980,1926.832NotMe404
Q8_00.48 GiB514,687,2008.770AtomicChat
Q8_00.48 GiB514,687,2008.770NotMe404
Q8_00.48 GiB514,702,4968.770Radamanthys11
F160.89 GiB954,843,36016.269NotMe404
F160.89 GiB954,843,36016.269AtomicChat
F160.89 GiB954,858,65616.270Radamanthys11

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-assistant need?
Q4_K_M is exactly 353,468,640 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-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-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.