Enter opens the highlighted result. Esc closes.

Gemma 3 4B vs GLM 5

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

Gemma 3 4BGoogle
Coding
No data
Overall
4.8
Output $/M
$0.075
0
GLM 5Z.ai
Coding
41.7
Overall
27.9
Output $/M
$3.20
32
vs boards won of 32 shared

Decision reading

Only GLM 5 has a coding score, 41.7 on the Vibe Coding Index; Gemma 3 4B has none, so the two cannot be ranked on coding.

Gemma 3 4B has the edge where output tokens cost 42.7x less.

Shared results
32
Gemma 3 4B only
7
GLM 5 only
43
Like-for-like categories
7 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
Gemma 3 4B not benchmarked, GLM 5 41.7 from 3 benchmarks.
Widest category
Agentic work, 93.3 points apart on average over 1 shared benchmark.
Widest single gap
τ²-Bench Telecom: Gemma 3 4B 5.0% against GLM 5 98.2%, 93.3 points apart on a 0 to 100 scale.
Output price
Gemma 3 4B $0.075 against GLM 5 $3.20 per million output tokens, 42.7x apart.
Context window
Gemma 3 4B takes 131K tokens, GLM 5 205K.

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 3 4BBarsGLM 5Ties
Coding03
Intelligence02
Agentic work01
Reasoning06
Math03
Knowledge04
General013
All shared boards032
CodingLike-for-likeSix of these boards feed the Vibe Coding Index03
Coding benchmarks for Gemma 3 4B and GLM 5
BenchmarkGemma 3 4BGLM 5Leader
SWE-bench VerifiedNot measured72.8%Only GLM 5 measured
SWE-bench MultilingualNot measured69.7%Only GLM 5 measured
LMArena WebDevNot measured1435Only GLM 5 measured
AA Coding Index2.7Not measuredOnly Gemma 3 4B measured
LiveCodeBench (Vals AI)Not measured81.9%Only GLM 5 measured
SWE-bench Verified (Vals AI)Not measured71.4%Only GLM 5 measured
Vibe Code Bench (Vals AI)Not measured23.4%Only GLM 5 measured
LiveCodeBench (Artificial Analysis run)11.2%Not measuredOnly Gemma 3 4B measured
Terminal-Bench Hard (Artificial Analysis run)0.8%43.2%GLM 5
Terminal-BenchNot measured52.4%Only GLM 5 measured
WeirdMLNot measured48.2%Only GLM 5 measured
ALE-BenchNot measured765.6Only GLM 5 measured
LMArena Text: coding12301461GLM 5
LMArena Text: software and IT12691460GLM 5
LMArena WebDev: ReactNot measured1424Only GLM 5 measured
LMArena WebDev: HTMLNot measured1450Only GLM 5 measured
Neither model has a result on the other 22 boards here
IntelligenceLike-for-likePublic boards, shown as published, kept out of the index02
Intelligence benchmarks for Gemma 3 4B and GLM 5
BenchmarkGemma 3 4BGLM 5Leader
AA Intelligence Index4.827.9GLM 5
Epoch Capabilities Index115.9145.8GLM 5
Agentic workLike-for-likePublic boards, shown as published, kept out of the index01
Agentic work benchmarks for Gemma 3 4B and GLM 5
BenchmarkGemma 3 4BGLM 5Leader
Design Arena: agents building full-stack appsNot measured1123Only GLM 5 measured
Design Arena: agents building mobile appsNot measured1136Only GLM 5 measured
Design Arena: agents building Android appsNot measured1153Only GLM 5 measured
Design Arena: agents building Godot gamesNot measured1144Only GLM 5 measured
Design Arena: HTML slidesNot measured1148Only GLM 5 measured
τ²-Bench Telecom5.0%98.2%GLM 5
Vending-Bench 2Not measured$4,432Only GLM 5 measured
Neither model has a result on the other 32 boards here
ReasoningLike-for-likePublic boards, shown as published, kept out of the index06
Reasoning benchmarks for Gemma 3 4B and GLM 5
BenchmarkGemma 3 4BGLM 5Leader
GPQA DiamondNot measured83.3%Only GLM 5 measured
GPQA Diamond (Artificial Analysis run)29.1%82.0%GLM 5
Humanity's Last Exam (Artificial Analysis run)5.3%29.3%GLM 5
GPQA Diamond (Epoch AI run)23.2%87.8%GLM 5
ARC-AGINot measured44.7%Only GLM 5 measured
ARC-AGI-2Not measured4.9%Only GLM 5 measured
SimpleBenchNot measured53.2%Only GLM 5 measured
LMArena Text: hard prompts12531452GLM 5
LMArena Text: expert12231454GLM 5
LMArena Text: hard prompts in English12531460GLM 5
Neither model has a result on the other 11 boards here
MathLike-for-likePublic boards, shown as published, kept out of the index03
Math benchmarks for Gemma 3 4B and GLM 5
BenchmarkGemma 3 4BGLM 5Leader
AIMENot measured91.7%Only GLM 5 measured
AA Math Index12.7Not measuredOnly Gemma 3 4B measured
AIME 2025 (Artificial Analysis run)12.7%Not measuredOnly Gemma 3 4B measured
OTIS Mock AIME7.5%80.0%GLM 5
LMArena Text: math12391440GLM 5
LMArena Text: mathematical work12561451GLM 5
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 3 4B and GLM 5
BenchmarkGemma 3 4BGLM 5Leader
MMLU ProNot measured86.0%Only GLM 5 measured
LegalBench (Vals AI)Not measured84.1%Only GLM 5 measured
CaseLaw (Vals AI)Not measured52.5%Only GLM 5 measured
CorpFin (Vals AI)Not measured62.9%Only GLM 5 measured
TaxEval (Vals AI)Not measured70.0%Only GLM 5 measured
MedQA (Vals AI)Not measured94.3%Only GLM 5 measured
MMLU Pro (Artificial Analysis run)41.7%Not measuredOnly Gemma 3 4B measured
LMArena Text: science13061460GLM 5
LMArena Text: medicine and healthcare13421455GLM 5
LMArena Text: legal and government13271453GLM 5
LMArena Text: business and finance13111430GLM 5
Neither model has a result on the other 6 boards here
Web designDirectional onlyPublic boards, shown as published, kept out of the index8 boards, none shared
Web design benchmarks for Gemma 3 4B and GLM 5
BenchmarkGemma 3 4BGLM 5Leader
Design Arena: websitesNot measured1247Only GLM 5 measured
Design Arena: UI componentsNot measured1230Only GLM 5 measured
Design Arena: game devNot measured1234Only GLM 5 measured
Design Arena: data vizNot measured1228Only GLM 5 measured
Design Arena: 3DNot measured1229Only GLM 5 measured
Design Arena: all code categoriesNot measured1246Only GLM 5 measured
Design Arena: SVGNot measured1168Only GLM 5 measured
Design Arena: ASCII artNot measured1146Only GLM 5 measured
Neither model has a result on the other 1 board here
GeneralLike-for-likePublic boards, shown as published, kept out of the index013
General benchmarks for Gemma 3 4B and GLM 5
BenchmarkGemma 3 4BGLM 5Leader
IFBench28.3%72.3%GLM 5
Long context reasoning (AA-LCR)6.7%75.7%GLM 5
DTBench50.9%Not measuredOnly Gemma 3 4B measured
LMCA2.8%Not measuredOnly Gemma 3 4B measured
CL-benchNot measured18.7%Only GLM 5 measured
LMArena Text12911446GLM 5
LMArena Text: instruction following12391428GLM 5
LMArena Text: creative writing12701438GLM 5
LMArena Text: English13001458GLM 5
LMArena Text: non-English12731430GLM 5
LMArena Text: ChineseNot measured1511Only GLM 5 measured
LMArena Text: German12811447GLM 5
LMArena Text: JapaneseNot measured1416Only GLM 5 measured
LMArena Text: KoreanNot measured1423Only GLM 5 measured
LMArena Text: FrenchNot measured1456Only GLM 5 measured
LMArena Text: SpanishNot measured1454Only GLM 5 measured
LMArena Text: Russian12941436GLM 5
LMArena Text: PolishNot measured1434Only GLM 5 measured
LMArena Text: multi-turn12551456GLM 5
LMArena Text: longer queries12731446GLM 5
LMArena Text: writing and language12881437GLM 5
LMArena Text: entertainment and media12331426GLM 5
Neither model has a result on the other 24 boards here
Image generationNot comparablePublic boards, shown as published, kept out of the index0 boards, none shared
Image generation benchmarks for Gemma 3 4B and GLM 5
BenchmarkGemma 3 4BGLM 5Leader
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 3 4B$0.0001Fits in one request
GLM 5$0.0026Fits in one request

