Gemma 3 4B vs Phi 4
Wins 2 of 5 areas
Long documents · Following instructions
Wins 2 of 5 areas
Coding · Facts
The two are evenly matched.Gemma 3 4B is better at long documents and following instructions; Phi 4 at facts and coding.
Scores updated · 26 tests both models report · How we compare
Where each one wins
Tests won in each of the five areas where both have results. Each piece is one test, so a longer bar means more evidence; grey means the two scored within a point of each other.
- FactsGetting facts right instead of making them up03Phi 43 of 3 tests
- CodingWriting and fixing software02Phi 42 of 2 tests
- Long documentsFinding answers in very long texts10Gemma 3 4B1 of 1 test
- Following instructionsDoing exactly what it is asked10Gemma 3 4B1 of 1 test
- ReasoningHard problems that need careful thinking11Even1 each · 1 tie
Long documents and following instructions rest on a single test each.
What it costs
Prices per million tokens, roughly 750,000 words. The bars show the cost of a million tokens read plus a million written.
Gemma 3 4B costs 76% less for the same work.
The biggest differences
The tests each model wins by the widest margin, up to three each. Scores are out of 100.
Where Phi 4 pulls ahead
- Graduate-level biology, physics and chemistry questionsGPQA Diamond+28.4points ahead
- Code for real scientific research problemsSciCode+18.7points ahead
- Avoids making up answers it doesn't knowAA-Omniscience · Non-hallucination+17points ahead
Where Gemma 3 4B pulls ahead
- Follows unfamiliar, precisely checkable instructionsIFBench+4.8points ahead
- Very hard expert questions across many subjectsHumanity's Last Exam+1.5points ahead
Every test, side by side
All 26 tests both models report. The winning score is in its model's colour; marks a score checked independently.
ReasoningEven
- GPQA DiamondPhi 4 by 28.429.157.5+28.4
- Humanity's Last ExamGemma 3 4B by 1.55.33.8+1.5
- CritPttie00tie
FactsPhi 4
- AA-Omniscience · Non-hallucinationPhi 4 by 171.818.8+17
- AA-Omniscience · AccuracyPhi 4 by 6.47.714.1+6.4
- Vectara HHEM hallucination ratelower is betterPhi 4 by 2.76.43.7+2.7
Following instructionsGemma 3 4B
- IFBenchGemma 3 4B by 4.828.323.5+4.8
Other results16 tests, not counted
Tests outside the eight areas. They are not counted above: several are summary scores built from other tests, or the same test under another name.
- Arena HardPhi 4 by 43.631.875.4+43.6
- AA-OmnisciencePhi 4 by 27.2-82.9-55.7+27.2
- IFEvalGemma 3 4B by 27.290.263+27.2
- MMLU-ProPhi 4 by 26.843.670.4+26.8
- MMLUPhi 4 by 26.458.484.8+26.4
- HumanEval+Phi 4 by 2062.882.8+20
- vectara_answer_ratePhi 4 by 13.467.380.7+13.4
- HumanEvalPhi 4 by 11.371.382.6+11.3
- Artificial Analysis Coding IndexPhi 4 by 8.52.711.2+8.5
- MGSMGemma 3 4B by 6.787.380.6+6.7
- τ²-Bench Telecom (AA run)Gemma 3 4B by 550+5
- vectara_avg_summary_lengthPhi 4 by 43.5 rating points77.4120.9+43.5 rating
- vectara_factual_consistencyPhi 4 by 2.793.696.3+2.7
- AA Agentic IndexGemma 3 4B by 1.71.70+1.7
- AA IntelligencePhi 4 by 1.14.85.9+1.1
- SimpleQAGemma 3 4B by 143+1
Questions people ask
Which is better, Gemma 3 4B or Phi 4?
Gemma 3 4B and Phi 4 each win two of the five areas where both have results. Gemma 3 4B wins long documents and following instructions; Phi 4 wins coding and facts. Gemma 3 4B costs 76% less. They are level on reasoning.
Which is better for coding?
Phi 4. It wins 2 of the 2 coding tests both models report; Gemma 3 4B wins none.
Which is cheaper?
Gemma 3 4B costs $0.05 per million input tokens and $0.10 per million output tokens; Phi 4 costs $0.13 and $0.50. That makes Gemma 3 4B about 76% cheaper for the same work.
How do you compare the two?
We use the 26 benchmark tests both models have published scores on. The verdict counts the 10 tests in the eight capability areas, and a gap under one point (ten on rating-style scales) counts as a tie. The other 16 are listed but not counted, because several are summary scores or repeat a test. Each score is the one shown on the model's own page.