Gemma 4 31B vs GLM-4.7-Flash
Wins 5 of 6 areas
Coding · Reasoning · Facts · Long documents · Following instructions
Wins 1 of 6 areas
Agents
Gemma 4 31B is the stronger all-rounder.GLM-4.7-Flash is cheaper and better at agents.
Scores updated · 24 tests both models report · How we compare
Where each one wins
Tests won in each of the six areas where both have results. Each piece is one test, so a longer bar means more evidence; grey means the two scored within a point of each other.
- ReasoningHard problems that need careful thinking30Gemma 4 31B3 of 3 tests
- FactsGetting facts right instead of making them up30Gemma 4 31B3 of 3 tests
- CodingWriting and fixing software31Gemma 4 31B3 of 4 tests
- Long documentsFinding answers in very long texts10Gemma 4 31B1 of 1 test
- Following instructionsDoing exactly what it is asked10Gemma 4 31B1 of 1 test
- AgentsCarrying out multi-step tasks on its own02GLM-4.7-Flash2 of 2 tests
Long documents and following instructions rest on a single test each.
What it costs
Prices per million tokens, roughly 750,000 words. The bars show the cost of a million tokens read plus a million written.
GLM-4.7-Flash costs 15% less for the same work.
The biggest differences
The three tests each model wins by the widest margin. Scores are out of 100.
Where Gemma 4 31B pulls ahead
- Reasons across sets of long documentsAA-LCR+28points ahead
- Graduate-level biology, physics and chemistry questionsGPQA Diamond+27.6points ahead
- Recent programming contest problemsLiveCodeBench v6+16points ahead
Where GLM-4.7-Flash pulls ahead
- Fixes real GitHub issues in Python projectsSWE-bench Verified+13.1points ahead
- Real work tasks from 44 professionsGDPVal+10.9points ahead
- Finds hard-to-locate facts by browsing the webBrowseComp+5.8points ahead
Every test, side by side
All 24 tests both models report. The winning score is in its model's colour; marks a score checked independently.
CodingGemma 4 31B
- LiveCodeBench v6Gemma 4 31B by 168064+16
- Terminal-Bench HardGemma 4 31B by 14.436.422+14.4
- SWE-bench VerifiedGLM-4.7-Flash by 13.146.159.2+13.1
- SciCodeGemma 4 31B by 11.845.533.7+11.8
AgentsGLM-4.7-Flash
- GDPValGLM-4.7-Flash by 10.9616.9+10.9
- BrowseCompGLM-4.7-Flash by 5.83742.8+5.8
ReasoningGemma 4 31B
- GPQA DiamondGemma 4 31B by 27.685.758.1+27.6
- Humanity's Last ExamGemma 4 31B by 1623.67.6+16
- CritPtGemma 4 31B by 1.11.40.3+1.1
FactsGemma 4 31B
- AA-Omniscience · Non-hallucinationGemma 4 31B by 8.9156.1+8.9
- AA-Omniscience · AccuracyGemma 4 31B by 3.82016.1+3.8
- Vectara HHEM hallucination ratelower is betterGemma 4 31B by 1.97.49.3+1.9
Following instructionsGemma 4 31B
- IFBenchGemma 4 31B by 14.875.660.8+14.8
Other results10 tests, not counted
Tests outside the eight areas. They are not counted above: several are summary scores built from other tests, or the same test under another name.
- AA Agentic IndexGLM-4.7-Flash by 39.36.746+39.3
- τ²-Bench Telecom (AA run)GLM-4.7-Flash by 38.959.998.8+38.9
- Artificial Analysis Coding IndexGemma 4 31B by 17.543.425.9+17.5
- AA-OmniscienceGemma 4 31B by 14.7-47.9-62.6+14.7
- GPQA (unspecified)Gemma 4 31B by 9.184.375.2+9.1
- vectara_answer_rateGemma 4 31B by 8.410091.6+8.4
- vectara_avg_summary_lengthGemma 4 31B by 475.871.8+4
- τ²-BenchGLM-4.7-Flash by 2.676.979.5+2.6
- vectara_factual_consistencyGemma 4 31B by 1.992.690.7+1.9
- AA Intelligencetie14.714.9tie
Questions people ask
Which is better, Gemma 4 31B or GLM-4.7-Flash?
Gemma 4 31B wins five of the six areas where both have results: coding, reasoning, facts, long documents and following instructions. GLM-4.7-Flash wins agents, and costs 15% less.
Which is better for coding?
Gemma 4 31B. It wins 3 of the 4 coding tests both models report; GLM-4.7-Flash wins 1.
Which is cheaper?
Gemma 4 31B costs $0.15 per million input tokens and $0.40 per million output tokens; GLM-4.7-Flash costs $0.07 and $0.40. That makes GLM-4.7-Flash about 15% cheaper for the same work.
How do you compare the two?
We use the 24 benchmark tests both models have published scores on. The verdict counts the 14 tests in the eight capability areas, and a gap under one point (ten on rating-style scales) counts as a tie. The other 10 are listed but not counted, because several are summary scores or repeat a test. Each score is the one shown on the model's own page.