Enter opens the highlighted result. Esc closes.

Gemma 2 27B vs Llama 3.1 8B Instruct

Llama 3.1 8B Instruct costs 8.1x less per output token than Gemma 2 27B ($0.08 vs $0.65 per million). Updated October 21, 2026; 34 benchmarks have a result for both.

Gemma 2 27BGoogle
Coding
No data
Overall
No data
Output $/M
$0.65
32
Llama 3.1 8B InstructMeta Llama
Coding
No data
Overall
17.9
Output $/M
$0.08
2
vs boards won of 34 shared

Gemma 2 27B or Llama 3.1 8B Instruct: which to pick

Neither model has a coding score yet, so the two cannot be ranked on coding.

Pick Gemma 2 27B for work measured by OTIS Mock AIME or DTBench, where it leads.

Shared results
34
Gemma 2 27B only
2
Llama 3.1 8B Instruct only
17
Like-for-like categories
6 of 9

Only benchmarks that tested both models count toward a pick; a result only one model has is shown but not compared.

Which one for your work

Each card is decided by one number both models carry. Where only one has it, the card says so and makes no call.

At a glance

Coding index
Gemma 2 27B not benchmarked, Llama 3.1 8B Instruct not benchmarked.
Widest category
General, 10.5 points apart on average over 18 shared benchmarks.
Widest single gap
LMArena Text: Korean: Gemma 2 27B 1174 against Llama 3.1 8B Instruct 1053, 20.2 points apart on a 0 to 100 scale.
Output price
Gemma 2 27B $0.65 against Llama 3.1 8B Instruct $0.08 per million output tokens, 8.1x apart.
Context window
Gemma 2 27B takes 8K tokens, Llama 3.1 8B Instruct 131K.

Benchmark by benchmark

First the score: boards each model leads, per category, where both have a result. Then every board, a category to a fold; bars are each result on a 0 to 100 scale, so compare the two in a row, not one row with another.

Boards won, where both have a result
CategoryGemma 2 27BBarsLlama 3.1 8B InstructTies
Coding20
Intelligence10
Reasoning40
Math31
Knowledge50
General171
All shared boards322
CodingLike-for-likeSix of these boards feed the Vibe Coding Index20
Coding benchmarks for Gemma 2 27B and Llama 3.1 8B Instruct
BenchmarkGemma 2 27BLlama 3.1 8B InstructLeader
AA Coding IndexNot measured5.4Only Llama 3.1 8B Instruct measured
LiveCodeBench (Artificial Analysis run)Not measured11.6%Only Llama 3.1 8B Instruct measured
Terminal-Bench Hard (Artificial Analysis run)Not measured0.8%Only Llama 3.1 8B Instruct measured
WeirdMLNot measured1.7%Only Llama 3.1 8B Instruct measured
LMArena Text: coding12111195Gemma 2 27B
LMArena Text: software and IT12281195Gemma 2 27B
Neither model has a result on the other 33 boards here
IntelligenceLike-for-likePublic boards, shown as published, kept out of the index10
Intelligence benchmarks for Gemma 2 27B and Llama 3.1 8B Instruct
BenchmarkGemma 2 27BLlama 3.1 8B InstructLeader
AA Intelligence IndexNot measured6.9Only Llama 3.1 8B Instruct measured
Epoch Capabilities Index122.1116.5Gemma 2 27B
Agentic workDirectional onlyPublic boards, shown as published, kept out of the index3 boards, none shared
Agentic work benchmarks for Gemma 2 27B and Llama 3.1 8B Instruct
BenchmarkGemma 2 27BLlama 3.1 8B InstructLeader
τ²-Bench TelecomNot measured16.4%Only Llama 3.1 8B Instruct measured
BALROGNot measured15.1%Only Llama 3.1 8B Instruct measured
Berkeley Function Calling Leaderboard (BFCL)Not measured25.8%Only Llama 3.1 8B Instruct measured
Neither model has a result on the other 38 boards here
ReasoningLike-for-likePublic boards, shown as published, kept out of the index40
Reasoning benchmarks for Gemma 2 27B and Llama 3.1 8B Instruct
BenchmarkGemma 2 27BLlama 3.1 8B InstructLeader
GPQA Diamond (Artificial Analysis run)Not measured25.9%Only Llama 3.1 8B Instruct measured
Humanity's Last Exam (Artificial Analysis run)Not measured5.3%Only Llama 3.1 8B Instruct measured
GPQA Diamond (Epoch AI run)36.5%27.0%Gemma 2 27B
LMArena Text: hard prompts11981175Gemma 2 27B
LMArena Text: expert11711144Gemma 2 27B
LMArena Text: hard prompts in English12061196Gemma 2 27B
Neither model has a result on the other 16 boards here
MathLike-for-likePublic boards, shown as published, kept out of the index31
Math benchmarks for Gemma 2 27B and Llama 3.1 8B Instruct
BenchmarkGemma 2 27BLlama 3.1 8B InstructLeader
AA Math IndexNot measured4.3Only Llama 3.1 8B Instruct measured
AIME 2025 (Artificial Analysis run)Not measured4.3%Only Llama 3.1 8B Instruct measured
OTIS Mock AIME1.4%1.7%Llama 3.1 8B Instruct
MATH level 527.9%22.9%Gemma 2 27B
GSM8KNot measured82.4%Only Llama 3.1 8B Instruct measured
LMArena Text: math12121179Gemma 2 27B
LMArena Text: mathematical work12211180Gemma 2 27B
Neither model has a result on the other 6 boards here
KnowledgeLike-for-likePublic boards, shown as published, kept out of the index50
Knowledge benchmarks for Gemma 2 27B and Llama 3.1 8B Instruct
BenchmarkGemma 2 27BLlama 3.1 8B InstructLeader
LegalBench (Vals AI)68.0%Not measuredOnly Gemma 2 27B measured
MMLU Pro (Artificial Analysis run)Not measured47.6%Only Llama 3.1 8B Instruct measured
MMLU75.7%56.1%Gemma 2 27B
LMArena Text: science12281193Gemma 2 27B
LMArena Text: medicine and healthcare11981182Gemma 2 27B
LMArena Text: legal and government12411206Gemma 2 27B
LMArena Text: business and finance12081166Gemma 2 27B
Neither model has a result on the other 11 boards here
Web designNot comparablePublic boards, shown as published, kept out of the index0 boards, none shared
Web design benchmarks for Gemma 2 27B and Llama 3.1 8B Instruct
BenchmarkGemma 2 27BLlama 3.1 8B InstructLeader
Neither model has a result on 9 boards here
GeneralLike-for-likePublic boards, shown as published, kept out of the index171
General benchmarks for Gemma 2 27B and Llama 3.1 8B Instruct
BenchmarkGemma 2 27BLlama 3.1 8B InstructLeader
IFBenchNot measured28.6%Only Llama 3.1 8B Instruct measured
Long context reasoning (AA-LCR)Not measured18.0%Only Llama 3.1 8B Instruct measured
DTBench48.0%50.9%Llama 3.1 8B Instruct
LMCA7.1%5.4%Gemma 2 27B
PIQANot measured81.2%Only Llama 3.1 8B Instruct measured
LMArena Text12311187Gemma 2 27B
LMArena Text: instruction following12061159Gemma 2 27B
LMArena Text: creative writing12401154Gemma 2 27B
LMArena Text: English12421218Gemma 2 27B
LMArena Text: non-English12171148Gemma 2 27B
LMArena Text: Chinese12211151Gemma 2 27B
LMArena Text: German12091144Gemma 2 27B
LMArena Text: Japanese11751061Gemma 2 27B
LMArena Text: Korean11741053Gemma 2 27B
LMArena Text: French12481178Gemma 2 27B
LMArena Text: Spanish12281169Gemma 2 27B
LMArena Text: Russian12341158Gemma 2 27B
LMArena Text: Polish1277Not measuredOnly Gemma 2 27B measured
LMArena Text: multi-turn12241172Gemma 2 27B
LMArena Text: longer queries12301181Gemma 2 27B
LMArena Text: writing and language12491162Gemma 2 27B
LMArena Text: entertainment and media12121145Gemma 2 27B
Neither model has a result on the other 24 boards here
Image generationNot comparablePublic boards, shown as published, kept out of the index0 boards, none shared
Image generation benchmarks for Gemma 2 27B and Llama 3.1 8B Instruct
BenchmarkGemma 2 27BLlama 3.1 8B InstructLeader
Neither model has a result on 5 boards here

