Model comparison

gemma-2b vs Llama-3.1-8B-Instruct

At Q4_K_M, gemma-2b is the smaller download — 1,495,245,728 bytes against 4,920,739,168. At long context the gap widens: gemma-2b's KV cache at 32K is 7.1× smaller, which usually matters more than the difference in weights.

From the file· summed bytes, KV per layer

Side by side

gemma-2bLlama-3.1-8B-Instruct
Parameters2.5B8.0B
Architecturegemmallama
Layers1832
Native context8,192131,072
Mixture of expertsnono
Quantizations published3845
Smallest quantization0.84 GiB2.02 GiB
Q4_K_M1.39 GiB4.58 GiB
Licencecc-by-nc-4.0llama3.1

KV cache by context

the term that decides long-context viability
Contextgemma-2bLlama-3.1-8B-InstructRatio
4,0960.07 GiB0.50 GiB7.11×
8,1920.14 GiB1.00 GiB7.11×
16,3840.28 GiB2.00 GiB7.11×
32,7680.56 GiB4.00 GiB7.11×
65,5361.13 GiB8.00 GiB7.11×
131,0722.25 GiB16.00 GiB7.11×