Compare
Gemma 4 31B vs Gemma 3 27B
Gemma 4 31B has 30.7B parameters, 1.1 times the 27B of Gemma 3 27B. In BF16 the weights take 61.4 GB and 54.0 GB. Gemma 4 31B needs 1.8 times as much KV cache per token (901.1 KB against 507.9 KB): GQA against GQA.
| Gemma 4 31B | Gemma 3 27B | Ratio | |
|---|---|---|---|
| Parameters | 30.7B 30,697,345,340 | 27B 27,009,346,304 | 0.88× |
| Active per token | all (dense) | all (dense) | 0.88× |
| Layers | 60 | 62 | 1.03× |
| Hidden size (d) | 5,376 | 5,376 | same |
| Attention | 32 heads, 4 KV heads × 512 | 32 heads, 16 KV heads × 128 | |
| FFN | GeGLU, 21,504 | GeGLU, 21,504 | |
| Vocabulary | 262,144 | 262,208 | same |
| Tied embeddings | yes | yes | |
| Max context | 256K | 128K | 0.50× |
| Weights, BF16 | 61.4 GB | 54.0 GB | 0.88× |
| Weights, 4-bit | 15.3 GB | 13.5 GB | 0.88× |
| KV cache per token (BF16) | 901.1 KB | 507.9 KB | 0.56× |
| KV cache at 32K tokens | 29.5 GB | 16.6 GB | 0.56× |
| FLOPs per token (4K context) | 65.8 GFLOPs | 55.6 GFLOPs | 0.84× |
The full workings: Gemma 4 31B · Gemma 3 27B · change the models