# GPT-4 vs Llama 3.1-8B

> GPT-4 is the stronger model overall, scoring 28.9 to 22.8 on the Noometry Index. Llama 3.1-8B costs 652× less per token, which makes it the better buy when GPT-4's lead doesn't matter for your workload.

- Canonical page: https://noometry.com/compare/gpt-4-vs-llama-3-1-8b
- Last updated: 2026-10-10
- Shared benchmarks: 31

## Summary

- They share 31 benchmarks with published results for both. GPT-4 scores higher in 8 categories and Llama 3.1-8B in 0 categories; 7 gaps are clear of the uncertainty.
- The widest gap is in coding, where GPT-4 leads 31.2 to 19.9.
- The biggest single-benchmark swing is BigCodeBench Complete: 57.2% for GPT-4 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 $30 / $60 for GPT-4.
- Llama 3.1-8B accepts more context: 128K tokens versus 8K.
- Llama 3.1-8B has downloadable open weights; the other is API-only.

## Snapshot

| | GPT-4 | Llama 3.1-8B |
|---|---|---|
| Provider | OpenAI | Meta |
| Noometry Index | 28.9 | 22.8 |
| Rank | 308 | 347 |
| Context | 8K | 128K |
| Input $/M | $30 | $0.05 |
| Output $/M | $60 | $0.08 |
| Weights | Proprietary | Open |

## Coding

- GPT-4: 31.2 (#277)
- Llama 3.1-8B: 19.9 (#335)

| Benchmark | GPT-4 | Llama 3.1-8B |
|---|---|---|
| WeirdML | 12.4% | 1.7% |
| BigCodeBench Instruct | 46% | 32.8% |
| LMArena Coding | 1254 | 1195 |
| BigCodeBench Complete | 57.2% | 40.5% |
| HumanEval+ | 79.3% | 62.8% |
| SciCode | — | 13.2% |
| MBPP+ | — | 55.6% |

## Agentic & Tool Use

- GPT-4: —
- Llama 3.1-8B: 22.3 (#123)

| Benchmark | GPT-4 | Llama 3.1-8B |
|---|---|---|
| Berkeley Function Calling Leaderboard | — | 25.8% |
| BALROG | — | 15.1% |
| METR Time Horizons | 36.1% | — |

## Reasoning

- GPT-4: 17.3 (#285)
- Llama 3.1-8B: 14.5 (#316)

| Benchmark | GPT-4 | Llama 3.1-8B |
|---|---|---|
| Chess Puzzles | 4% | 0% |
| LMArena Hard Prompts | 1241 | 1175 |
| DTBench | 62.7% | 50.9% |
| LMCA | 17.1% | 5.4% |
| Epoch Capabilities Index | 125.88 | 116.48 |
| CritPt | — | 0% |
| Mystery Game Puzzles | 12% | — |
| BIG-Bench Hard | 75.1% | — |
| ForecastBench | 57.8 | — |
| HellaSwag | 95.3% | — |
| PIQA | — | 81.2% |
| WinoGrande | 87.5% | — |

## Math

- GPT-4: 10.1 (#304)
- Llama 3.1-8B: 9.5 (#311)

| Benchmark | GPT-4 | Llama 3.1-8B |
|---|---|---|
| OTIS Mock AIME 2024-2025 | 1.1% | 1.7% |
| LMArena Math | 1269 | 1179 |
| MATH Level 5 | 23% | 22.9% |
| GSM8K | 92% | 82.4% |
| Omni-MATH | — | 13.7% |

## Knowledge

- GPT-4: 18.4 (#277)
- Llama 3.1-8B: 8.0 (#302)

| Benchmark | GPT-4 | Llama 3.1-8B |
|---|---|---|
| GPQA Diamond | 35.7% | 27% |
| LMArena Expert | 1211 | 1144 |
| MMLU | 86.4% | 56.1% |
| MMLU-Pro | — | 40.6% |
| GPQA (HELM) | — | 24.7% |
| BoolQ | — | 82.8% |
| TriviaQA | 84.8% | — |

## Multilingual

- GPT-4: 40.8 (#210)
- Llama 3.1-8B: 34.2 (#244)

| Benchmark | GPT-4 | Llama 3.1-8B |
|---|---|---|
| LMArena Non-English | 1246 | 1148 |
| LMArena Chinese | 1242 | 1151 |
| LMArena French | 1282 | 1176 |
| LMArena German | 1251 | 1144 |
| LMArena Japanese | 1209 | 1061 |
| LMArena Korean | 1184 | 1053 |
| LMArena Russian | 1251 | 1158 |
| LMArena Spanish | 1261 | 1169 |

## Instruction Following

- GPT-4: 65.5 (#217)
- Llama 3.1-8B: 59.1 (#253)

| Benchmark | GPT-4 | Llama 3.1-8B |
|---|---|---|
| LMArena Instruction Following | 1241 | 1159 |
| IFEval | — | 74.3% |

## Long Context

- GPT-4: 37.7 (#207)
- Llama 3.1-8B: 35.8 (#233)

| Benchmark | GPT-4 | Llama 3.1-8B |
|---|---|---|
| LMArena Longer Query | 1244 | 1182 |

## Writing & Preference

- GPT-4: 35.0 (#263)
- Llama 3.1-8B: 29.9 (#285)

| Benchmark | GPT-4 | Llama 3.1-8B |
|---|---|---|
| LMArena Text | 1263 | 1187 |
| LMArena Creative Writing | 1244 | 1154 |
| EQ-Bench Creative Writing | 752 | 713 |
| LMArena Multi-Turn | 1257 | 1172 |
| WildBench | — | 68.7% |

## FAQ

### Is GPT-4 better than Llama 3.1-8B?

GPT-4 is the stronger model overall, scoring 28.9 to 22.8 on the Noometry Index. Llama 3.1-8B costs 652× less per token, which makes it the better buy when GPT-4's lead doesn't matter for your workload.

### Which is cheaper, GPT-4 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; GPT-4 lists at $30 and $60.

### Is GPT-4 or Llama 3.1-8B better for coding?

GPT-4 scores higher on coding benchmarks: 31.2 versus 19.9 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 GPT-4 and Llama 3.1-8B share?

31 benchmarks have published results for both models. GPT-4 has 38 scored results on Noometry and Llama 3.1-8B has 43.
