Model comparison
Llama 3.1-8B vs Phi-4
Phi-4 is the stronger model overall, scoring 31.2 to 23.0 on the Noometry Index. Llama 3.1-8B costs 1.5× less per token, which makes it the better buy when Phi-4's lead doesn't matter for your workload.
Last verified . 27 shared benchmarks.
Summary
- They share 27 benchmarks with published results for both. Llama 3.1-8B scores higher in 0 categories and Phi-4 in 9 categories; 8 gaps are clear of the uncertainty.
- The widest gap is in knowledge, where Phi-4 leads 32.6 to 8.0.
- The biggest single-benchmark swing is MATH Level 5: 22.9% for Llama 3.1-8B and 64.9% for Phi-4.
- Llama 3.1-8B is cheaper at $0.05 / $0.08 per million input/output tokens, against $0.07 / $0.14 for Phi-4.
Side by side
| Llama 3.1-8B | Phi-4 | |
|---|---|---|
| Provider | Meta | Microsoft |
| Noometry Index | 23.0 | 31.2 |
| Released | 2024-07-23 | 2024-12-11 |
| Weights | Open | Open |
| Context window | 128K | 128K |
| Max output | 4K | 4K |
| Input $ / M tokens | $0.05 | $0.07 |
| Output $ / M tokens | $0.08 | $0.14 |
| Results tracked | 43 | 37 |
Sponsored placements are available on pages like this one. Advertise on Noometry
Category by category
Coding Phi-4 leads
Llama 3.1-8B: 20.2 (#340), Phi-4: 34.4 (#239)
| Benchmark | Llama 3.1-8B | Phi-4 |
|---|---|---|
| BigCodeBench Instruct | 32.8% | 45.5% |
| LMArena Coding | 1195 | 1231 |
| BigCodeBench Complete | 40.5% | 55.4% |
| SciCode | 13.2% | — |
| WeirdML | 1.7% | — |
| LiveBench Coding | — | 30.7% |
| HumanEval+ | 62.8% | — |
| MBPP+ | 55.6% | — |
Agentic & Tool Use Too close to call
Llama 3.1-8B: 22.5 (#131), Phi-4: 22.8 (#128)
| Benchmark | Llama 3.1-8B | Phi-4 |
|---|---|---|
| Berkeley Function Calling Leaderboard | 25.8% | 28.8% |
| BALROG | 15.1% | 11.6% |
Reasoning Phi-4 leads
Llama 3.1-8B: 14.9 (#321), Phi-4: 17.7 (#291)
| Benchmark | Llama 3.1-8B | Phi-4 |
|---|---|---|
| Chess Puzzles | 0% | 1% |
| LMArena Hard Prompts | 1175 | 1220 |
| Epoch Capabilities Index | 116.57 | 130.42 |
| CritPt | 0% | — |
| LiveBench Reasoning | — | 47.8% |
| DTBench | 50.9% | — |
| LiveBench Data Analysis | — | 45.2% |
| LMCA | 5.4% | — |
| LiveBench | — | 41.6% |
| PIQA | 81.2% | — |
Math Phi-4 leads
Llama 3.1-8B: 10.2 (#317), Phi-4: 20.8 (#285)
| Benchmark | Llama 3.1-8B | Phi-4 |
|---|---|---|
| OTIS Mock AIME 2024-2025 | 1.7% | 13.8% |
| LMArena Math | 1179 | 1246 |
| MATH Level 5 | 22.9% | 64.9% |
| Omni-MATH | 13.7% | — |
| LiveBench Math | — | 42% |
| GSM8K | 82.4% | — |
Knowledge Phi-4 leads
Llama 3.1-8B: 8.0 (#307), Phi-4: 32.6 (#209)
| Benchmark | Llama 3.1-8B | Phi-4 |
|---|---|---|
| GPQA Diamond | 27% | 56.1% |
| LMArena Expert | 1144 | 1203 |
| MMLU | 56.1% | 84.8% |
| MMLU-Pro | 40.6% | — |
| Confabulations | — | 29.4% |
| Vectara Hallucination Rate | — | 3.7% |
| GPQA (HELM) | 24.7% | — |
| BoolQ | 82.8% | — |
Multilingual Phi-4 leads
Llama 3.1-8B: 34.0 (#249), Phi-4: 37.2 (#237)
| Benchmark | Llama 3.1-8B | Phi-4 |
|---|---|---|
| LMArena Non-English | 1148 | 1197 |
| LMArena Chinese | 1151 | 1212 |
| LMArena French | 1177 | 1224 |
| LMArena German | 1144 | 1222 |
| LMArena Japanese | 1061 | 1158 |
| LMArena Korean | 1053 | 1151 |
| LMArena Russian | 1158 | 1209 |
| LMArena Spanish | 1169 | 1234 |
Instruction Following Phi-4 leads
Llama 3.1-8B: 58.9 (#258), Phi-4: 60.4 (#251)
| Benchmark | Llama 3.1-8B | Phi-4 |
|---|---|---|
| LMArena Instruction Following | 1159 | 1201 |
| LiveBench Instruction Following | — | 58.4% |
| IFEval | 74.3% | — |
Long Context Phi-4 leads
Llama 3.1-8B: 35.8 (#238), Phi-4: 36.9 (#226)
| Benchmark | Llama 3.1-8B | Phi-4 |
|---|---|---|
| LMArena Longer Query | 1182 | 1217 |
Writing & Preference Phi-4 leads
Llama 3.1-8B: 29.7 (#290), Phi-4: 40.5 (#244)
| Benchmark | Llama 3.1-8B | Phi-4 |
|---|---|---|
| LMArena Text | 1187 | 1217 |
| LMArena Creative Writing | 1154 | 1182 |
| LMArena Multi-Turn | 1172 | 1206 |
| Short-Story Creative Writing | — | 62.6% |
| EQ-Bench Creative Writing | 713 | — |
| WildBench | 68.7% | — |
| LiveBench Language | — | 25.6% |
Frequently asked questions
Is Llama 3.1-8B better than Phi-4?
Phi-4 is the stronger model overall, scoring 31.2 to 23.0 on the Noometry Index. Llama 3.1-8B costs 1.5× less per token, which makes it the better buy when Phi-4's lead doesn't matter for your workload.
Which is cheaper, Llama 3.1-8B or Phi-4?
Llama 3.1-8B is cheaper. It lists at $0.05 per million input tokens and $0.08 per million output tokens; Phi-4 lists at $0.07 and $0.14.
Is Llama 3.1-8B or Phi-4 better for coding?
Phi-4 scores higher on coding benchmarks: 34.4 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 share?
27 benchmarks have published results for both models. Llama 3.1-8B has 43 scored results on Noometry and Phi-4 has 37.