Model comparison

medgemma-4b-it vs gemma-4-E2B-it

At Q4_K_M, medgemma-4b-it is the smaller download — 2,489,893,664 bytes against 3,106,738,272. At long context the gap widens: gemma-4-E2B-it's KV cache at 32K is 3.2× smaller, which usually matters more than the difference in weights.

From the file· summed bytes, KV per layer

Side by side

medgemma-4b-itgemma-4-E2B-it
Parameters4.3B5.1B
Architecturegemma3gemma4
Layers3435
Native context131,072131,072
Mixture of expertsnono
Quantizations published4654
Smallest quantization1.10 GiB2.13 GiB
Q4_K_M2.32 GiB2.89 GiB
Licenceotherapache-2.0

KV cache by context

the term that decides long-context viability
Contextmedgemma-4b-itgemma-4-E2B-itRatio
4,0960.25 GiB0.05 GiB4.54×
8,1920.33 GiB0.08 GiB3.98×
16,3840.48 GiB0.14 GiB3.53×
32,7680.79 GiB0.25 GiB3.23×
65,5361.42 GiB0.46 GiB3.05×
131,0722.67 GiB0.90 GiB2.96×