Compare / Gemma 4 31B vs GLM-4.7-Flash

Gemma 4 31B vs GLM-4.7-Flash

Updated November 2026

Verdict

Gemma 4 31B scores higher on the Small LM Index: 70.1 vs 66.1, although their likely ranges overlap, so the lead is not certain. On the 6 benchmarks both labs report, Gemma 4 31B wins 3 and GLM-4.7-Flash wins 3. Both need about 21.9 GB of memory at 4-bit quantization. Their API prices are similar: $0.16 and $0.15 per million tokens.

Pick Gemma 4 31B if…

  • you want the strongest model overall
  • you work with long documents
  • you need image input
  • you want the more widely used model (more quantized builds and community support)

Pick GLM-4.7-Flash if…

  • you need math and reasoning
  • you build agents that call tools

Specifications

Gemma 4 31BGLM-4.7-Flash
Small LM Index70.1 (likely 69–72)66.1 (likely 63–70)
LabGoogle · United StatesZ.ai (GLM) · China
Released2026-04-022026-01-19
Parameters30.7B (dense)31B (3B active, MoE)
Memory at 4-bit~21.9 GB~20.4 GB
Context window256K tokens200K tokens
Inputtext, imagetext
ReasoningHybrid (thinking on/off)Always thinks
LicenseApache-2.0MIT
API price / 1M tokens$0.16 ($0.10 in, $0.34 out)$0.15 ($0.061 in, $0.40 out)
Hugging Face downloads (30 days)8M956.4K

Benchmarks

Higher is better. Bold marks the winner where both labs report a score. ≈ marks the index model's estimate for a score that wasn't reported, ✓ an independent measurement and * a score measured by another lab.

BenchmarkGemma 4 31BGLM-4.7-Flash
MMLU-Pro Knowledge85.2≈ 82
GPQA Diamond Knowledge84.375.2
Humanity's Last Exam Reasoning19.514.4
AIME Math89.291.6
LiveCodeBench Coding80.064.0
SWE-bench Verified Coding52.0*59.2
Terminal-Bench Agentic42.9*—
τ²-Bench Agentic76.979.5
MMMU-Pro Vision76.9—

Scores are mostly reported by each lab with its own settings, so small gaps are noise. See the methodology. Open in the interactive comparison to add more models.

Questions

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

Gemma 4 31B scores higher on the Small LM Index: 70.1 vs 66.1, although their likely ranges overlap, so the lead is not certain. On the 6 benchmarks both labs report, Gemma 4 31B wins 3 and GLM-4.7-Flash wins 3.

Which is cheaper to run?

Their API prices are similar: $0.16 and $0.15 per million tokens. Both need about 21.9 GB of memory at 4-bit quantization.

Which has the longer context window?

Gemma 4 31B has the longer context window: 256K tokens against 200K.

Can I use Gemma 4 31B and GLM-4.7-Flash commercially?

Gemma 4 31B is released under Apache-2.0 and GLM-4.7-Flash under MIT. Apache 2.0 and MIT allow commercial use; other licenses can add conditions, so read the license before shipping a product.

Related comparisons

Guides featuring these models