Skip to main content

Model comparison

Gemma 4 31B vs GLM-4.7

Data verified

Head-to-head evidence from 20 shared benchmark results across 5 categories. Overall scores shown here use the public BenchAlign v5 ranking lane.

61.08/100
Margin
0.1pts
winning →
61.16/100
1 category wins1 category wins

Public leaderboard positions: Gemma 4 31B #43 (Supported); GLM-4.7 #42 (Supported). Intervals and evidence labels describe ranking uncertainty, not a guarantee for a specific workload.

Evidence parity. Gemma 4 31B and GLM-4.7 share 20 comparable benchmark results. 2 of 8 categories are comparable. 9 results are unique to Gemma 4 31B; 10 to GLM-4.7.

Updated July 23, 2026
Shared results
20
Gemma 4 31B only
9
GLM-4.7 only
10
Comparable categories
2 / 8

Pick GLM-4.7 if you want the stronger benchmark profile. Gemma 4 31B only becomes the better choice if knowledge is the priority or you need the larger 256K context window.

Confidence note. This is a partial-evidence comparison with 20 shared benchmark results across 5 evidence categories; 2 of 8 categories currently have scoreable aggregates for both models. Treat the verdict as directional until coverage is more balanced.

Why this result

GLM-4.7 has the cleaner BenchAlign overall profile here, landing at 61.16 versus 61.08. It is a real lead, but still close enough that category-level strengths matter more than the headline number.

GLM-4.7's sharpest advantage is in coding, where it averages 75.4 against 41.6. The single biggest benchmark swing on the page is SWE-Rebench, 41.6% to 58.7%. Gemma 4 31B does hit back in knowledge, so the answer changes if that is the part of the workload you care about most.

Gemma 4 31B gives you the larger context window at 256K, compared with 200K for GLM-4.7.

Category breakdown

Exact category averages are shown below. Not measured means BenchLM does not have enough sourced public coverage for that model and category.

Category scores and score margins for Gemma 4 31B and GLM-4.7
CategoryGemma 4 31BΔGLM-4.7
CodingGemma 4 31B41.6Margin 33.8GLM-4.775.4
KnowledgeGemma 4 31B52.9Margin 1.1GLM-4.751.8
AgenticGemma 4 31BNot measuredMarginNo overlapGLM-4.745.7
MathGemma 4 31BNot measuredMarginNo overlapGLM-4.71.8
MultimodalGemma 4 31B76.9MarginNo overlapGLM-4.7Not measured

Decisive benchmark drivers

The largest measured benchmark gaps in this matchup, with exact reported values.

More
A · Gemma 4 31BB · GLM-4.7
  1. SWE-Rebench

    Coding
    Source ↗
    A 41.6%B 58.7%
    Winner: GLM-4.7Δ 17.1
    SWE-Rebench: Gemma 4 31B scored 41.6%; GLM-4.7 scored 58.7%. GLM-4.7 wins this benchmark.
  2. HLE

    Knowledge
    Source ↗
    A 26.5%B 24.8%
    Winner: Gemma 4 31BΔ 1.7
    HLE: Gemma 4 31B scored 26.5%; GLM-4.7 scored 24.8%. Gemma 4 31B wins this benchmark.
  3. GPQA

    Knowledge
    Source ↗
    A 84.3%B 85.7%
    Winner: GLM-4.7Δ 1.4
    GPQA: Gemma 4 31B scored 84.3%; GLM-4.7 scored 85.7%. GLM-4.7 wins this benchmark.
  4. MMLU-Pro

    Knowledge
    Source ↗
    A 85.2%B 84.3%
    Winner: Gemma 4 31BΔ 0.9
    MMLU-Pro: Gemma 4 31B scored 85.2%; GLM-4.7 scored 84.3%. Gemma 4 31B wins this benchmark.

Operational comparison

Runtime and commercial metrics are compared only when both models have a complete sourced value.

MetricGemma 4 31BGLM-4.7Comparison
Input / output priceUSD per 1M tokensGemma 4 31B$0 input / $0 outputGLM-4.7$0 input / $0 outputListed prices are equal.
Generation speedtokens per secondGemma 4 31BNot availableGLM-4.782 tok/sA complete speed comparison is not available.
First-answer latencyseconds to first tokenGemma 4 31BNot availableGLM-4.71.10 sA complete latency comparison is not available.
Context windowmaximum listed tokensGemma 4 31B256KGLM-4.7200KGemma 4 31B lists the larger context window.

Benchmark Deep Dive