What each workload costs

Three fixed token mixes at each model's listed price, so per-token rates become a bill.

Chat turn

1K input + 500 output tokens

Gemma 2 27B$0.0010Fits in one request
Llama 3.1 8B Instruct$0.0001Fits in one request

Llama 3.1 8B Instruct costs less

Repository review

50K input + 3K output tokens

Gemma 2 27B$0.034Exceeds the context window
Llama 3.1 8B Instruct$0.0027Fits in one request

Llama 3.1 8B Instruct costs less

Agent loop

200K input + 10K output tokens

Gemma 2 27B$0.137Exceeds the context window
Llama 3.1 8B Instruct$0.011Exceeds the context window

Llama 3.1 8B Instruct costs less

Listed OpenRouter rates, without cache or batch discounts. A workload that does not fit a model's context window would need splitting.

Specification differences

The leading value in a row is marked; a row with a missing value names no leader. Our two rows are marked in red.

Specifications of Gemma 2 27B and Llama 3.1 8B Instruct
SpecificationGoogle Gemma 2 27BMeta Llama 3.1 8B Instruct
MakerGoogleMeta Llama
WeightsOpen weightsOpen weights
ReleasedJuly 13, 2024July 23, 2024
Context window8K131K
Input $/Mtok$0.65$0.05
Output $/Mtok$0.65$0.08
Coding indexNot benchmarkedNot benchmarked
Independent measurements behind it00
Cost per solved taskNot computableNot computable
SourceOpenRouter listingOpenRouter listing

Questions

Is Gemma 2 27B better than Llama 3.1 8B Instruct for coding?

Neither model has a coding score yet, so the two cannot be ranked on coding. Pick Gemma 2 27B for work measured by OTIS Mock AIME or DTBench, where it leads.

Which is cheaper, Gemma 2 27B or Llama 3.1 8B Instruct?

Gemma 2 27B costs $0.65 per million input tokens and $0.65 per million output tokens; Llama 3.1 8B Instruct costs $0.05 and $0.08. Cost per solved task is known for neither of them.

Which has the bigger context window, Gemma 2 27B or Llama 3.1 8B Instruct?

Llama 3.1 8B Instruct, with 131K tokens against 8K.

How many benchmarks is the Gemma 2 27B vs Llama 3.1 8B Instruct comparison based on?

34 benchmarks have a result for both models as of October 21, 2026. Gemma 2 27B's coding index rests on 0 independent benchmarks and Llama 3.1 8B Instruct's on 0. Where only one model has a result, the page says so instead of naming a winner.

Compare next