Model comparison

gemma-4-12B-it-qat-q4_0-unquantized vs Llama-2-7b-hf

These two publish different quantization sets; the table below has the exact sizes. At long context the gap widens: gemma-4-12B-it-qat-q4_0-unquantized's KV cache at 32K is 6.5× smaller, which usually matters more than the difference in weights.

From the file· summed bytes, KV per layer

Side by side

gemma-4-12B-it-qat-q4_0-unquantizedLlama-2-7b-hf
Parameters12.0B6.7B
Architecturegemma4llama
Layers4832
Native context262,1444,096
Mixture of expertsnono
Quantizations published212
Smallest quantization6.50 GiB2.63 GiB
Q4_K_M3.80 GiB
Licenceapache-2.0llama2

KV cache by context

the term that decides long-context viability
Contextgemma-4-12B-it-qat-q4_0-unquantizedLlama-2-7b-hfRatio
4,0960.72 GiB2.00 GiB2.78×
8,1920.97 GiB4.00 GiB4.13×
16,3841.47 GiB8.00 GiB5.45×
32,7682.47 GiB16.00 GiB6.48×
65,5364.47 GiB32.00 GiB7.16×
131,0728.47 GiB64.00 GiB7.56×