Agentic
BenchmarkGemma 4 31BGLM-4.7Result
AA Agentic IndexSource 14.4%25.4%GLM-4.7 leads
τ²-bench resultsSource 59.9%95.9%GLM-4.7 leads
GDPval-AASource 15.2%33.3%GLM-4.7 leads
GDPval-AASource 8041165GLM-4.7 leads
Gert LabsSource 35.26%39.95%GLM-4.7 leads
AA EnterpriseOps-GymSource 28.3%Not comparable
AA ITBenchSource 37.3%Not comparable
AA Tau3 BankingSource 15.1%Not comparable
terminalBenchHardSource 36.4%Not comparable
Terminal-Bench 2.0Source 41%Not comparable
BrowseCompSource 52%Not comparable
VITA-BenchSource 15.5%Not comparable
CodingGLM-4.7 wins
BenchmarkGemma 4 31BGLM-4.7Result
SWE-RebenchSource 41.6%58.7%GLM-4.7 leads
React Native EvalsSource 75.2%Not comparable
AA Coding IndexSource 43.4%45.3%GLM-4.7 leads
AA-SciCodeSource 43.4%45.1%GLM-4.7 leads
SWE-bench VerifiedSource 73.8%Not comparable
LiveCodeBenchSource 84.9%Not comparable
AA LiveCodeBenchSource 89.4%Not comparable
Reasoning
BenchmarkGemma 4 31BGLM-4.7Result
AA-LCRSource 62.0%64.0%GLM-4.7 leads
CritPtSource 1.4%1.7%GLM-4.7 leads
KnowledgeGemma 4 31B wins
BenchmarkGemma 4 31BGLM-4.7Result
GPQASource 84.3%85.7%GLM-4.7 leads
MMLU-ProSource 85.2%84.3%Gemma 4 31B leads
HLESource 26.5%24.8%Gemma 4 31B leads
HLE w/o toolsSource 19.5%Not comparable
Artificial Analysis Intelligence IndexSource 29.4%33.7%GLM-4.7 leads
AA-GPQA DiamondSource 85.7%85.9%GLM-4.7 leads
AA-HLESource 22.7%25.1%GLM-4.7 leads
AA-Omniscience IndexSource -45.4%-34.6%GLM-4.7 leads
AA-Omniscience AccuracySource 19.9%29.3%GLM-4.7 leads
AA-Omniscience Hallucination RateSource 81.6%90.3%Gemma 4 31B leads
AA Openness IndexSource 38.9%Not comparable
Math
BenchmarkGemma 4 31BGLM-4.7Result
AIME 2025Source 95.7%Not comparable
FrontierMath v2 (Tiers 1-3)Source 2.439%Not comparable
FrontierMath v2 (Tier 4)Source 0.000%Not comparable
Multimodal
BenchmarkGemma 4 31BGLM-4.7Result
MMMU-ProSource 76.9%Not comparable
AA-MMMU-ProSource 73.4%Not comparable
Design Arena WebsiteSource 1255Not comparable
Inst. Following
BenchmarkGemma 4 31BGLM-4.7Result
AA-IFBenchSource 75.6%67.9%Gemma 4 31B leads
Frequently Asked Questions (3)

Which is better, Gemma 4 31B or GLM-4.7?

GLM-4.7 is ahead on BenchLM's BenchAlign leaderboard, 61.16 to 61.08. The biggest single separator in this matchup is SWE-Rebench, where the scores are 41.6% and 58.7%.

Which is better for knowledge tasks, Gemma 4 31B or GLM-4.7?

Gemma 4 31B has the edge for knowledge tasks in this comparison, averaging 52.9 versus 51.8. Inside this category, AA-Omniscience Index is the benchmark that creates the most daylight between them.

Which is better for coding, Gemma 4 31B or GLM-4.7?

GLM-4.7 has the edge for coding in this comparison, averaging 75.4 versus 41.6. Inside this category, SWE-Rebench is the benchmark that creates the most daylight between them.

Self-host vs API cost

Estimates at 50,000 req/day · 1000 tokens/req average.

Gemma 4 31B
API / mo$0
Self-host / mo$429
Break-even
GLM-4.7
API / mo$0
Self-host / moNot listed
Break-even
Proprietary model — self-hosting not applicable.
Model the full break-even

Related Comparisons

Last updated: July 23, 2026

Choose a model with this week’s evidence

Join 2,000+ readers for ranking moves, pricing changes, and the claims that still need proof.

One email each week. Unsubscribe anytime.