Enter opens the highlighted result. Esc closes.

Grok 4.7 vs Llama 3.1 8B Instruct

Grok 4.7 leads Llama 3.1 8B Instruct on the Artificial Analysis Intelligence Index, 46.4 to 6.9, and Llama 3.1 8B Instruct costs 75.0x less per output token ($0.08 vs $6.00 per million). Updated October 21, 2026; 35 benchmarks have a result for both.

Grok 4.7xAI
Coding
66.7
Overall
66.6
Output $/M
$6.00
35
Llama 3.1 8B InstructMeta Llama
Coding
No data
Overall
17.9
Output $/M
$0.08
0
vs boards won of 35 shared

Grok 4.7 or Llama 3.1 8B Instruct: which to pick

Only Grok 4.7 has a coding score, 66.7 on the Vibe Coding Index; Llama 3.1 8B Instruct has none, so the two cannot be ranked on coding.

Pick Llama 3.1 8B Instruct for output tokens 75.0x cheaper ($0.08 vs $6.00 per million).

Shared results
35
Grok 4.7 only
64
Llama 3.1 8B Instruct only
16
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
Grok 4.7 66.7 from 5 benchmarks, Llama 3.1 8B Instruct not benchmarked.
Widest category
Math, 59.3 points apart on average over 3 shared benchmarks.
Widest single gap
OTIS Mock AIME: Grok 4.7 98.1% against Llama 3.1 8B Instruct 1.7%, 96.4 points apart on a 0 to 100 scale.
Output price
Grok 4.7 $6.00 against Llama 3.1 8B Instruct $0.08 per million output tokens, 75.0x apart.
Context window
Grok 4.7 takes 500K 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
CategoryGrok 4.7BarsLlama 3.1 8B InstructTies
Coding20
Intelligence20
Reasoning50
Math30
Knowledge40
General190
All shared boards350
CodingLike-for-likeSix of these boards feed the Vibe Coding Index20
Coding benchmarks for Grok 4.7 and Llama 3.1 8B Instruct
BenchmarkGrok 4.7Llama 3.1 8B InstructLeader
LiveBench coding84.5%Not measuredOnly Grok 4.7 measured
LMArena WebDev1637Not measuredOnly Grok 4.7 measured
AA Coding IndexNot measured5.4Only Llama 3.1 8B Instruct measured
Terminal-Bench 4 (Vals AI)28.8%Not measuredOnly Grok 4.7 measured
Vibe Code Bench (Vals AI)86.2%Not measuredOnly Grok 4.7 measured
Code migration (Vals AI)44.8%Not measuredOnly Grok 4.7 measured
ProgramBench (Vals AI)0.5%Not measuredOnly Grok 4.7 measured
IOI (Vals AI)57.7%Not measuredOnly Grok 4.7 measured
Terminal-Bench 2.1 (Vals AI)73.4%Not measuredOnly Grok 4.7 measured
SWE-bench Multimodal (Vals AI)42.9%Not measuredOnly Grok 4.7 measured
CyberBench (Vals AI)69.5%Not measuredOnly Grok 4.7 measured
LiveCodeBench (Artificial Analysis run)Not measured11.6%Only Llama 3.1 8B Instruct measured
SciCode57.8%Not measuredOnly Grok 4.7 measured
Terminal-Bench Hard (Artificial Analysis run)Not measured0.8%Only Llama 3.1 8B Instruct measured
FrontierCode47.6%Not measuredOnly Grok 4.7 measured
FrontierSWE29.5%Not measuredOnly Grok 4.7 measured
WeirdMLNot measured1.7%Only Llama 3.1 8B Instruct measured
LMArena Text: coding14321195Grok 4.7
LMArena Text: software and IT14211195Grok 4.7
LMArena WebDev: React1663Not measuredOnly Grok 4.7 measured
LMArena WebDev: HTML1627Not measuredOnly Grok 4.7 measured
LMArena WebDev: from an image1586Not measuredOnly Grok 4.7 measured
Neither model has a result on the other 17 boards here
IntelligenceLike-for-likePublic boards, shown as published, kept out of the index20
Intelligence benchmarks for Grok 4.7 and Llama 3.1 8B Instruct
BenchmarkGrok 4.7Llama 3.1 8B InstructLeader
AA Intelligence Index46.46.9Grok 4.7
Epoch Capabilities Index154.4116.5Grok 4.7
Agentic workDirectional onlyPublic boards, shown as published, kept out of the index18 boards, none shared
Agentic work benchmarks for Grok 4.7 and Llama 3.1 8B Instruct
BenchmarkGrok 4.7Llama 3.1 8B InstructLeader
LiveBench research86.4%Not measuredOnly Grok 4.7 measured
LiveBench browser60.0%Not measuredOnly Grok 4.7 measured
LiveBench long agentic50.1%Not measuredOnly Grok 4.7 measured
SREBench (Vals AI)3.8%Not measuredOnly Grok 4.7 measured
Finance Agent (Vals AI)52.3%Not measuredOnly Grok 4.7 measured
Tax Agent Bench (Vals AI)34.2%Not measuredOnly Grok 4.7 measured
Legal Research Bench (Vals AI)47.1%Not measuredOnly Grok 4.7 measured
Harvey's Legal Agent Benchmark (Vals AI)18.3%Not measuredOnly Grok 4.7 measured
Excel Modeling Benchmark (Vals AI)67.0%Not measuredOnly Grok 4.7 measured
BioMysteryBench (Vals AI)69.3%Not measuredOnly Grok 4.7 measured
Terminal-Bench-Science (Vals AI)10.0%Not measuredOnly Grok 4.7 measured
Vals Science Index34.8%Not measuredOnly Grok 4.7 measured
Robo-bench (Vals AI)0.2%Not measuredOnly Grok 4.7 measured
τ²-Bench TelecomNot measured16.4%Only Llama 3.1 8B Instruct measured
APEX-Agents54.6%Not measuredOnly Grok 4.7 measured
BALROGNot measured15.1%Only Llama 3.1 8B Instruct measured
Vending-Bench 2$10,537Not measuredOnly Grok 4.7 measured
Berkeley Function Calling Leaderboard (BFCL)Not measured25.8%Only Llama 3.1 8B Instruct measured
Neither model has a result on the other 23 boards here
ReasoningLike-for-likePublic boards, shown as published, kept out of the index50
Reasoning benchmarks for Grok 4.7 and Llama 3.1 8B Instruct
BenchmarkGrok 4.7Llama 3.1 8B InstructLeader
LiveBench reasoning82.7%Not measuredOnly Grok 4.7 measured
MysteryMechanism (Vals AI)25.2%Not measuredOnly Grok 4.7 measured
GPQA Diamond (Artificial Analysis run)Not measured25.9%Only Llama 3.1 8B Instruct measured
Humanity's Last Exam (Artificial Analysis run)43.1%5.3%Grok 4.7
GPQA Diamond (Epoch AI run)92.7%27.0%Grok 4.7
ARC-AGI90.2%Not measuredOnly Grok 4.7 measured
ARC-AGI-261.4%Not measuredOnly Grok 4.7 measured
Chess puzzles41.0%Not measuredOnly Grok 4.7 measured
Mystery game puzzles29.0%Not measuredOnly Grok 4.7 measured
LMArena Text: hard prompts14151175Grok 4.7
LMArena Text: expert14391144Grok 4.7
LMArena Text: hard prompts in English14271196Grok 4.7
LMArena Vision: diagrams1254Not measuredOnly Grok 4.7 measured
LMArena Vision: homework1309Not measuredOnly Grok 4.7 measured
Neither model has a result on the other 8 boards here
MathLike-for-likePublic boards, shown as published, kept out of the index30
Math benchmarks for Grok 4.7 and Llama 3.1 8B Instruct
BenchmarkGrok 4.7Llama 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 AIME98.1%1.7%Grok 4.7
FrontierMath, tiers 1 to 353.0%Not measuredOnly Grok 4.7 measured
FrontierMath, tier 417.1%Not measuredOnly Grok 4.7 measured
ProofBench26.0%Not measuredOnly Grok 4.7 measured
MATH level 5Not measured22.9%Only Llama 3.1 8B Instruct measured
GSM8KNot measured82.4%Only Llama 3.1 8B Instruct measured
LMArena Text: math14141179Grok 4.7
LMArena Text: mathematical work14351180Grok 4.7
Neither model has a result on the other 3 boards here
KnowledgeLike-for-likePublic boards, shown as published, kept out of the index40
Knowledge benchmarks for Grok 4.7 and Llama 3.1 8B Instruct
BenchmarkGrok 4.7Llama 3.1 8B InstructLeader
LegalBench (Vals AI)84.4%Not measuredOnly Grok 4.7 measured
MedCode (Vals AI)49.5%Not measuredOnly Grok 4.7 measured
MMLU Pro (Artificial Analysis run)Not measured47.6%Only Llama 3.1 8B Instruct measured
SimpleQA Verified56.0%Not measuredOnly Grok 4.7 measured
MMLUNot measured56.1%Only Llama 3.1 8B Instruct measured
LMArena Text: science14191193Grok 4.7
LMArena Text: medicine and healthcare13951182Grok 4.7
LMArena Text: legal and government14231206Grok 4.7
LMArena Text: business and finance13891166Grok 4.7
Neither model has a result on the other 9 boards here
Web designDirectional onlyPublic boards, shown as published, kept out of the index7 boards, none shared
Web design benchmarks for Grok 4.7 and Llama 3.1 8B Instruct
BenchmarkGrok 4.7Llama 3.1 8B InstructLeader
Design Arena: websites1254Not measuredOnly Grok 4.7 measured
Design Arena: UI components1275Not measuredOnly Grok 4.7 measured
Design Arena: game dev1313Not measuredOnly Grok 4.7 measured
Design Arena: data viz1235Not measuredOnly Grok 4.7 measured
Design Arena: 3D1270Not measuredOnly Grok 4.7 measured
Design Arena: all code categories1271Not measuredOnly Grok 4.7 measured
LiveBench design78.0%Not measuredOnly Grok 4.7 measured
Neither model has a result on the other 2 boards here
GeneralLike-for-likePublic boards, shown as published, kept out of the index190
General benchmarks for Grok 4.7 and Llama 3.1 8B Instruct
BenchmarkGrok 4.7Llama 3.1 8B InstructLeader
Vals Index58.6%Not measuredOnly Grok 4.7 measured
LiveBench data analysis76.9%Not measuredOnly Grok 4.7 measured
Public Benefits Bench (Vals AI)65.6%Not measuredOnly Grok 4.7 measured
SAGE (Vals AI)40.8%Not measuredOnly Grok 4.7 measured
MedScribe (Vals AI)89.4%Not measuredOnly Grok 4.7 measured
IFBenchNot measured28.6%Only Llama 3.1 8B Instruct measured
Long context reasoning (AA-LCR)80.0%18.0%Grok 4.7
DTBench96.0%50.9%Grok 4.7
LMCA49.4%5.4%Grok 4.7
Furniture assembly20.8%Not measuredOnly Grok 4.7 measured
PIQANot measured81.2%Only Llama 3.1 8B Instruct measured
LMArena Text13991187Grok 4.7
LMArena Text: instruction following14061159Grok 4.7
LMArena Text: creative writing13811154Grok 4.7
LMArena Vision1231Not measuredOnly Grok 4.7 measured
LMArena Text: English14111218Grok 4.7
LMArena Text: non-English13861148Grok 4.7
LMArena Text: Chinese14491151Grok 4.7
LMArena Text: German13661144Grok 4.7
LMArena Text: Japanese13591061Grok 4.7
LMArena Text: Korean13831053Grok 4.7
LMArena Text: French14311178Grok 4.7
LMArena Text: Spanish14061169Grok 4.7
LMArena Text: Russian13991158Grok 4.7
LMArena Text: Polish1420Not measuredOnly Grok 4.7 measured
LMArena Text: multi-turn13941172Grok 4.7
LMArena Text: longer queries14161181Grok 4.7
LMArena Text: writing and language13941162Grok 4.7
LMArena Text: entertainment and media13761145Grok 4.7
LMArena Vision: English1229Not measuredOnly Grok 4.7 measured
LMArena Vision: Chinese1250Not measuredOnly Grok 4.7 measured
LMArena Vision: reading text1241Not measuredOnly Grok 4.7 measured
LMArena Vision: creative writing1217Not measuredOnly Grok 4.7 measured
Neither model has a result on the other 13 boards here
Image generationNot comparablePublic boards, shown as published, kept out of the index0 boards, none shared
Image generation benchmarks for Grok 4.7 and Llama 3.1 8B Instruct
BenchmarkGrok 4.7Llama 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

