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 7BLlama 3.1 8BRatio
Parameters7.3B 7,298,617,3448.03B 8,030,261,2481.10×
Active per tokenall (dense)all (dense)1.10×
Layers3232same
Hidden size (d)4,0964,096same
Attention32 heads, 32 KV heads × 12832 heads, 8 KV heads × 128
FFNSwiGLU, 11,008SwiGLU, 14,336
Vocabulary100,352128,2561.28×
Tied embeddingsnono
Max context4K128K32.00×
Weights, BF1614.6 GB16.1 GB1.10×
Weights, 4-bit3.6 GB4.0 GB1.10×
KV cache per token (BF16)524.3 KB131.1 KB0.25×
KV cache at 32K tokens– (max 4K)4.3 GB2.00×
FLOPs per token (4K context)16.7 GFLOPs18.2 GFLOPs1.09×

The full workings: OLMo 2 7B · Llama 3.1 8B · change the models