Model comparison
CodeLlama-7b-instruct-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-instruct-hf | gemma-4-12B-it-qat-q4_0-unquantized | |
|---|---|---|
| Parameters | 6.7B | 12.0B |
| Architecture | llama | gemma4 |
| Layers | 32 | 48 |
| Native context | 16,384 | 262,144 |
| Mixture of experts | no | no |
| Quantizations published | 12 | 2 |
| Smallest quantization | 2.63 GiB | 6.50 GiB |
| Q4_K_M | 3.80 GiB | — |
| Licence | llama2 | apache-2.0 |
KV cache by context
the term that decides long-context viability
| Context | CodeLlama-7b-instruct-hf | gemma-4-12B-it-qat-q4_0-unquantized | Ratio |
|---|---|---|---|
| 4,096 | 2.00 GiB | 0.72 GiB | 2.78× |
| 8,192 | 4.00 GiB | 0.97 GiB | 4.13× |
| 16,384 | 8.00 GiB | 1.47 GiB | 5.45× |
| 32,768 | 16.00 GiB | 2.47 GiB | 6.48× |
| 65,536 | 32.00 GiB | 4.47 GiB | 7.16× |
| 131,072 | 64.00 GiB | 8.47 GiB | 7.56× |