Gemma 3 4B costs less

Repository review

50K input + 3K output tokens

Gemma 3 4B$0.0025Fits in one request
GLM 5$0.060Fits in one request

Gemma 3 4B costs less

Agent loop

200K input + 10K output tokens

Gemma 3 4B$0.0097Exceeds the context window
GLM 5$0.232Exceeds the context window

Gemma 3 4B 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 3 4B and GLM 5
SpecificationGoogle Gemma 3 4BZ.ai GLM 5
MakerGoogleZ.ai
WeightsOpen weightsOpen weights
ReleasedMarch 13, 2025February 11, 2026
Context window131K205K
Input $/Mtok$0.045$1.00
Output $/Mtok$0.075$3.20
Coding indexNot benchmarked41.7
Independent measurements behind it03
Cost per solved taskNot computable$0.63
SourceOpenRouter listingOpenRouter listing

Questions

Is Gemma 3 4B better than GLM 5 for coding?

Only GLM 5 has a coding score, 41.7 on the Vibe Coding Index; Gemma 3 4B has none, so the two cannot be ranked on coding. Gemma 3 4B has the edge where output tokens cost 42.7x less.

Which is cheaper, Gemma 3 4B or GLM 5?

Gemma 3 4B costs $0.045 per million input tokens and $0.075 per million output tokens; GLM 5 costs $1.00 and $3.20. Cost per solved task is known for GLM 5 only.

Which has the bigger context window, Gemma 3 4B or GLM 5?

GLM 5, with 205K tokens against 131K.

How many benchmarks is the Gemma 3 4B vs GLM 5 comparison based on?

32 benchmarks have a result for both models as of October 21, 2026. Gemma 3 4B's coding index rests on 0 independent benchmarks and GLM 5's on 3. Where only one model has a result, the page says so instead of naming a winner.

Compare next