Model comparison
GPT-4 vs Llama 3.1-8B
GPT-4 is the stronger model overall, scoring 29.1 to 23.0 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.
Last verified . 31 shared benchmarks.
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.6 to 20.2.
- 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.
Side by side
| GPT-4 | Llama 3.1-8B | |
|---|---|---|
| Provider | OpenAI | Meta |
| Noometry Index | 29.1 | 23.0 |
| Released | 2023-03-14 | 2024-07-23 |
| Weights | Proprietary | Open |
| Context window | 8K | 128K |
| Max output | 8K | 4K |
| Input $ / M tokens | $30 | $0.05 |
| Output $ / M tokens | $60 | $0.08 |
| Results tracked | 38 | 43 |
Sponsored placements are available on pages like this one. Advertise on Noometry
Category by category
Coding GPT-4 leads
GPT-4: 31.6 (#283), Llama 3.1-8B: 20.2 (#340)
| 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 Not comparable
GPT-4: —, Llama 3.1-8B: 22.5 (#131)
| Benchmark | GPT-4 | Llama 3.1-8B |
|---|---|---|
| Berkeley Function Calling Leaderboard | — | 25.8% |
| BALROG | — | 15.1% |
| METR Time Horizons | 36.1% | — |
Reasoning GPT-4 leads
GPT-4: 17.8 (#289), Llama 3.1-8B: 14.9 (#321)
| 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.89 | 116.57 |
| CritPt | — | 0% |
| Mystery Game Puzzles | 12% | — |
| BIG-Bench Hard | 75.1% | — |
| ForecastBench | 57.8 | — |
| HellaSwag | 95.3% | — |
| PIQA | — | 81.2% |
| WinoGrande | 87.5% | — |
Math Too close to call
GPT-4: 10.8 (#309), Llama 3.1-8B: 10.2 (#317)
| 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 leads
GPT-4: 18.4 (#282), Llama 3.1-8B: 8.0 (#307)
| 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 leads
GPT-4: 40.6 (#215), Llama 3.1-8B: 34.0 (#249)
| Benchmark | GPT-4 | Llama 3.1-8B |
|---|---|---|
| LMArena Non-English | 1246 | 1148 |
| LMArena Chinese | 1242 | 1151 |
| LMArena French | 1283 | 1177 |
| LMArena German | 1251 | 1144 |
| LMArena Japanese | 1209 | 1061 |
| LMArena Korean | 1184 | 1053 |
| LMArena Russian | 1251 | 1158 |
| LMArena Spanish | 1261 | 1169 |
Instruction Following GPT-4 leads
GPT-4: 65.3 (#222), Llama 3.1-8B: 58.9 (#258)
| Benchmark | GPT-4 | Llama 3.1-8B |
|---|---|---|
| LMArena Instruction Following | 1241 | 1159 |
| IFEval | — | 74.3% |
Long Context GPT-4 leads
GPT-4: 37.7 (#212), Llama 3.1-8B: 35.8 (#238)
| Benchmark | GPT-4 | Llama 3.1-8B |
|---|---|---|
| LMArena Longer Query | 1244 | 1182 |
Writing & Preference GPT-4 leads
GPT-4: 34.9 (#268), Llama 3.1-8B: 29.7 (#290)
| 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% |
Frequently asked questions
Is GPT-4 better than Llama 3.1-8B?
GPT-4 is the stronger model overall, scoring 29.1 to 23.0 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.6 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 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.