Enter opens the highlighted result. Esc closes.

Gemma 4 31B vs GLM 5.3 Flash

GLM 5.3 Flash leads Gemma 4 31B on coding, 57.7 to 39.0 on the Vibe Coding Index, and Gemma 4 31B costs 1.3x less per output token ($0.40 vs $0.50 per million). Updated October 21, 2026; 55 benchmarks have a result for both.

Gemma 4 31BGoogle
Coding
39.0
Overall
42.1
Output $/M
$0.40
3
GLM 5.3 FlashZ.ai
Coding
57.7
Overall
66.0
Output $/M
$0.50
52
vs boards won of 55 shared

Gemma 4 31B or GLM 5.3 Flash: which to pick

Pick GLM 5.3 Flash for coding: it scores 57.7 on the Vibe Coding Index against 39.0 for Gemma 4 31B.

Pick Gemma 4 31B for output tokens 1.3x cheaper ($0.40 vs $0.50 per million) and work measured by ALE-Bench or LMArena Vision: humor, where it leads.

Shared results
55
Gemma 4 31B only
16
GLM 5.3 Flash only
47
Like-for-like categories
8 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
Gemma 4 31B 39.0 from 2 benchmarks, GLM 5.3 Flash 57.7 from 6 benchmarks.
Widest category
Agentic work, 41.9 points apart on average over 4 shared benchmarks.
Widest single gap
LiveBench browser: Gemma 4 31B 4.0% against GLM 5.3 Flash 84.0%, 80.0 points apart on a 0 to 100 scale.
Output price
Gemma 4 31B $0.40 against GLM 5.3 Flash $0.50 per million output tokens, 1.3x apart.
Context window
Gemma 4 31B takes 262K tokens, GLM 5.3 Flash 1.05M.

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
CategoryGemma 4 31BBarsGLM 5.3 FlashTies
Coding18
Intelligence02
Agentic work04
Reasoning09
Math03
Knowledge04
Web design01
General221
All shared boards352
CodingLike-for-likeSix of these boards feed the Vibe Coding Index18
Coding benchmarks for Gemma 4 31B and GLM 5.3 Flash
BenchmarkGemma 4 31BGLM 5.3 FlashLeader
LiveBench coding49.0%80.6%GLM 5.3 Flash
LMArena WebDev13671607GLM 5.3 Flash
AA Coding Index43.471.5GLM 5.3 Flash
LiveCodeBench (Vals AI)Not measured80.5%Only GLM 5.3 Flash measured
SWE-bench Verified (Vals AI)Not measured92.0%Only GLM 5.3 Flash measured
Terminal-Bench 4 (Vals AI)Not measured37.4%Only GLM 5.3 Flash measured
Vibe Code Bench (Vals AI)Not measured30.8%Only GLM 5.3 Flash measured
Code migration (Vals AI)Not measured20.5%Only GLM 5.3 Flash measured
ProgramBench (Vals AI)Not measured0.0%Only GLM 5.3 Flash measured
IOI (Vals AI)Not measured52.5%Only GLM 5.3 Flash measured
Terminal-Bench 2.1 (Vals AI)Not measured62.9%Only GLM 5.3 Flash measured
Vibe Code Bench 1-100 (Vals AI)Not measured16.0%Only GLM 5.3 Flash measured
SkillsBench (Vals AI)Not measured40.2%Only GLM 5.3 Flash measured
CyberBench (Vals AI)Not measured67.9%Only GLM 5.3 Flash measured
SciCode45.5%51.6%GLM 5.3 Flash
Terminal-Bench Hard (Artificial Analysis run)36.4%Not measuredOnly Gemma 4 31B measured
FrontierCodeNot measured31.8%Only GLM 5.3 Flash measured
FrontierSWENot measured18.1%Only GLM 5.3 Flash measured
WeirdML52.3%Not measuredOnly Gemma 4 31B measured
ALE-Bench925.5303.6Gemma 4 31B
LMArena Text: coding14591507GLM 5.3 Flash
LMArena Text: software and IT14631500GLM 5.3 Flash
LMArena WebDev: React13591624GLM 5.3 Flash
LMArena WebDev: HTML13801577GLM 5.3 Flash
LMArena WebDev: from an imageNot measured1578Only GLM 5.3 Flash measured
SciCode8.9%Not measuredOnly Gemma 4 31B measured
Neither model has a result on the other 13 boards here
IntelligenceLike-for-likePublic boards, shown as published, kept out of the index02
Intelligence benchmarks for Gemma 4 31B and GLM 5.3 Flash
BenchmarkGemma 4 31BGLM 5.3 FlashLeader
AA Intelligence Index14.741.8GLM 5.3 Flash
Epoch Capabilities Index143.0153.1GLM 5.3 Flash
Agentic workLike-for-likePublic boards, shown as published, kept out of the index04
Agentic work benchmarks for Gemma 4 31B and GLM 5.3 Flash
BenchmarkGemma 4 31BGLM 5.3 FlashLeader
AA Agentic Index4.250.9GLM 5.3 Flash
LiveBench research44.4%70.1%GLM 5.3 Flash
LiveBench browser4.0%84.0%GLM 5.3 Flash
LiveBench long agentic13.3%28.4%GLM 5.3 Flash
SREBench (Vals AI)Not measured0.8%Only GLM 5.3 Flash measured
Finance Agent (Vals AI)Not measured57.9%Only GLM 5.3 Flash measured
Tax Agent Bench (Vals AI)Not measured31.6%Only GLM 5.3 Flash measured
Legal Research Bench (Vals AI)Not measured45.2%Only GLM 5.3 Flash measured
Harvey's Legal Agent Benchmark (Vals AI)Not measured10.4%Only GLM 5.3 Flash measured
Excel Modeling Benchmark (Vals AI)Not measured55.9%Only GLM 5.3 Flash measured
Terminal-Bench-Science (Vals AI)Not measured2.9%Only GLM 5.3 Flash measured
τ²-Bench Telecom65.5%Not measuredOnly Gemma 4 31B measured
APEX-AgentsNot measured52.8%Only GLM 5.3 Flash measured
Neither model has a result on the other 28 boards here
ReasoningLike-for-likePublic boards, shown as published, kept out of the index09
Reasoning benchmarks for Gemma 4 31B and GLM 5.3 Flash
BenchmarkGemma 4 31BGLM 5.3 FlashLeader
GPQA DiamondNot measured86.4%Only GLM 5.3 Flash measured
LiveBench reasoning68.3%77.6%GLM 5.3 Flash
MMMU Pro (Vals AI)Not measured86.0%Only GLM 5.3 Flash measured
GPQA Diamond (Artificial Analysis run)85.7%91.2%GLM 5.3 Flash
Humanity's Last Exam (Artificial Analysis run)23.6%39.9%GLM 5.3 Flash
GPQA Diamond (Epoch AI run)75.8%90.2%GLM 5.3 Flash
ARC-AGINot measured91.0%Only GLM 5.3 Flash measured
ARC-AGI-2Not measured65.8%Only GLM 5.3 Flash measured
Chess puzzlesNot measured21.0%Only GLM 5.3 Flash measured
Mystery game puzzlesNot measured8.0%Only GLM 5.3 Flash measured
LMArena Text: hard prompts14481490GLM 5.3 Flash
LMArena Text: expert14641511GLM 5.3 Flash
LMArena Text: hard prompts in English14561488GLM 5.3 Flash
LMArena Vision: diagrams12831317GLM 5.3 Flash
LMArena Vision: homework13101318GLM 5.3 Flash
Kagi LLM Benchmark63.5%Not measuredOnly Gemma 4 31B measured
Neither model has a result on the other 6 boards here
MathLike-for-likePublic boards, shown as published, kept out of the index03
Math benchmarks for Gemma 4 31B and GLM 5.3 Flash
BenchmarkGemma 4 31BGLM 5.3 FlashLeader
OTIS Mock AIME73.3%93.9%GLM 5.3 Flash
FrontierMath, tiers 1 to 3Not measured55.8%Only GLM 5.3 Flash measured
FrontierMath, tier 4Not measured17.1%Only GLM 5.3 Flash measured
ProofBenchNot measured21.0%Only GLM 5.3 Flash measured
LMArena Text: math14631503GLM 5.3 Flash
LMArena Text: mathematical work14651497GLM 5.3 Flash
Neither model has a result on the other 7 boards here
KnowledgeLike-for-likePublic boards, shown as published, kept out of the index04
Knowledge benchmarks for Gemma 4 31B and GLM 5.3 Flash
BenchmarkGemma 4 31BGLM 5.3 FlashLeader
MMLU ProNot measured86.1%Only GLM 5.3 Flash measured
LegalBench (Vals AI)Not measured83.9%Only GLM 5.3 Flash measured
CaseLaw (Vals AI)52.6%Not measuredOnly Gemma 4 31B measured
TaxEval (Vals AI)Not measured75.6%Only GLM 5.3 Flash measured
MortgageTax (Vals AI)61.4%Not measuredOnly Gemma 4 31B measured
SimpleQA Verified10.4%Not measuredOnly Gemma 4 31B measured
LMArena Text: science14571484GLM 5.3 Flash
LMArena Text: medicine and healthcare14511475GLM 5.3 Flash
LMArena Text: legal and government14381473GLM 5.3 Flash
LMArena Text: business and finance14301460GLM 5.3 Flash
FACTS Benchmark Suite45.3%Not measuredOnly Gemma 4 31B measured
Neither model has a result on the other 7 boards here
Web designLike-for-likePublic boards, shown as published, kept out of the index01
Web design benchmarks for Gemma 4 31B and GLM 5.3 Flash
BenchmarkGemma 4 31BGLM 5.3 FlashLeader
Design Arena: websitesNot measured1272Only GLM 5.3 Flash measured
Design Arena: UI componentsNot measured1316Only GLM 5.3 Flash measured
Design Arena: game devNot measured1278Only GLM 5.3 Flash measured
Design Arena: data vizNot measured1261Only GLM 5.3 Flash measured
Design Arena: 3DNot measured1316Only GLM 5.3 Flash measured
Design Arena: all code categoriesNot measured1282Only GLM 5.3 Flash measured
Design Arena: SVGNot measured1284Only GLM 5.3 Flash measured
Design Arena: ASCII artNot measured1268Only GLM 5.3 Flash measured
LiveBench design58.4%77.2%GLM 5.3 Flash
GeneralLike-for-likePublic boards, shown as published, kept out of the index221
General benchmarks for Gemma 4 31B and GLM 5.3 Flash
BenchmarkGemma 4 31BGLM 5.3 FlashLeader
Vals IndexNot measured50.9%Only GLM 5.3 Flash measured
LiveBench data analysis53.3%76.4%GLM 5.3 Flash
SAGE (Vals AI)55.0%Not measuredOnly Gemma 4 31B measured
MedScribe (Vals AI)Not measured88.9%Only GLM 5.3 Flash measured
IFBench75.6%Not measuredOnly Gemma 4 31B measured
Long context reasoning (AA-LCR)69.7%80.0%GLM 5.3 Flash
DTBench82.7%Not measuredOnly Gemma 4 31B measured
LMCA39.3%Not measuredOnly Gemma 4 31B measured
Surface Evolver Bench30.6%52.5%GLM 5.3 Flash
LMArena Text14431471GLM 5.3 Flash
LMArena Text: instruction following14331478GLM 5.3 Flash
LMArena Text: creative writing14171441GLM 5.3 Flash
LMArena Vision12761294GLM 5.3 Flash
LMArena Text: English14511474GLM 5.3 Flash
LMArena Text: non-English14301462GLM 5.3 Flash
LMArena Text: Chinese14751531GLM 5.3 Flash
LMArena Text: GermanNot measured1462Only GLM 5.3 Flash measured
LMArena Text: JapaneseNot measured1444Only GLM 5.3 Flash measured
LMArena Text: KoreanNot measured1436Only GLM 5.3 Flash measured
LMArena Text: French14361491GLM 5.3 Flash
LMArena Text: Spanish14421475GLM 5.3 Flash
LMArena Text: Russian14601465GLM 5.3 Flash
LMArena Text: Polish14331450GLM 5.3 Flash
LMArena Text: multi-turn14521469GLM 5.3 Flash
LMArena Text: longer queries14461481GLM 5.3 Flash
LMArena Text: writing and language14321455GLM 5.3 Flash
LMArena Text: entertainment and media14051440GLM 5.3 Flash
LMArena Vision: English12711295GLM 5.3 Flash
LMArena Vision: Chinese13261363GLM 5.3 Flash
LMArena Vision: reading text12821299GLM 5.3 Flash
LMArena Vision: humor12801279Gemma 4 31B
LMArena Vision: captioning1218Not measuredOnly Gemma 4 31B measured
LMArena Vision: recognizing things1226Not measuredOnly Gemma 4 31B measured
LMArena Vision: creative writing12851270Gemma 4 31B
LMArena Document1425Not measuredOnly Gemma 4 31B measured
Neither model has a result on the other 11 boards here
Image generationNot comparablePublic boards, shown as published, kept out of the index0 boards, none shared
Image generation benchmarks for Gemma 4 31B and GLM 5.3 Flash
BenchmarkGemma 4 31BGLM 5.3 FlashLeader
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

