Compare
OLMo 2 7B vs Llama 3.1 8B
Llama 3.1 8B has 8.03B parameters, 1.1 times the 7.3B of OLMo 2 7B. In BF16 the weights take 14.6 GB and 16.1 GB. OLMo 2 7B needs 4.0 times as much KV cache per token (524.3 KB against 131.1 KB): MHA against GQA.
| OLMo 2 7B | Llama 3.1 8B | Ratio | |
|---|---|---|---|
| Parameters | 7.3B 7,298,617,344 | 8.03B 8,030,261,248 | 1.10× |
| Active per token | all (dense) | all (dense) | 1.10× |
| Layers | 32 | 32 | same |
| Hidden size (d) | 4,096 | 4,096 | same |
| Attention | 32 heads, 32 KV heads × 128 | 32 heads, 8 KV heads × 128 | |
| FFN | SwiGLU, 11,008 | SwiGLU, 14,336 | |
| Vocabulary | 100,352 | 128,256 | 1.28× |
| Tied embeddings | no | no | |
| Max context | 4K | 128K | 32.00× |
| Weights, BF16 | 14.6 GB | 16.1 GB | 1.10× |
| Weights, 4-bit | 3.6 GB | 4.0 GB | 1.10× |
| KV cache per token (BF16) | 524.3 KB | 131.1 KB | 0.25× |
| KV cache at 32K tokens | – (max 4K) | 4.3 GB | 2.00× |
| FLOPs per token (4K context) | 16.7 GFLOPs | 18.2 GFLOPs | 1.09× |
The full workings: OLMo 2 7B · Llama 3.1 8B · change the models