Across 8 comparable benchmarks, Llama3.1-8B-Instruct and Gemma 2 - 9B are evenly matched at 4 apiece.
Strong evidence8 of 8 shared results countedHow we compare
Price basis: Standard rates vs listed rates. The price section below shows the applicable periods.
| Fact | Llama3.1-8B-Instruct | Gemma 2 - 9B |
|---|---|---|
| Context window | 128K tokens | 8K tokens |
| Input / 1M | $0.020 | — |
| Output / 1M | $0.040 | — |
| Blended (4:1) | $0.024 | — |
| Status | Available | Available |
| Released | July 23, 2024 | June 27, 2024 |
Blended is 4:1 input to output with 90% cache hits at listed rates — set your own mix.
Mean of 5 shared benchmarks grouped by capability on a 0–100 scale. How averages are built
Llama3.1-8B-Instruct ahead on 2 of 2 counted
Llama3.1-8B-Instruct ahead on 2 of 2 counted
Gemma 2 - 9B ahead on 1 of 1 counted
Gemma 2 - 9B ahead on 1 of 1 counted
No fixed-scale average — see the rows in Benchmark results
No shared comparable results for Abstract reasoning, Computer & tool use, Research & search, Long context, Multimodal, Cybersecurity.
Published scores, with matching modes where available. Gaps show Llama3.1-8B-Instruct relative to Gemma 2 - 9B. Reading the results
| Benchmark | Llama3.1-8B-Instruct | Gemma 2 - 9B | Gap |
|---|---|---|---|
| HumanEvalCode Generation & Editing · Accuracy | 66.5Normal · no tools | 37.8Normal · no tools | +28.7 pts#54 vs #76 of 100 |
| MBPPCode Generation & Editing · Pass rate (%) | 69.4Normal · no tools | 62.2Normal · no tools | +7.2 pts#28 vs #37 of 67 |
| GSM8KMathematics · Accuracy | 82.4Normal · no tools | 70.7Normal · no tools | +11.7 pts#22 vs #32 of 67 |
| MATHMathematics · Accuracy | 47.6Normal · no tools | 37.7Normal · no tools | +9.9 pts#35 vs #39 of 42 |
| GPQA DiamondScientific Reasoning · Accuracy | 26.3Normal · no tools | 32.8Normal · no tools | −6.5 pts#196 vs #194 of 200 |
| Creative WritingWriting | 711Normal · no tools | 840Normal · no tools | 0.85×#116 vs #110 of 121 |
| MMLUKnowledge Exams · Accuracy | 68.1Normal · no tools | 71.3Normal · no tools | −3.2 pts#70 vs #62 of 114 |
| MMLU-ProKnowledge Exams · Accuracy | 44.3Reported best | 45.1Reported best | −0.9 pts#130 vs #128 of 153 |
Scientific Reasoning · Accuracy
Writing
Time-of-day providers use peak-hour rates; fixed-price providers use standard rates. Off-peak discounts remain in the published details.
Drag the handle above the bar for cache hits, the one below it for the input : output mix · 5% steps
Blended price = effective input rate at 90% cache hits × 80% + output rate × 20%
A blended cost needs a published input and output price on both sides, and one of these two does not have them yet.
Llama3.1-8B-Instruct: Standard pricing. DeepInfra official models API (meta-llama/Meta-Llama-3.1-8B-Instruct-Turbo) verified 2026-11-13
Gemma 2 - 9B: Listed text rates; pricing tier not confirmed.
| Price / 1M tokens | Llama3.1-8B-Instruct | Gemma 2 - 9B | Ratio |
|---|---|---|---|
| Input | $0.02 | — | — |
| Output | $0.04 | — | — |
| Cached input | — | — | — |
| Cache write | — | — | — |
| Blended | $0.024 | — | — |
Estimates use the selected token mix. Cache writes, tool fees and long-context surcharges are excluded.
| Attribute | Llama3.1-8B-Instruct | Gemma 2 - 9B |
|---|---|---|
| Availability | Available | Available |
| Provider | Facebook AI Research Lab | Google Research |
| Model type | Chat model | Foundation model |
| First release | July 23, 2024 | June 27, 2024 |
| Context window | 128K tokens | 8K tokens |
| Total parameters | 8B | 9B |
| Architecture | Dense | Dense |
| Input modalities | Text | — |
| Output modalities | Text | — |
| Weights | Open weights | Open weights |
| Licence | LLAMA 3.1 COMMUNITY LICENSE AGREEMENT | Gemma Terms of Use |
| Commercial use | Commercial use allowed | Commercial use allowed |
These are reported-score comparisons, not controlled head-to-head tests.
What people found comparing these models, or using either one. Comments also appear on the models' own pages.
Sign in with Google to comment on Llama3.1-8B-Instruct vs Gemma 2 - 9B.
No community comments on either model yet.
Alternatives with the most benchmark overlap for this matchup.