Model comparison
Gemma 3 4B vs Llama 3.1-8B
Gemma 3 4B is the stronger model overall, scoring 28.1 to 23.0 on the Noometry Index.
Last verified . 20 shared benchmarks.
Summary
- They share 20 benchmarks with published results for both. Gemma 3 4B scores higher in 7 categories and Llama 3.1-8B in 2 categories; 9 gaps are clear of the uncertainty.
- The widest gap is in coding, where Gemma 3 4B leads 35.9 to 20.2.
- The biggest single-benchmark swing is Berkeley Function Calling Leaderboard: 19.6% for Gemma 3 4B and 25.8% for Llama 3.1-8B.
- Gemma 3 4B is cheaper at $0.04 / $0.08 per million input/output tokens, against $0.05 / $0.08 for Llama 3.1-8B.
- Gemma 3 4B accepts more context: 131K tokens versus 128K.
Side by side
| Gemma 3 4B | Llama 3.1-8B | |
|---|---|---|
| Provider | Meta | |
| Noometry Index | 28.1 | 23.0 |
| Released | 2025-03-12 | 2024-07-23 |
| Weights | Open | Open |
| Context window | 131K | 128K |
| Max output | 4K | 4K |
| Input $ / M tokens | $0.04 | $0.05 |
| Output $ / M tokens | $0.08 | $0.08 |
| Results tracked | 22 | 43 |
Sponsored placements are available on pages like this one. Advertise on Noometry
Category by category
Coding Gemma 3 4B leads
Gemma 3 4B: 35.9 (#215), Llama 3.1-8B: 20.2 (#340)
| Benchmark | Gemma 3 4B | Llama 3.1-8B |
|---|---|---|
| LMArena Coding | 1230 | 1195 |
| SciCode | — | 13.2% |
| WeirdML | — | 1.7% |
| BigCodeBench Instruct | — | 32.8% |
| BigCodeBench Complete | — | 40.5% |
| HumanEval+ | — | 62.8% |
| MBPP+ | — | 55.6% |
Agentic & Tool Use Llama 3.1-8B leads
Gemma 3 4B: 20.9 (#142), Llama 3.1-8B: 22.5 (#131)
| Benchmark | Gemma 3 4B | Llama 3.1-8B |
|---|---|---|
| Berkeley Function Calling Leaderboard | 19.6% | 25.8% |
| BALROG | — | 15.1% |
Reasoning Llama 3.1-8B leads
Gemma 3 4B: 13.2 (#335), Llama 3.1-8B: 14.9 (#321)
| Benchmark | Gemma 3 4B | Llama 3.1-8B |
|---|---|---|
| Chess Puzzles | 0% | 0% |
| LMArena Hard Prompts | 1253 | 1175 |
| DTBench | 50.9% | 50.9% |
| LMCA | 2.8% | 5.4% |
| Epoch Capabilities Index | 116.02 | 116.57 |
| Kagi LLM Benchmark | 25.2% | — |
| CritPt | — | 0% |
| PIQA | — | 81.2% |
Math Gemma 3 4B leads
Gemma 3 4B: 16.8 (#292), Llama 3.1-8B: 10.2 (#317)
| Benchmark | Gemma 3 4B | Llama 3.1-8B |
|---|---|---|
| OTIS Mock AIME 2024-2025 | 7.5% | 1.7% |
| LMArena Math | 1239 | 1179 |
| Omni-MATH | — | 13.7% |
| MATH Level 5 | — | 22.9% |
| GSM8K | — | 82.4% |
Knowledge Gemma 3 4B leads
Gemma 3 4B: 11.8 (#299), Llama 3.1-8B: 8.0 (#307)
| Benchmark | Gemma 3 4B | Llama 3.1-8B |
|---|---|---|
| GPQA Diamond | 23.2% | 27% |
| LMArena Expert | 1223 | 1144 |
| MMLU-Pro | — | 40.6% |
| Vectara Hallucination Rate | 6.4% | — |
| GPQA (HELM) | — | 24.7% |
| BoolQ | — | 82.8% |
| MMLU | — | 56.1% |
Multilingual Gemma 3 4B leads
Gemma 3 4B: 42.5 (#194), Llama 3.1-8B: 34.0 (#249)
| Benchmark | Gemma 3 4B | Llama 3.1-8B |
|---|---|---|
| LMArena Non-English | 1273 | 1148 |
| LMArena German | 1281 | 1144 |
| LMArena Russian | 1294 | 1158 |
| LMArena Chinese | — | 1151 |
| LMArena French | — | 1177 |
| LMArena Japanese | — | 1061 |
| LMArena Korean | — | 1053 |
| LMArena Spanish | — | 1169 |
Instruction Following Gemma 3 4B leads
Gemma 3 4B: 65.2 (#225), Llama 3.1-8B: 58.9 (#258)
| Benchmark | Gemma 3 4B | Llama 3.1-8B |
|---|---|---|
| LMArena Instruction Following | 1239 | 1159 |
| IFEval | — | 74.3% |
Long Context Gemma 3 4B leads
Gemma 3 4B: 38.7 (#194), Llama 3.1-8B: 35.8 (#238)
| Benchmark | Gemma 3 4B | Llama 3.1-8B |
|---|---|---|
| LMArena Longer Query | 1273 | 1182 |
Writing & Preference Gemma 3 4B leads
Gemma 3 4B: 42.0 (#239), Llama 3.1-8B: 29.7 (#290)
| Benchmark | Gemma 3 4B | Llama 3.1-8B |
|---|---|---|
| LMArena Text | 1291 | 1187 |
| LMArena Creative Writing | 1271 | 1154 |
| EQ-Bench Creative Writing | 1068 | 713 |
| LMArena Multi-Turn | 1255 | 1172 |
| WildBench | — | 68.7% |
Frequently asked questions
Is Gemma 3 4B better than Llama 3.1-8B?
Gemma 3 4B is the stronger model overall, scoring 28.1 to 23.0 on the Noometry Index.
Which is cheaper, Gemma 3 4B or Llama 3.1-8B?
Gemma 3 4B is cheaper. It lists at $0.04 per million input tokens and $0.08 per million output tokens; Llama 3.1-8B lists at $0.05 and $0.08.
Is Gemma 3 4B or Llama 3.1-8B better for coding?
Gemma 3 4B scores higher on coding benchmarks: 35.9 versus 20.2 in the Noometry coding category.
Which has the bigger context window?
Gemma 3 4B does, with 131K tokens against 128K.
How many benchmarks do Gemma 3 4B and Llama 3.1-8B share?
20 benchmarks have published results for both models. Gemma 3 4B has 22 scored results on Noometry and Llama 3.1-8B has 43.