Model comparison

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

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

CodeLlama-7b-hfgemma-4-12B-it-qat-q4_0-unquantized
Parameters6.7B12.0B
Architecturellamagemma4
Layers3248
Native context16,384262,144
Mixture of expertsnono
Quantizations published122
Smallest quantization2.63 GiB6.50 GiB
Q4_K_M3.80 GiB
Licencellama2apache-2.0

KV cache by context

the term that decides long-context viability
ContextCodeLlama-7b-hfgemma-4-12B-it-qat-q4_0-unquantizedRatio
4,0962.00 GiB0.72 GiB2.78×
8,1924.00 GiB0.97 GiB4.13×
16,3848.00 GiB1.47 GiB5.45×
32,76816.00 GiB2.47 GiB6.48×
65,53632.00 GiB4.47 GiB7.16×
131,07264.00 GiB8.47 GiB7.56×