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.

Gemma 2 27B Google

29.4

Rank #312 Confirmed

Llama 3.1-8B Meta

23.0

Rank #352 Confirmed

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 and Llama 3.1-8B specifications
Gemma 2 27BLlama 3.1-8B
ProviderGoogleMeta
Noometry Index29.423.0
Released2024-06-242024-07-23
WeightsOpenOpen
Context window8K128K
Max output2K4K
Input $ / M tokens$0.65$0.05
Output $ / M tokens$0.65$0.08
Results tracked3443

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)

Coding benchmarks
BenchmarkGemma 2 27BLlama 3.1-8B
BigCodeBench Instruct42.8%32.8%
LMArena Coding12111195
BigCodeBench Complete52.5%40.5%
SciCode—13.2%
WeirdML—1.7%
LiveBench Coding36%—
HumanEval+—62.8%
MBPP+—55.6%

Agentic & Tool Use Not comparable

Gemma 2 27B: —, Llama 3.1-8B: 22.5 (#131)

Agentic & Tool Use benchmarks
BenchmarkGemma 2 27BLlama 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)

Reasoning benchmarks
BenchmarkGemma 2 27BLlama 3.1-8B
LMArena Hard Prompts11981175
DTBench48%50.9%
LMCA7.1%5.4%
Epoch Capabilities Index122.08116.57
CritPt—0%
Chess Puzzles—0%
LiveBench Reasoning28.1%—
LiveBench Data Analysis47.9%—
LiveBench38.2%—
PIQA—81.2%

Math Too close to call

Gemma 2 27B: 10.7 (#311), Llama 3.1-8B: 10.2 (#317)

Math benchmarks
BenchmarkGemma 2 27BLlama 3.1-8B
OTIS Mock AIME 2024-20251.4%1.7%
LMArena Math12121179
MATH Level 527.9%22.9%
Omni-MATH—13.7%
LiveBench Math26.5%—
GSM8K—82.4%

Knowledge Gemma 2 27B leads

Gemma 2 27B: 19.0 (#280), Llama 3.1-8B: 8.0 (#307)

Knowledge benchmarks
BenchmarkGemma 2 27BLlama 3.1-8B
GPQA Diamond36.5%27%
LMArena Expert11721144
MMLU75.7%56.1%
MMLU-Pro—40.6%
Confabulations27.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)

Multilingual benchmarks
BenchmarkGemma 2 27BLlama 3.1-8B
LMArena Non-English12171148
LMArena Chinese12211151
LMArena French12471177
LMArena German12091144
LMArena Japanese11751061
LMArena Korean11741053
LMArena Russian12341158
LMArena Spanish12281169

Instruction Following Gemma 2 27B leads

Gemma 2 27B: 60.5 (#249), Llama 3.1-8B: 58.9 (#258)

Instruction Following benchmarks
BenchmarkGemma 2 27BLlama 3.1-8B
LMArena Instruction Following12061159
LiveBench Instruction Following58.1%—
IFEval—74.3%

Long Context Gemma 2 27B leads

Gemma 2 27B: 37.3 (#218), Llama 3.1-8B: 35.8 (#238)

Long Context benchmarks
BenchmarkGemma 2 27BLlama 3.1-8B
LMArena Longer Query12311182

Writing & Preference Gemma 2 27B leads

Gemma 2 27B: 44.2 (#225), Llama 3.1-8B: 29.7 (#290)

Writing & Preference benchmarks
BenchmarkGemma 2 27BLlama 3.1-8B
LMArena Text12311187
LMArena Creative Writing12411154
LMArena Multi-Turn12241172
EQ-Bench Creative Writing—713
WildBench—68.7%
LiveBench Language32.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.

Related comparisons

Go deeper