Model comparison

Llama 2-7B vs Phi-4

Phi-4 is the stronger model overall, scoring 30.9 to 28.6 on the Noometry Index.

Last verified . 18 shared benchmarks.

Llama 2-7B Meta

28.6

Rank #315 Confirmed

Phi-4 Microsoft

30.9

Rank #269 Confirmed

Summary

  • They share 18 benchmarks with published results for both. Llama 2-7B scores higher in 1 category and Phi-4 in 7 categories; 8 gaps are clear of the uncertainty.
  • The widest gap is in multilingual, where Phi-4 leads 37.4 to 23.9.

Side by side

Llama 2-7B and Phi-4 specifications
Llama 2-7BPhi-4
ProviderMetaMicrosoft
Noometry Index28.630.9
Released2023-07-182024-12-11
WeightsOpenOpen
Context window—128K
Max output—4K
Input $ / M tokens—$0.07
Output $ / M tokens—$0.14
Results tracked2937

Sponsored placements are available on pages like this one. Advertise on Noometry

Category by category

Coding Phi-4 leads

Llama 2-7B: 28.7 (#302), Phi-4: 33.8 (#237)

Coding benchmarks
BenchmarkLlama 2-7BPhi-4
LMArena Coding10021231
BigCodeBench Instruct—45.5%
LiveBench Coding—30.7%
BigCodeBench Complete—55.4%

Agentic & Tool Use Not comparable

Llama 2-7B: —, Phi-4: 22.6 (#120)

Agentic & Tool Use benchmarks
BenchmarkLlama 2-7BPhi-4
Berkeley Function Calling Leaderboard—28.8%
BALROG—11.6%

Reasoning Phi-4 leads

Llama 2-7B: 15.1 (#309), Phi-4: 17.0 (#287)

Reasoning benchmarks
BenchmarkLlama 2-7BPhi-4
Chess Puzzles0%1%
LMArena Hard Prompts10091220
Epoch Capabilities Index98.54130.43
LiveBench Reasoning—47.8%
LiveBench Data Analysis—45.2%
BIG-Bench Hard39.2%—
HellaSwag77.2%—
LAMBADA73.3%—
LiveBench—41.6%
PIQA78.8%—
WinoGrande69.2%—

Math Llama 2-7B leads

Llama 2-7B: 28.2 (#231), Phi-4: 19.6 (#279)

Math benchmarks
BenchmarkLlama 2-7BPhi-4
LMArena Math10421246
OTIS Mock AIME 2024-2025—13.8%
LiveBench Math—42%
MATH Level 5—64.9%
GSM8K16.7%—

Knowledge Phi-4 leads

Llama 2-7B: 27.7 (#243), Phi-4: 32.5 (#204)

Knowledge benchmarks
BenchmarkLlama 2-7BPhi-4
LMArena Expert10361203
MMLU45.8%84.8%
GPQA Diamond—56.1%
Confabulations—29.4%
Vectara Hallucination Rate—3.7%
ARC (AI2) Challenge45.9%—
BoolQ77.9%—
OpenBookQA58.6%—
TriviaQA73.7%—

Multimodal Not comparable

Llama 2-7B: —, Phi-4: —

Multimodal benchmarks
BenchmarkLlama 2-7BPhi-4
ScienceQA43.1%—

Multilingual Phi-4 leads

Llama 2-7B: 23.9 (#288), Phi-4: 37.4 (#232)

Multilingual benchmarks
BenchmarkLlama 2-7BPhi-4
LMArena Non-English9731197
LMArena Chinese9731211
LMArena French9691223
LMArena German9781222
LMArena Russian9951209
LMArena Spanish10071234
LMArena Japanese—1158
LMArena Korean—1151

Instruction Following Phi-4 leads

Llama 2-7B: 51.0 (#293), Phi-4: 60.6 (#246)

Instruction Following benchmarks
BenchmarkLlama 2-7BPhi-4
LMArena Instruction Following10061201
LiveBench Instruction Following—58.4%

Long Context Phi-4 leads

Llama 2-7B: 30.4 (#282), Phi-4: 36.9 (#221)

Long Context benchmarks
BenchmarkLlama 2-7BPhi-4
LMArena Longer Query9991217

Writing & Preference Phi-4 leads

Llama 2-7B: 28.1 (#293), Phi-4: 40.7 (#239)

Writing & Preference benchmarks
BenchmarkLlama 2-7BPhi-4
LMArena Text10531217
LMArena Creative Writing10331182
LMArena Multi-Turn10291206
Short-Story Creative Writing—62.6%
LiveBench Language—25.6%

Frequently asked questions

Is Llama 2-7B better than Phi-4?

Phi-4 is the stronger model overall, scoring 30.9 to 28.6 on the Noometry Index.

Is Llama 2-7B or Phi-4 better for coding?

Phi-4 scores higher on coding benchmarks: 33.8 versus 28.7 in the Noometry coding category.

How many benchmarks do Llama 2-7B and Phi-4 share?

18 benchmarks have published results for both models. Llama 2-7B has 29 scored results on Noometry and Phi-4 has 37.

Related comparisons

Go deeper