Compare
Llama 3.2 1B vs SmolLM2 1.7B
SmolLM2 1.7B has 1.71B parameters, 1.4 times the 1.24B of Llama 3.2 1B. In BF16 the weights take 2.5 GB and 3.4 GB. SmolLM2 1.7B needs 6.0 times as much KV cache per token (196.6 KB against 32.8 KB): MHA against GQA.
| Llama 3.2 1B | SmolLM2 1.7B | Ratio | |
|---|---|---|---|
| Parameters | 1.24B 1,235,814,400 | 1.71B 1,711,376,384 | 1.38× |
| Active per token | all (dense) | all (dense) | 1.38× |
| Layers | 16 | 24 | 1.50× |
| Hidden size (d) | 2,048 | 2,048 | same |
| Attention | 32 heads, 8 KV heads × 64 | 32 heads, 32 KV heads × 64 | |
| FFN | SwiGLU, 8,192 | SwiGLU, 8,192 | |
| Vocabulary | 128,256 | 49,152 | 0.38× |
| Tied embeddings | yes | yes | |
| Max context | 128K | 8K | 0.06× |
| Weights, BF16 | 2.5 GB | 3.4 GB | 1.38× |
| Weights, 4-bit | 618 MB | 856 MB | 1.38× |
| KV cache per token (BF16) | 32.8 KB | 196.6 KB | 6.00× |
| KV cache at 32K tokens | 1.1 GB | – (max 8K) | 1.50× |
| FLOPs per token (4K context) | 3.0 GFLOPs | 4.2 GFLOPs | 1.41× |
The full workings: Llama 3.2 1B · SmolLM2 1.7B · change the models