Enter opens the highlighted result. Esc closes.

GPT-4 vs Llama 3.1 8B Instruct

Updated October 21, 2026. 37 benchmarks have a result for both. Coding is ranked on the Vibe Coding Index; every other board is shown as published.

GPT-4OpenAI
Coding
No data
Overall
6.7
Output $/M
$60.00
31
Llama 3.1 8B InstructMeta Llama
Coding
No data
Overall
6.9
Output $/M
$0.08
6
vs boards won of 37 shared

Decision reading

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

GPT-4 has the edge where what matters is LMArena Text: software and IT or AA Intelligence Index, where it leads.

Shared results
37
GPT-4 only
8
Llama 3.1 8B Instruct only
13
Like-for-like categories
6 of 9

Shared results can support a head-to-head reading. Results only one model has describe coverage, not superiority.

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
GPT-4 not benchmarked, Llama 3.1 8B Instruct not benchmarked.
Widest category
Knowledge, 8.9 points apart on average over 6 shared benchmarks.
Widest single gap
MMLU: GPT-4 86.4% against Llama 3.1 8B Instruct 56.1%, 30.3 points apart on a 0 to 100 scale.
Output price
GPT-4 $60.00 against Llama 3.1 8B Instruct $0.08 per million output tokens, 750.0x apart.
Context window
GPT-4 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
CategoryGPT-4BarsLlama 3.1 8B InstructTies
Coding21
Intelligence11
Reasoning40
Math30
Knowledge24
General190
All shared boards316
CodingLike-for-likeSix of these boards feed the Vibe Coding Index21
Coding benchmarks for GPT-4 and Llama 3.1 8B Instruct
BenchmarkGPT-4Llama 3.1 8B InstructLeader
SWE-bench Verified22.4%Not measuredOnly GPT-4 measured
SWE-bench Lite39.7%Not measuredOnly GPT-4 measured
SWE-bench (full test set)12.5%Not measuredOnly GPT-4 measured
AA Coding Index13.15.4GPT-4
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: coding12091195GPT-4
LMArena Text: software and IT11951195Llama 3.1 8B Instruct
Neither model has a result on the other 29 boards here
IntelligenceLike-for-likePublic boards, shown as published, kept out of the index11
Intelligence benchmarks for GPT-4 and Llama 3.1 8B Instruct
BenchmarkGPT-4Llama 3.1 8B InstructLeader
AA Intelligence Index6.76.9Llama 3.1 8B Instruct
Epoch Capabilities Index125.7116.5GPT-4
Agentic workDirectional onlyPublic boards, shown as published, kept out of the index2 boards, none shared
Agentic work benchmarks for GPT-4 and Llama 3.1 8B Instruct
BenchmarkGPT-4Llama 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
Neither model has a result on the other 37 boards here
ReasoningLike-for-likePublic boards, shown as published, kept out of the index40
Reasoning benchmarks for GPT-4 and Llama 3.1 8B Instruct
BenchmarkGPT-4Llama 3.1 8B InstructLeader
GPQA Diamond (Artificial Analysis run)34.9%25.9%GPT-4
Humanity's Last Exam (Artificial Analysis run)Not measured5.3%Only Llama 3.1 8B Instruct measured
GPQA Diamond (Epoch AI run)Not measured27.0%Only Llama 3.1 8B Instruct measured
BIG-Bench Hard75.1%Not measuredOnly GPT-4 measured
LMArena Text: hard prompts12001175GPT-4
LMArena Text: expert11491144GPT-4
LMArena Text: hard prompts in English12091196GPT-4
Neither model has a result on the other 14 boards here
MathLike-for-likePublic boards, shown as published, kept out of the index30
Math benchmarks for GPT-4 and Llama 3.1 8B Instruct
BenchmarkGPT-4Llama 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 AIMENot measured1.7%Only Llama 3.1 8B Instruct measured
MATH level 5Not measured22.9%Only Llama 3.1 8B Instruct measured
GSM8K92.0%82.4%GPT-4
LMArena Text: math12301179GPT-4
LMArena Text: mathematical work12281180GPT-4
Neither model has a result on the other 6 boards here
KnowledgeLike-for-likePublic boards, shown as published, kept out of the index24
Knowledge benchmarks for GPT-4 and Llama 3.1 8B Instruct
BenchmarkGPT-4Llama 3.1 8B InstructLeader
MMLU Pro (Artificial Analysis run)56.2%47.6%GPT-4
MMLU86.4%56.1%GPT-4
AI2 Reasoning Challenge96.3%Not measuredOnly GPT-4 measured
LMArena Text: science11771193Llama 3.1 8B Instruct
LMArena Text: medicine and healthcare11451182Llama 3.1 8B Instruct
LMArena Text: legal and government11911206Llama 3.1 8B Instruct
LMArena Text: business and finance11451166Llama 3.1 8B Instruct
Neither model has a result on the other 10 boards here
Web designNot comparablePublic boards, shown as published, kept out of the index0 boards, none shared
Web design benchmarks for GPT-4 and Llama 3.1 8B Instruct
BenchmarkGPT-4Llama 3.1 8B InstructLeader
Neither model has a result on 9 boards here
GeneralLike-for-likePublic boards, shown as published, kept out of the index190
General benchmarks for GPT-4 and Llama 3.1 8B Instruct
BenchmarkGPT-4Llama 3.1 8B InstructLeader
IFBench33.2%28.6%GPT-4
Long context reasoning (AA-LCR)Not measured18.0%Only Llama 3.1 8B Instruct measured
DTBench62.7%50.9%GPT-4
LMCA17.1%5.4%GPT-4
HellaSwag95.3%Not measuredOnly GPT-4 measured
WinoGrande87.5%Not measuredOnly GPT-4 measured
PIQANot measured81.2%Only Llama 3.1 8B Instruct measured
LMArena Text12061187GPT-4
LMArena Text: instruction following12011159GPT-4
LMArena Text: creative writing11911154GPT-4
LMArena Text: English12201218GPT-4
LMArena Text: non-English11941148GPT-4
LMArena Text: Chinese11841151GPT-4
LMArena Text: German11981144GPT-4
LMArena Text: Japanese11371061GPT-4
LMArena Text: Korean10871053GPT-4
LMArena Text: French12201178GPT-4
LMArena Text: Spanish11971169GPT-4
LMArena Text: Russian11951158GPT-4
LMArena Text: Polish1265Not measuredOnly GPT-4 measured
LMArena Text: multi-turn12061172GPT-4
LMArena Text: longer queries11901181GPT-4
LMArena Text: writing and language12191162GPT-4
LMArena Text: entertainment and media11841145GPT-4
Neither model has a result on the other 22 boards here
Image generationNot comparablePublic boards, shown as published, kept out of the index0 boards, none shared
Image generation benchmarks for GPT-4 and Llama 3.1 8B Instruct
BenchmarkGPT-4Llama 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

