Compare

Llama 3.1 8B vs Qwen3 8B

Qwen3 8B has 8.19B parameters and Llama 3.1 8B 8.03B, about the same. In BF16 the weights take 16.1 GB and 16.4 GB.

Llama 3.1 8BQwen3 8BRatio
Parameters8.03B 8,030,261,2488.19B 8,190,735,3601.02×
Active per tokenall (dense)all (dense)1.02×
Layers32361.13×
Hidden size (d)4,0964,096same
Attention32 heads, 8 KV heads × 12832 heads, 8 KV heads × 128
FFNSwiGLU, 14,336SwiGLU, 12,288
Vocabulary128,256151,9361.18×
Tied embeddingsnono
Max context128K40K0.31×
Weights, BF1616.1 GB16.4 GB1.02×
Weights, 4-bit4.0 GB4.1 GB1.02×
KV cache per token (BF16)131.1 KB147.5 KB1.13×
KV cache at 32K tokens4.3 GB4.8 GB1.13×
FLOPs per token (4K context)18.2 GFLOPs18.8 GFLOPs1.03×

The full workings: Llama 3.1 8B · Qwen3 8B · change the models