Enter opens the highlighted result. Esc closes.

GPT-4o-mini (2024-07-18) vs Llama 3.1 8B Instruct

Llama 3.1 8B Instruct costs 7.5x less per output token than GPT-4o-mini (2024-07-18) ($0.08 vs $0.60 per million). Updated October 22, 2026; 33 benchmarks have a result for both.

GPT-4o-mini (2024-07-18)OpenAI
Coding
No data
Overall
No data
Output $/M
$0.60
33
Llama 3.1 8B InstructMeta Llama
Coding
No data
Overall
17.9
Output $/M
$0.08
0
vs boards won of 33 shared

GPT-4o-mini (2024-07-18) or Llama 3.1 8B Instruct: which to pick

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

Compare them on price, context and the boards below.

Shared results
33
GPT-4o-mini (2024-07-18) only
13
Llama 3.1 8B Instruct only
18
Like-for-like categories
6 of 9

Only benchmarks that tested both models count toward a pick; a result only one model has is shown but not compared.

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-4o-mini (2024-07-18) not benchmarked, Llama 3.1 8B Instruct not benchmarked.
Widest category
General, 19.2 points apart on average over 16 shared benchmarks.
Widest single gap
MATH level 5: GPT-4o-mini (2024-07-18) 52.6% against Llama 3.1 8B Instruct 22.9%, 29.8 points apart on a 0 to 100 scale.
Output price
GPT-4o-mini (2024-07-18) $0.60 against Llama 3.1 8B Instruct $0.08 per million output tokens, 7.5x apart.
Context window
GPT-4o-mini (2024-07-18) takes 128K 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-4o-mini (2024-07-18)BarsLlama 3.1 8B InstructTies
Coding30
Agentic work10
Reasoning40
Math40
Knowledge50
General160
All shared boards330
CodingLike-for-likeSix of these boards feed the Vibe Coding Index30
Coding benchmarks for GPT-4o-mini (2024-07-18) and Llama 3.1 8B Instruct
BenchmarkGPT-4o-mini (2024-07-18)Llama 3.1 8B InstructLeader
Aider polyglot3.6%Not measuredOnly GPT-4o-mini (2024-07-18) measured
AA Coding IndexNot measured5.4Only Llama 3.1 8B Instruct measured
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
WeirdML11.8%1.7%GPT-4o-mini (2024-07-18)
LMArena Text: coding12901195GPT-4o-mini (2024-07-18)
LMArena Text: software and IT12911195GPT-4o-mini (2024-07-18)
Neither model has a result on the other 36 boards here
IntelligenceDirectional onlyPublic boards, shown as published, kept out of the index2 boards, none shared
Intelligence benchmarks for GPT-4o-mini (2024-07-18) and Llama 3.1 8B Instruct
BenchmarkGPT-4o-mini (2024-07-18)Llama 3.1 8B InstructLeader
AA Intelligence IndexNot measured6.9Only Llama 3.1 8B Instruct measured
Epoch Capabilities IndexNot measured116.5Only Llama 3.1 8B Instruct measured
Agentic workLike-for-likePublic boards, shown as published, kept out of the index10
Agentic work benchmarks for GPT-4o-mini (2024-07-18) and Llama 3.1 8B Instruct
BenchmarkGPT-4o-mini (2024-07-18)Llama 3.1 8B InstructLeader
τ²-Bench TelecomNot measured16.4%Only Llama 3.1 8B Instruct measured
BALROG17.4%15.1%GPT-4o-mini (2024-07-18)
Berkeley Function Calling Leaderboard (BFCL)Not measured25.8%Only Llama 3.1 8B Instruct measured
Neither model has a result on the other 39 boards here
ReasoningLike-for-likePublic boards, shown as published, kept out of the index40
Reasoning benchmarks for GPT-4o-mini (2024-07-18) and Llama 3.1 8B Instruct
BenchmarkGPT-4o-mini (2024-07-18)Llama 3.1 8B InstructLeader
GPQA Diamond (Artificial Analysis run)Not measured25.9%Only Llama 3.1 8B Instruct measured
Humanity's Last Exam (Artificial Analysis run)Not measured5.3%Only Llama 3.1 8B Instruct measured
GPQA Diamond (Epoch AI run)37.7%27.0%GPT-4o-mini (2024-07-18)
SimpleBench10.7%Not measuredOnly GPT-4o-mini (2024-07-18) measured
Chess puzzles3.0%Not measuredOnly GPT-4o-mini (2024-07-18) measured
Mystery game puzzles12.0%Not measuredOnly GPT-4o-mini (2024-07-18) measured
VPCT34.0%Not measuredOnly GPT-4o-mini (2024-07-18) measured
LMArena Text: hard prompts12671175GPT-4o-mini (2024-07-18)
LMArena Text: expert12341144GPT-4o-mini (2024-07-18)
LMArena Text: hard prompts in English12781196GPT-4o-mini (2024-07-18)
Neither model has a result on the other 13 boards here
MathLike-for-likePublic boards, shown as published, kept out of the index40
Math benchmarks for GPT-4o-mini (2024-07-18) and Llama 3.1 8B Instruct
BenchmarkGPT-4o-mini (2024-07-18)Llama 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 AIME6.9%1.7%GPT-4o-mini (2024-07-18)
FrontierMath, tiers 1 to 30.7%Not measuredOnly GPT-4o-mini (2024-07-18) measured
MATH level 552.6%22.9%GPT-4o-mini (2024-07-18)
GSM8KNot measured82.4%Only Llama 3.1 8B Instruct measured
LMArena Text: math12671179GPT-4o-mini (2024-07-18)
LMArena Text: mathematical work12711180GPT-4o-mini (2024-07-18)
Neither model has a result on the other 6 boards here
KnowledgeLike-for-likePublic boards, shown as published, kept out of the index50
Knowledge benchmarks for GPT-4o-mini (2024-07-18) and Llama 3.1 8B Instruct
BenchmarkGPT-4o-mini (2024-07-18)Llama 3.1 8B InstructLeader
MMLU Pro (Artificial Analysis run)Not measured47.6%Only Llama 3.1 8B Instruct measured
SimpleQA Verified8.3%Not measuredOnly GPT-4o-mini (2024-07-18) measured
MMLU76.7%56.1%GPT-4o-mini (2024-07-18)
GeoBench64.0%Not measuredOnly GPT-4o-mini (2024-07-18) measured
LMArena Text: science12861193GPT-4o-mini (2024-07-18)
LMArena Text: medicine and healthcare12821182GPT-4o-mini (2024-07-18)
LMArena Text: legal and government13051206GPT-4o-mini (2024-07-18)
LMArena Text: business and finance12651166GPT-4o-mini (2024-07-18)
Neither model has a result on the other 12 boards here
Web designNot comparablePublic boards, shown as published, kept out of the index0 boards, none shared
Web design benchmarks for GPT-4o-mini (2024-07-18) and Llama 3.1 8B Instruct
BenchmarkGPT-4o-mini (2024-07-18)Llama 3.1 8B InstructLeader
Neither model has a result on 9 boards here
GeneralLike-for-likePublic boards, shown as published, kept out of the index160
General benchmarks for GPT-4o-mini (2024-07-18) and Llama 3.1 8B Instruct
BenchmarkGPT-4o-mini (2024-07-18)Llama 3.1 8B InstructLeader
IFBenchNot measured28.6%Only Llama 3.1 8B Instruct measured
Long context reasoning (AA-LCR)Not measured18.0%Only Llama 3.1 8B Instruct measured
DTBenchNot measured50.9%Only Llama 3.1 8B Instruct measured
LMCANot measured5.4%Only Llama 3.1 8B Instruct measured
Creative writing (Lech Mazur)67.2%Not measuredOnly GPT-4o-mini (2024-07-18) measured
PIQANot measured81.2%Only Llama 3.1 8B Instruct measured
LMArena Text12861187GPT-4o-mini (2024-07-18)
LMArena Text: instruction following12581159GPT-4o-mini (2024-07-18)
LMArena Text: creative writing12681154GPT-4o-mini (2024-07-18)
LMArena Vision1066Not measuredOnly GPT-4o-mini (2024-07-18) measured
LMArena Text: English13011218GPT-4o-mini (2024-07-18)
LMArena Text: non-English12661148GPT-4o-mini (2024-07-18)
LMArena Text: Chinese12651151GPT-4o-mini (2024-07-18)
LMArena Text: German12721144GPT-4o-mini (2024-07-18)
LMArena Text: Japanese12161061GPT-4o-mini (2024-07-18)
LMArena Text: Korean11951053GPT-4o-mini (2024-07-18)
LMArena Text: French12971178GPT-4o-mini (2024-07-18)
LMArena Text: Spanish12761169GPT-4o-mini (2024-07-18)
LMArena Text: Russian12751158GPT-4o-mini (2024-07-18)
LMArena Text: Polish1244Not measuredOnly GPT-4o-mini (2024-07-18) measured
LMArena Text: multi-turn12851172GPT-4o-mini (2024-07-18)
LMArena Text: longer queries12891181GPT-4o-mini (2024-07-18)
LMArena Text: writing and language12821162GPT-4o-mini (2024-07-18)
LMArena Text: entertainment and media12531145GPT-4o-mini (2024-07-18)
LMArena Vision: English1072Not measuredOnly GPT-4o-mini (2024-07-18) measured
LMArena Vision: Chinese1033Not measuredOnly GPT-4o-mini (2024-07-18) measured
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-4o-mini (2024-07-18) and Llama 3.1 8B Instruct
BenchmarkGPT-4o-mini (2024-07-18)Llama 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-4o-mini (2024-07-18)$0.0004Fits 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-4o-mini (2024-07-18)$0.0093Fits in one request
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-4o-mini (2024-07-18)$0.036Exceeds 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-4o-mini (2024-07-18) and Llama 3.1 8B Instruct
SpecificationOpenAI GPT-4o-mini (2024-07-18)Meta Llama 3.1 8B Instruct
MakerOpenAIMeta Llama
WeightsNo public weights listedOpen weights
ReleasedJuly 18, 2024July 23, 2024
Context window128K131K
Input $/Mtok$0.15$0.05
Output $/Mtok$0.60$0.08
Coding indexNot benchmarkedNot benchmarked
Independent measurements behind it00
Cost per solved taskNot computableNot computable
SourceOpenRouter listingOpenRouter listing

Questions

Is GPT-4o-mini (2024-07-18) better than Llama 3.1 8B Instruct for coding?

Neither model has a coding score yet, so the two cannot be ranked on coding. Compare them on price, context and the boards below.

Which is cheaper, GPT-4o-mini (2024-07-18) or Llama 3.1 8B Instruct?

GPT-4o-mini (2024-07-18) costs $0.15 per million input tokens and $0.60 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-4o-mini (2024-07-18) or Llama 3.1 8B Instruct?

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

How many benchmarks is the GPT-4o-mini (2024-07-18) vs Llama 3.1 8B Instruct comparison based on?

33 benchmarks have a result for both models as of October 22, 2026. GPT-4o-mini (2024-07-18)'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