Gemma 4 31B$0.0003Fits in one request
GLM 5.3 Flash$0.0004Fits in one request

Gemma 4 31B costs less

Repository review

50K input + 3K output tokens

Gemma 4 31B$0.0082Fits in one request
GLM 5.3 Flash$0.0090Fits in one request

Gemma 4 31B costs less

Agent loop

200K input + 10K output tokens

Gemma 4 31B$0.032Fits in one request
GLM 5.3 Flash$0.035Fits in one request

Gemma 4 31B 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 Gemma 4 31B and GLM 5.3 Flash
SpecificationGoogle Gemma 4 31BZ.ai GLM 5.3 Flash
MakerGoogleZ.ai
WeightsOpen weightsOpen weights
ReleasedApril 2, 2026August 26, 2026
Context window262K1.05M
Input $/Mtok$0.14$0.15
Output $/Mtok$0.40$0.50
Coding index39.057.7
Independent measurements behind it26
Cost per solved taskNot computable$0.02
SourceOpenRouter listingOpenRouter listing

Questions

Is Gemma 4 31B better than GLM 5.3 Flash for coding?

Pick GLM 5.3 Flash for coding: it scores 57.7 on the Vibe Coding Index against 39.0 for Gemma 4 31B. Pick Gemma 4 31B for output tokens 1.3x cheaper ($0.40 vs $0.50 per million) and work measured by ALE-Bench or LMArena Vision: humor, where it leads.

