Compare

Llama 3.2 1B vs SmolLM2 1.7B

SmolLM2 1.7B has 1.71B parameters, 1.4 times the 1.24B of Llama 3.2 1B. In BF16 the weights take 2.5 GB and 3.4 GB. SmolLM2 1.7B needs 6.0 times as much KV cache per token (196.6 KB against 32.8 KB): MHA against GQA.

Llama 3.2 1BSmolLM2 1.7BRatio
Parameters1.24B 1,235,814,4001.71B 1,711,376,3841.38×
Active per tokenall (dense)all (dense)1.38×
Layers16241.50×
Hidden size (d)2,0482,048same
Attention32 heads, 8 KV heads × 6432 heads, 32 KV heads × 64
FFNSwiGLU, 8,192SwiGLU, 8,192
Vocabulary128,25649,1520.38×
Tied embeddingsyesyes
Max context128K8K0.06×
Weights, BF162.5 GB3.4 GB1.38×
Weights, 4-bit618 MB856 MB1.38×
KV cache per token (BF16)32.8 KB196.6 KB6.00×
KV cache at 32K tokens1.1 GB– (max 8K)1.50×
FLOPs per token (4K context)3.0 GFLOPs4.2 GFLOPs1.41×

The full workings: Llama 3.2 1B · SmolLM2 1.7B · change the models