GLM 4.5 vs Llama 3.1 8B Instruct
GLM 4.5 leads Llama 3.1 8B Instruct on the Artificial Analysis Intelligence Index, 12.8 to 6.9, and Llama 3.1 8B Instruct costs 27.5x less per output token ($0.08 vs $2.20 per million). Updated October 21, 2026; 39 benchmarks have a result for both.
GLM 4.5 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
- 39
- GLM 4.5 only
- 22
- Llama 3.1 8B Instruct only
- 12
- Like-for-like categories
- 7 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.
Coding
Vibe Coding Index, six public coding benchmarks
No call
Neither has a coding score yet.
One side not measured
Intelligence
AA Intelligence Index
GLM 4.5
GLM 4.5 leads, 12.8 against 6.9.
Same board, both measured
Reasoning
GPQA Diamond
No call
Only GLM 4.5 has a GPQA Diamond result, 72.2%.
Directional only
Math
AIME
No call
Only GLM 4.5 has a AIME result, 86.7%.
Directional only
Knowledge
MMLU Pro
No call
Only GLM 4.5 has a MMLU Pro result, 81.2%.
Directional only
Web design
Design Arena: websites
No call
Only GLM 4.5 has a Design Arena: websites result, 1170.
Directional only
Long documents
Listed context window
No call
Both take 131K tokens.
Listed by OpenRouter
Everyday cost
1K input + 500 output tokens
Llama 3.1 8B Instruct
GLM 4.5 $0.0017, Llama 3.1 8B Instruct $0.0001 per turn.
List prices
At a glance
- Coding index
- GLM 4.5 not benchmarked, Llama 3.1 8B Instruct not benchmarked.
- Widest category
- Math, 55.4 points apart on average over 4 shared benchmarks.
- Widest single gap
- AA Math Index: GLM 4.5 73.7 against Llama 3.1 8B Instruct 4.3, 69.4 points apart on a 0 to 100 scale.
- Output price
- GLM 4.5 $2.20 against Llama 3.1 8B Instruct $0.08 per million output tokens, 27.5x apart.
- Context window
- Both take 131K tokens.
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.
| Category | GLM 4.5 | Bars | Llama 3.1 8B Instruct | Ties |
|---|---|---|---|---|
| Coding | 5 | 0 | ||
| Intelligence | 1 | 0 | ||
| Agentic work | 1 | 0 | ||
| Reasoning | 5 | 0 | ||
| Math | 4 | 0 | ||
| Knowledge | 5 | 0 | ||
| General | 18 | 0 | ||
| All shared boards | 39 | 0 |
CodingLike-for-likeSix of these boards feed the Vibe Coding Index50
| Benchmark | GLM 4.5 | Llama 3.1 8B Instruct | Leader |
|---|---|---|---|
| SWE-bench Verified | 64.2% | Not measured | Only GLM 4.5 measured |
| AA Coding Index | Not measured | 5.4 | Only Llama 3.1 8B Instruct measured |
| LiveCodeBench (Vals AI) | 67.5% | Not measured | Only GLM 4.5 measured |
| LiveCodeBench (Artificial Analysis run) | 73.8% | 11.6% | GLM 4.5 |
| Terminal-Bench Hard (Artificial Analysis run) | 22.0% | 0.8% | GLM 4.5 |
| WeirdML | 40.6% | 1.7% | GLM 4.5 |
| ALE-Bench | 344.8 | Not measured | Only GLM 4.5 measured |
| LMArena Text: coding | 1434 | 1195 | GLM 4.5 |
| LMArena Text: software and IT | 1440 | 1195 | GLM 4.5 |
| Neither model has a result on the other 30 boards here | |||
IntelligenceLike-for-likePublic boards, shown as published, kept out of the index10
| Benchmark | GLM 4.5 | Llama 3.1 8B Instruct | Leader |
|---|---|---|---|
| AA Intelligence Index | 12.8 | 6.9 | GLM 4.5 |
| Epoch Capabilities Index | Not measured | 116.5 | Only Llama 3.1 8B Instruct measured |
Agentic workLike-for-likePublic boards, shown as published, kept out of the index10
| Benchmark | GLM 4.5 | Llama 3.1 8B Instruct | Leader |
|---|---|---|---|
| τ²-Bench Telecom | 43.0% | 16.4% | GLM 4.5 |
| BALROG | Not measured | 15.1% | Only Llama 3.1 8B Instruct measured |
| Berkeley Function Calling Leaderboard (BFCL) | Not measured | 25.8% | Only Llama 3.1 8B Instruct measured |
| Neither model has a result on the other 38 boards here | |||
ReasoningLike-for-likePublic boards, shown as published, kept out of the index50
| Benchmark | GLM 4.5 | Llama 3.1 8B Instruct | Leader |
|---|---|---|---|
| GPQA Diamond | 72.2% | Not measured | Only GLM 4.5 measured |
| GPQA Diamond (Artificial Analysis run) | 78.2% | 25.9% | GLM 4.5 |
| Humanity's Last Exam (Artificial Analysis run) | 13.0% | 5.3% | GLM 4.5 |
| GPQA Diamond (Epoch AI run) | Not measured | 27.0% | Only Llama 3.1 8B Instruct measured |
| LMArena Text: hard prompts | 1429 | 1175 | GLM 4.5 |
| LMArena Text: expert | 1433 | 1144 | GLM 4.5 |
| LMArena Text: hard prompts in English | 1429 | 1196 | GLM 4.5 |
| Kagi LLM Benchmark | 57.9% | Not measured | Only GLM 4.5 measured |
| Neither model has a result on the other 14 boards here | |||
MathLike-for-likePublic boards, shown as published, kept out of the index40
| Benchmark | GLM 4.5 | Llama 3.1 8B Instruct | Leader |
|---|---|---|---|
| AIME | 86.7% | Not measured | Only GLM 4.5 measured |
| MATH 500 (Vals AI) | 94.0% | Not measured | Only GLM 4.5 measured |
| MGSM (Vals AI) | 90.8% | Not measured | Only GLM 4.5 measured |
| AA Math Index | 73.7 | 4.3 | GLM 4.5 |
| AIME 2025 (Artificial Analysis run) | 73.7% | 4.3% | GLM 4.5 |
| OTIS Mock AIME | Not measured | 1.7% | Only Llama 3.1 8B Instruct measured |
| MATH level 5 | Not measured | 22.9% | Only Llama 3.1 8B Instruct measured |
| GSM8K | Not measured | 82.4% | Only Llama 3.1 8B Instruct measured |
| LMArena Text: math | 1427 | 1179 | GLM 4.5 |
| LMArena Text: mathematical work | 1430 | 1180 | GLM 4.5 |
| Neither model has a result on the other 3 boards here | |||
KnowledgeLike-for-likePublic boards, shown as published, kept out of the index50
| Benchmark | GLM 4.5 | Llama 3.1 8B Instruct | Leader |
|---|---|---|---|
| MMLU Pro | 81.2% | Not measured | Only GLM 4.5 measured |
| LegalBench (Vals AI) | 75.6% | Not measured | Only GLM 4.5 measured |
| CorpFin (Vals AI) | 61.0% | Not measured | Only GLM 4.5 measured |
| TaxEval (Vals AI) | 72.4% | Not measured | Only GLM 4.5 measured |
| MedQA (Vals AI) | 90.0% | Not measured | Only GLM 4.5 measured |
| MMLU Pro (Artificial Analysis run) | 83.5% | 47.6% | GLM 4.5 |
| MMLU | Not measured | 56.1% | Only Llama 3.1 8B Instruct measured |
| LMArena Text: science | 1444 | 1193 | GLM 4.5 |
| LMArena Text: medicine and healthcare | 1455 | 1182 | GLM 4.5 |
| LMArena Text: legal and government | 1438 | 1206 | GLM 4.5 |
| LMArena Text: business and finance | 1420 | 1166 | GLM 4.5 |
| Neither model has a result on the other 7 boards here | |||
Web designDirectional onlyPublic boards, shown as published, kept out of the index7 boards, none shared
| Benchmark | GLM 4.5 | Llama 3.1 8B Instruct | Leader |
|---|---|---|---|
| Design Arena: websites | 1170 | Not measured | Only GLM 4.5 measured |
| Design Arena: UI components | 1144 | Not measured | Only GLM 4.5 measured |
| Design Arena: game dev | 1145 | Not measured | Only GLM 4.5 measured |
| Design Arena: data viz | 1159 | Not measured | Only GLM 4.5 measured |
| Design Arena: 3D | 1170 | Not measured | Only GLM 4.5 measured |
| Design Arena: all code categories | 1165 | Not measured | Only GLM 4.5 measured |
| Design Arena: SVG | 1096 | Not measured | Only GLM 4.5 measured |
| Neither model has a result on the other 2 boards here | |||
GeneralLike-for-likePublic boards, shown as published, kept out of the index180
| Benchmark | GLM 4.5 | Llama 3.1 8B Instruct | Leader |
|---|---|---|---|
| IFBench | 44.1% | 28.6% | GLM 4.5 |
| Long context reasoning (AA-LCR) | 52.7% | 18.0% | GLM 4.5 |
| DTBench | Not measured | 50.9% | Only Llama 3.1 8B Instruct measured |
| LMCA | Not measured | 5.4% | Only Llama 3.1 8B Instruct measured |
| Creative writing (Lech Mazur) | 73.4% | Not measured | Only GLM 4.5 measured |
| PIQA | Not measured | 81.2% | Only Llama 3.1 8B Instruct measured |
| LMArena Text | 1430 | 1187 | GLM 4.5 |
| LMArena Text: instruction following | 1404 | 1159 | GLM 4.5 |
| LMArena Text: creative writing | 1395 | 1154 | GLM 4.5 |
| LMArena Text: English | 1437 | 1218 | GLM 4.5 |
| LMArena Text: non-English | 1417 | 1148 | GLM 4.5 |
| LMArena Text: Chinese | 1465 | 1151 | GLM 4.5 |
| LMArena Text: German | 1407 | 1144 | GLM 4.5 |
| LMArena Text: Japanese | 1415 | 1061 | GLM 4.5 |
| LMArena Text: Korean | 1380 | 1053 | GLM 4.5 |
| LMArena Text: French | 1418 | 1178 | GLM 4.5 |
| LMArena Text: Spanish | 1454 | 1169 | GLM 4.5 |
| LMArena Text: Russian | 1413 | 1158 | GLM 4.5 |
| LMArena Text: Polish | 1422 | Not measured | Only GLM 4.5 measured |
| LMArena Text: multi-turn | 1415 | 1172 | GLM 4.5 |
| LMArena Text: longer queries | 1412 | 1181 | GLM 4.5 |
| LMArena Text: writing and language | 1403 | 1162 | GLM 4.5 |
| LMArena Text: entertainment and media | 1404 | 1145 | GLM 4.5 |
| Neither model has a result on the other 23 boards here | |||
Image generationNot comparablePublic boards, shown as published, kept out of the index0 boards, none shared
| Benchmark | GLM 4.5 | Llama 3.1 8B Instruct | Leader |
|---|---|---|---|
| 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
Llama 3.1 8B Instruct costs less
Repository review
50K input + 3K output tokens
Llama 3.1 8B Instruct costs less
Agent loop
200K input + 10K output tokens
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.
| Specification | Z.ai GLM 4.5 | Meta Llama 3.1 8B Instruct |
|---|---|---|
| Maker | Z.ai | Meta Llama |
| Weights | Open weights | Open weights |
| Released | July 25, 2025 | July 23, 2024 |
| Context window | 131K | 131K |
| Input $/Mtok | $0.60 | $0.05 |
| Output $/Mtok | $2.20 | $0.08 |
| Coding index | Not benchmarked | Not benchmarked |
| Independent measurements behind it | 0 | 0 |
| Cost per solved task | Not computable | Not computable |
| Source | OpenRouter listing | OpenRouter listing |
Questions
Is GLM 4.5 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, GLM 4.5 or Llama 3.1 8B Instruct?
GLM 4.5 costs $0.60 per million input tokens and $2.20 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, GLM 4.5 or Llama 3.1 8B Instruct?
Neither: both take 131K tokens.
How many benchmarks is the GLM 4.5 vs Llama 3.1 8B Instruct comparison based on?
39 benchmarks have a result for both models as of October 21, 2026. GLM 4.5'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.