Which is cheaper, Gemma 4 31B or GLM 5.3 Flash?

Gemma 4 31B costs $0.14 per million input tokens and $0.40 per million output tokens; GLM 5.3 Flash costs $0.15 and $0.50. Cost per solved task is known for GLM 5.3 Flash only.

Which has the bigger context window, Gemma 4 31B or GLM 5.3 Flash?

GLM 5.3 Flash, with 1.05M tokens against 262K.

How many benchmarks is the Gemma 4 31B vs GLM 5.3 Flash comparison based on?

55 benchmarks have a result for both models as of October 21, 2026. Gemma 4 31B's coding index rests on 2 independent benchmarks and GLM 5.3 Flash's on 6. Where only one model has a result, the page says so instead of naming a winner.

Compare next

Embed this comparison on your site

Free under CC BY 4.0, while the source link stays visible. Preview the frame · Terms and other embeds

<iframe src="https://llmbenchmark.ai/embed/compare/gemma-4-31b-it-vs-glm-5-3-flash" title="Gemma 4 31B vs GLM 5.3 Flash, LLMBenchmark.ai" width="100%" height="360" style="border:0;max-width:100%" loading="lazy"></iframe>
<p style="font:13px/1.4 sans-serif;margin:6px 0 0">Source: <a href="https://llmbenchmark.ai/compare/gemma-4-31b-it-vs-glm-5-3-flash">LLMBenchmark.ai, Gemma 4 31B vs GLM 5.3 Flash</a></p>