Model comparison
Gemma 2 27B vs Llama 3.1-8B
Gemma 2 27B is the stronger model overall, scoring 29.4 to 23.0 on the Noometry Index. Llama 3.1-8B costs 11× less per token, which makes it the better buy when Gemma 2 27B's lead doesn't matter for your workload.
Last verified . 26 shared benchmarks.
Summary
- They share 26 benchmarks with published results for both. Gemma 2 27B scores higher in 8 categories and Llama 3.1-8B in 0 categories; 6 gaps are clear of the uncertainty.
- The widest gap is in writing & preference, where Gemma 2 27B leads 44.2 to 29.7.
- The biggest single-benchmark swing is BigCodeBench Complete: 52.5% for Gemma 2 27B and 40.5% for Llama 3.1-8B.
- Llama 3.1-8B is cheaper at $0.05 / $0.08 per million input/output tokens, against $0.65 / $0.65 for Gemma 2 27B.
- Llama 3.1-8B accepts more context: 128K tokens versus 8K.
Side by side
| Gemma 2 27B | Llama 3.1-8B | |
|---|---|---|
| Provider | Meta | |
| Noometry Index | 29.4 | 23.0 |
| Released | 2024-06-24 | 2024-07-23 |
| Weights | Open | Open |
| Context window | 8K | 128K |
| Max output | 2K | 4K |
| Input $ / M tokens | $0.65 | $0.05 |
| Output $ / M tokens | $0.65 | $0.08 |
| Results tracked | 34 | 43 |
Sponsored placements are available on pages like this one. Advertise on Noometry
Category by category
Coding Gemma 2 27B leads
Gemma 2 27B: 34.1 (#246), Llama 3.1-8B: 20.2 (#340)
| Benchmark | Gemma 2 27B | Llama 3.1-8B |
|---|---|---|
| BigCodeBench Instruct | 42.8% | 32.8% |
| LMArena Coding | 1211 | 1195 |
| BigCodeBench Complete | 52.5% | 40.5% |
| SciCode | — | 13.2% |
| WeirdML | — | 1.7% |
| LiveBench Coding | 36% | — |
| HumanEval+ | — | 62.8% |
| MBPP+ | — | 55.6% |
Agentic & Tool Use Not comparable
Gemma 2 27B: —, Llama 3.1-8B: 22.5 (#131)
| Benchmark | Gemma 2 27B | Llama 3.1-8B |
|---|---|---|
| Berkeley Function Calling Leaderboard | — | 25.8% |
| BALROG | — | 15.1% |
Reasoning Too close to call
Gemma 2 27B: 15.3 (#315), Llama 3.1-8B: 14.9 (#321)
| Benchmark | Gemma 2 27B | Llama 3.1-8B |
|---|---|---|
| LMArena Hard Prompts | 1198 | 1175 |
| DTBench | 48% | 50.9% |
| LMCA | 7.1% | 5.4% |
| Epoch Capabilities Index | 122.08 | 116.57 |
| CritPt | — | 0% |
| Chess Puzzles | — | 0% |
| LiveBench Reasoning | 28.1% | — |
| LiveBench Data Analysis | 47.9% | — |
| LiveBench | 38.2% | — |
| PIQA | — | 81.2% |
Math Too close to call
Gemma 2 27B: 10.7 (#311), Llama 3.1-8B: 10.2 (#317)
| Benchmark | Gemma 2 27B | Llama 3.1-8B |
|---|---|---|
| OTIS Mock AIME 2024-2025 | 1.4% | 1.7% |
| LMArena Math | 1212 | 1179 |
| MATH Level 5 | 27.9% | 22.9% |
| Omni-MATH | — | 13.7% |
| LiveBench Math | 26.5% | — |
| GSM8K | — | 82.4% |
Knowledge Gemma 2 27B leads
Gemma 2 27B: 19.0 (#280), Llama 3.1-8B: 8.0 (#307)
| Benchmark | Gemma 2 27B | Llama 3.1-8B |
|---|---|---|
| GPQA Diamond | 36.5% | 27% |
| LMArena Expert | 1172 | 1144 |
| MMLU | 75.7% | 56.1% |
| MMLU-Pro | — | 40.6% |
| Confabulations | 27.1% | — |
| GPQA (HELM) | — | 24.7% |
| BoolQ | — | 82.8% |
Multilingual Gemma 2 27B leads
Gemma 2 27B: 38.6 (#226), Llama 3.1-8B: 34.0 (#249)
| Benchmark | Gemma 2 27B | Llama 3.1-8B |
|---|---|---|
| LMArena Non-English | 1217 | 1148 |
| LMArena Chinese | 1221 | 1151 |
| LMArena French | 1247 | 1177 |
| LMArena German | 1209 | 1144 |
| LMArena Japanese | 1175 | 1061 |
| LMArena Korean | 1174 | 1053 |
| LMArena Russian | 1234 | 1158 |
| LMArena Spanish | 1228 | 1169 |
Instruction Following Gemma 2 27B leads
Gemma 2 27B: 60.5 (#249), Llama 3.1-8B: 58.9 (#258)
| Benchmark | Gemma 2 27B | Llama 3.1-8B |
|---|---|---|
| LMArena Instruction Following | 1206 | 1159 |
| LiveBench Instruction Following | 58.1% | — |
| IFEval | — | 74.3% |
Long Context Gemma 2 27B leads
Gemma 2 27B: 37.3 (#218), Llama 3.1-8B: 35.8 (#238)
| Benchmark | Gemma 2 27B | Llama 3.1-8B |
|---|---|---|
| LMArena Longer Query | 1231 | 1182 |
Writing & Preference Gemma 2 27B leads
Gemma 2 27B: 44.2 (#225), Llama 3.1-8B: 29.7 (#290)
| Benchmark | Gemma 2 27B | Llama 3.1-8B |
|---|---|---|
| LMArena Text | 1231 | 1187 |
| LMArena Creative Writing | 1241 | 1154 |
| LMArena Multi-Turn | 1224 | 1172 |
| EQ-Bench Creative Writing | — | 713 |
| WildBench | — | 68.7% |
| LiveBench Language | 32.6% | — |
Frequently asked questions
Is Gemma 2 27B better than Llama 3.1-8B?
Gemma 2 27B is the stronger model overall, scoring 29.4 to 23.0 on the Noometry Index. Llama 3.1-8B costs 11× less per token, which makes it the better buy when Gemma 2 27B's lead doesn't matter for your workload.
Which is cheaper, Gemma 2 27B or Llama 3.1-8B?
Llama 3.1-8B is cheaper. It lists at $0.05 per million input tokens and $0.08 per million output tokens; Gemma 2 27B lists at $0.65 and $0.65.
Is Gemma 2 27B or Llama 3.1-8B better for coding?
Gemma 2 27B scores higher on coding benchmarks: 34.1 versus 20.2 in the Noometry coding category.
Which has the bigger context window?
Llama 3.1-8B does, with 128K tokens against 8K.
How many benchmarks do Gemma 2 27B and Llama 3.1-8B share?
26 benchmarks have published results for both models. Gemma 2 27B has 34 scored results on Noometry and Llama 3.1-8B has 43.