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 8BMistral 7B v0.3Ratio
Parameters8.03B 8,030,261,2487.25B 7,248,023,5520.90×
Active per tokenall (dense)all (dense)0.90×
Layers3232same
Hidden size (d)4,0964,096same
Attention32 heads, 8 KV heads × 12832 heads, 8 KV heads × 128
FFNSwiGLU, 14,336SwiGLU, 14,336
Vocabulary128,25632,7680.26×
Tied embeddingsnono
Max context128K32K0.25×
Weights, BF1616.1 GB14.5 GB0.90×
Weights, 4-bit4.0 GB3.6 GB0.90×
KV cache per token (BF16)131.1 KB131.1 KBsame
KV cache at 32K tokens4.3 GB4.3 GBsame
FLOPs per token (4K context)18.2 GFLOPs16.6 GFLOPs0.91×

The full workings: Llama 3.1 8B · Mistral 7B v0.3 · change the models