Model comparison

Phi-3.5-mini-instruct vs Llama-3.1-8B-Instruct

These two publish different quantization sets; the table below has the exact sizes. At long context the gap widens: Llama-3.1-8B-Instruct's KV cache at 32K is 3.0× smaller, which usually matters more than the difference in weights.

From the file· summed bytes, KV per layer

Side by side

Phi-3.5-mini-instructLlama-3.1-8B-Instruct
Parameters3.8B8.0B
Architecturellamallama
Layers3232
Native context131,072131,072
Mixture of expertsnono
Quantizations published2445
Smallest quantization0.82 GiB2.02 GiB
Q4_K_M4.58 GiB
Licencemitllama3.1

KV cache by context

the term that decides long-context viability
ContextPhi-3.5-mini-instructLlama-3.1-8B-InstructRatio
4,0961.50 GiB0.50 GiB3.00×
8,1923.00 GiB1.00 GiB3.00×
16,3846.00 GiB2.00 GiB3.00×
32,76812.00 GiB4.00 GiB3.00×
65,53624.00 GiB8.00 GiB3.00×
131,07248.00 GiB16.00 GiB3.00×
Phi-3.5-mini-instruct vs Llama-3.1-8B-Instruct — size, memory and hardware fit — ossmodeldb