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.

GPT-4 OpenAI

29.1

Rank #316 Confirmed

Llama 3.1-8B Meta

23.0

Rank #352 Confirmed

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 and Llama 3.1-8B specifications
GPT-4Llama 3.1-8B
ProviderOpenAIMeta
Noometry Index29.123.0
Released2023-03-142024-07-23
WeightsProprietaryOpen
Context window8K128K
Max output8K4K
Input $ / M tokens$30$0.05
Output $ / M tokens$60$0.08
Results tracked3843

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)

Coding benchmarks
BenchmarkGPT-4Llama 3.1-8B
WeirdML12.4%1.7%
BigCodeBench Instruct46%32.8%
LMArena Coding12541195
BigCodeBench Complete57.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)

Agentic & Tool Use benchmarks
BenchmarkGPT-4Llama 3.1-8B
Berkeley Function Calling Leaderboard—25.8%
BALROG—15.1%
METR Time Horizons36.1%—

Reasoning GPT-4 leads

GPT-4: 17.8 (#289), Llama 3.1-8B: 14.9 (#321)

Reasoning benchmarks
BenchmarkGPT-4Llama 3.1-8B
Chess Puzzles4%0%
LMArena Hard Prompts12411175
DTBench62.7%50.9%
LMCA17.1%5.4%
Epoch Capabilities Index125.89116.57
CritPt—0%
Mystery Game Puzzles12%—
BIG-Bench Hard75.1%—
ForecastBench57.8—
HellaSwag95.3%—
PIQA—81.2%
WinoGrande87.5%—

Math Too close to call

GPT-4: 10.8 (#309), Llama 3.1-8B: 10.2 (#317)

Math benchmarks
BenchmarkGPT-4Llama 3.1-8B
OTIS Mock AIME 2024-20251.1%1.7%
LMArena Math12691179
MATH Level 523%22.9%
GSM8K92%82.4%
Omni-MATH—13.7%

Knowledge GPT-4 leads

GPT-4: 18.4 (#282), Llama 3.1-8B: 8.0 (#307)

Knowledge benchmarks
BenchmarkGPT-4Llama 3.1-8B
GPQA Diamond35.7%27%
LMArena Expert12111144
MMLU86.4%56.1%
MMLU-Pro—40.6%
GPQA (HELM)—24.7%
BoolQ—82.8%
TriviaQA84.8%—

Multilingual GPT-4 leads

GPT-4: 40.6 (#215), Llama 3.1-8B: 34.0 (#249)

Multilingual benchmarks
BenchmarkGPT-4Llama 3.1-8B
LMArena Non-English12461148
LMArena Chinese12421151
LMArena French12831177
LMArena German12511144
LMArena Japanese12091061
LMArena Korean11841053
LMArena Russian12511158
LMArena Spanish12611169

Instruction Following GPT-4 leads

GPT-4: 65.3 (#222), Llama 3.1-8B: 58.9 (#258)

Instruction Following benchmarks
BenchmarkGPT-4Llama 3.1-8B
LMArena Instruction Following12411159
IFEval—74.3%

Long Context GPT-4 leads

GPT-4: 37.7 (#212), Llama 3.1-8B: 35.8 (#238)

Long Context benchmarks
BenchmarkGPT-4Llama 3.1-8B
LMArena Longer Query12441182

Writing & Preference GPT-4 leads

GPT-4: 34.9 (#268), Llama 3.1-8B: 29.7 (#290)

Writing & Preference benchmarks
BenchmarkGPT-4Llama 3.1-8B
LMArena Text12631187
LMArena Creative Writing12441154
EQ-Bench Creative Writing752713
LMArena Multi-Turn12571172
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.

Related comparisons

Go deeper