GPT-4$0.060Fits 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

GPT-4$1.68Exceeds 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

GPT-4$6.60Exceeds 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 GPT-4 and Llama 3.1 8B Instruct
SpecificationOpenAI GPT-4Meta Llama 3.1 8B Instruct
MakerOpenAIMeta Llama
WeightsNo public weights listedOpen weights
ReleasedMay 28, 2023July 23, 2024
Context window8K131K
Input $/Mtok$30.00$0.05
Output $/Mtok$60.00$0.08
Coding indexNot benchmarkedNot benchmarked
Independent measurements behind it00
Cost per solved taskNot computableNot computable
SourceOpenRouter listingOpenRouter listing

Questions

Is GPT-4 better than Llama 3.1 8B Instruct for coding?

Neither model has a coding score yet, so the two cannot be ranked on coding. GPT-4 has the edge where what matters is LMArena Text: software and IT or AA Intelligence Index, where it leads.

Which is cheaper, GPT-4 or Llama 3.1 8B Instruct?

GPT-4 costs $30.00 per million input tokens and $60.00 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, GPT-4 or Llama 3.1 8B Instruct?

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

How many benchmarks is the GPT-4 vs Llama 3.1 8B Instruct comparison based on?

37 benchmarks have a result for both models as of October 21, 2026. GPT-4'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