Model comparison
Llama 3.1-8B vs Phi-4 Mini
Phi-4 Mini is the stronger model overall, scoring 30.9 to 23.0 on the Noometry Index. Llama 3.1-8B costs 2.3× less per token, which makes it the better buy when Phi-4 Mini's lead doesn't matter for your workload.
Last verified . 2 shared benchmarks.
Summary
- They share 2 benchmarks with published results for both. Llama 3.1-8B scores higher in 0 categories and Phi-4 Mini in 3 categories; 3 gaps are clear of the uncertainty.
- The widest gap is in knowledge, where Phi-4 Mini leads 25.3 to 8.0.
- Llama 3.1-8B is cheaper at $0.05 / $0.08 per million input/output tokens, against $0.075 / $0.30 for Phi-4 Mini.
Side by side
| Llama 3.1-8B | Phi-4 Mini | |
|---|---|---|
| Provider | Meta | Microsoft |
| Noometry Index | 23.0 | 30.9 |
| Released | 2024-07-23 | 2024-12-11 |
| Weights | Open | Open |
| Context window | 128K | 128K |
| Max output | 4K | 4K |
| Input $ / M tokens | $0.05 | $0.075 |
| Output $ / M tokens | $0.08 | $0.30 |
| Results tracked | 43 | 3 |
Sponsored placements are available on pages like this one. Advertise on Noometry
Category by category
Coding Phi-4 Mini leads
Llama 3.1-8B: 20.2 (#340), Phi-4 Mini: 28.1 (#317)
| Benchmark | Llama 3.1-8B | Phi-4 Mini |
|---|---|---|
| SciCode | 13.2% | 10.8% |
| WeirdML | 1.7% | — |
| BigCodeBench Instruct | 32.8% | — |
| LMArena Coding | 1195 | — |
| BigCodeBench Complete | 40.5% | — |
| HumanEval+ | 62.8% | — |
| MBPP+ | 55.6% | — |
Agentic & Tool Use Not comparable
Llama 3.1-8B: 22.5 (#131), Phi-4 Mini: —
| Benchmark | Llama 3.1-8B | Phi-4 Mini |
|---|---|---|
| Berkeley Function Calling Leaderboard | 25.8% | — |
| BALROG | 15.1% | — |
Reasoning Phi-4 Mini leads
Llama 3.1-8B: 14.9 (#321), Phi-4 Mini: 22.4 (#195)
| Benchmark | Llama 3.1-8B | Phi-4 Mini |
|---|---|---|
| CritPt | 0% | 0% |
| Chess Puzzles | 0% | — |
| LMArena Hard Prompts | 1175 | — |
| DTBench | 50.9% | — |
| LMCA | 5.4% | — |
| Epoch Capabilities Index | 116.57 | — |
| PIQA | 81.2% | — |
Math Not comparable
Llama 3.1-8B: 10.2 (#317), Phi-4 Mini: —
| Benchmark | Llama 3.1-8B | Phi-4 Mini |
|---|---|---|
| OTIS Mock AIME 2024-2025 | 1.7% | — |
| Omni-MATH | 13.7% | — |
| LMArena Math | 1179 | — |
| MATH Level 5 | 22.9% | — |
| GSM8K | 82.4% | — |
Knowledge Phi-4 Mini leads
Llama 3.1-8B: 8.0 (#307), Phi-4 Mini: 25.3 (#262)
| Benchmark | Llama 3.1-8B | Phi-4 Mini |
|---|---|---|
| GPQA Diamond | 27% | — |
| MMLU-Pro | 40.6% | — |
| Vectara Hallucination Rate | — | 23.5% |
| GPQA (HELM) | 24.7% | — |
| LMArena Expert | 1144 | — |
| BoolQ | 82.8% | — |
| MMLU | 56.1% | — |
Multilingual Not comparable
Llama 3.1-8B: 34.0 (#249), Phi-4 Mini: —
| Benchmark | Llama 3.1-8B | Phi-4 Mini |
|---|---|---|
| LMArena Non-English | 1148 | — |
| LMArena Chinese | 1151 | — |
| LMArena French | 1177 | — |
| LMArena German | 1144 | — |
| LMArena Japanese | 1061 | — |
| LMArena Korean | 1053 | — |
| LMArena Russian | 1158 | — |
| LMArena Spanish | 1169 | — |
Instruction Following Not comparable
Llama 3.1-8B: 58.9 (#258), Phi-4 Mini: —
| Benchmark | Llama 3.1-8B | Phi-4 Mini |
|---|---|---|
| IFEval | 74.3% | — |
| LMArena Instruction Following | 1159 | — |
Long Context Not comparable
Llama 3.1-8B: 35.8 (#238), Phi-4 Mini: —
| Benchmark | Llama 3.1-8B | Phi-4 Mini |
|---|---|---|
| LMArena Longer Query | 1182 | — |
Writing & Preference Not comparable
Llama 3.1-8B: 29.7 (#290), Phi-4 Mini: —
| Benchmark | Llama 3.1-8B | Phi-4 Mini |
|---|---|---|
| LMArena Text | 1187 | — |
| LMArena Creative Writing | 1154 | — |
| EQ-Bench Creative Writing | 713 | — |
| WildBench | 68.7% | — |
| LMArena Multi-Turn | 1172 | — |
Frequently asked questions
Is Llama 3.1-8B better than Phi-4 Mini?
Phi-4 Mini is the stronger model overall, scoring 30.9 to 23.0 on the Noometry Index. Llama 3.1-8B costs 2.3× less per token, which makes it the better buy when Phi-4 Mini's lead doesn't matter for your workload.
Which is cheaper, Llama 3.1-8B or Phi-4 Mini?
Llama 3.1-8B is cheaper. It lists at $0.05 per million input tokens and $0.08 per million output tokens; Phi-4 Mini lists at $0.075 and $0.30.
Is Llama 3.1-8B or Phi-4 Mini better for coding?
Phi-4 Mini scores higher on coding benchmarks: 28.1 versus 20.2 in the Noometry coding category.
Which has the bigger context window?
Both accept 128K tokens.
How many benchmarks do Llama 3.1-8B and Phi-4 Mini share?
2 benchmarks have published results for both models. Llama 3.1-8B has 43 scored results on Noometry and Phi-4 Mini has 3.