Compare
Llama 3.1 8B vs Mistral 7B v0.3
Llama 3.1 8B has 8.03B parameters, 1.1 times the 7.25B of Mistral 7B v0.3. In BF16 the weights take 16.1 GB and 14.5 GB.
| Llama 3.1 8B | Mistral 7B v0.3 | Ratio | |
|---|---|---|---|
| Parameters | 8.03B 8,030,261,248 | 7.25B 7,248,023,552 | 0.90× |
| Active per token | all (dense) | all (dense) | 0.90× |
| Layers | 32 | 32 | same |
| Hidden size (d) | 4,096 | 4,096 | same |
| Attention | 32 heads, 8 KV heads × 128 | 32 heads, 8 KV heads × 128 | |
| FFN | SwiGLU, 14,336 | SwiGLU, 14,336 | |
| Vocabulary | 128,256 | 32,768 | 0.26× |
| Tied embeddings | no | no | |
| Max context | 128K | 32K | 0.25× |
| Weights, BF16 | 16.1 GB | 14.5 GB | 0.90× |
| Weights, 4-bit | 4.0 GB | 3.6 GB | 0.90× |
| KV cache per token (BF16) | 131.1 KB | 131.1 KB | same |
| KV cache at 32K tokens | 4.3 GB | 4.3 GB | same |
| FLOPs per token (4K context) | 18.2 GFLOPs | 16.6 GFLOPs | 0.91× |
The full workings: Llama 3.1 8B · Mistral 7B v0.3 · change the models