Grok 4.7$0.0050Fits 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

Grok 4.7$0.118Fits 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

Grok 4.7$0.460Fits in one request
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 Grok 4.7 and Llama 3.1 8B Instruct
SpecificationSpaceXAI Grok 4.7Meta Llama 3.1 8B Instruct
MakerxAIMeta Llama
WeightsNo public weights listedOpen weights
ReleasedSeptember 21, 2026July 23, 2024
Context window500K131K
Input $/Mtok$2.00$0.05
Output $/Mtok$6.00$0.08
Coding index66.7Not benchmarked
Independent measurements behind it50
Cost per solved taskNot computableNot computable
SourceOpenRouter listingOpenRouter listing

Questions

Is Grok 4.7 better than Llama 3.1 8B Instruct for coding?

Only Grok 4.7 has a coding score, 66.7 on the Vibe Coding Index; Llama 3.1 8B Instruct has none, so the two cannot be ranked on coding. Pick Llama 3.1 8B Instruct for output tokens 75.0x cheaper ($0.08 vs $6.00 per million).

Which is cheaper, Grok 4.7 or Llama 3.1 8B Instruct?

Grok 4.7 costs $2.00 per million input tokens and $6.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, Grok 4.7 or Llama 3.1 8B Instruct?

Grok 4.7, with 500K tokens against 131K.

How many benchmarks is the Grok 4.7 vs Llama 3.1 8B Instruct comparison based on?

35 benchmarks have a result for both models as of October 21, 2026. Grok 4.7's coding index rests on 5 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