Model Comparison

Gemma 4 31B vs GLM-5.2Which is better in 2026?

GLM-5.2 significantly outperforms across most benchmarks. Gemma 4 31B is 7.6x cheaper per token.

Verdict: Gemma 4 31B vs GLM-5.2 — which is better?

Gemma 4 31B (by Google) and GLM-5.2 (by Zhipu AI) are two of the AI models people compare most. Here is how they stack up on benchmarks, price and capabilities, and which one to pick in 2026.

Gemma 4 31B outperforms in 0 benchmarks, while GLM-5.2 is better at 3 benchmarks (AIME 2026, GPQA, Humanity's Last Exam). GLM-5.2 significantly outperforms across most benchmarks.

On price, Gemma 4 31B is roughly 7.6x cheaper per token on a blended 3:1 input/output basis, which adds up quickly at production volume.

GLM-5.2 also accepts a larger context window (1,048,576 input tokens), making it the stronger choice for long documents and large codebases.

Choose Gemma 4 31B if…

  • cost matters — it's about 7.6x cheaper per token

Choose GLM-5.2 if…

  • you want the strongest raw capability — it leads on 3 of 3 shared benchmarks
  • you process long inputs — it offers a 1,048,576 token context window
  • you want the most recent training data — it shipped Jun 2026

Performance Benchmarks

Comparative analysis across standard metrics

3 benchmarks

Gemma 4 31B outperforms in 0 benchmarks, while GLM-5.2 is better at 3 benchmarks (AIME 2026, GPQA, Humanity's Last Exam).

GLM-5.2 significantly outperforms across most benchmarks.

Fri Jul 17 2026 • llm-stats.com

Arena Performance

Human preference votes

Pricing Analysis

Price comparison per million tokens

Gemma 4 31B costs less

For input processing, Gemma 4 31B ($0.13/1M tokens) is 7.3x cheaper than GLM-5.2 ($0.95/1M tokens).

For output processing, Gemma 4 31B ($0.38/1M tokens) is 7.9x cheaper than GLM-5.2 ($3.00/1M tokens).

In conclusion, GLM-5.2 is more expensive than Gemma 4 31B.*

* Using a 3:1 ratio of input to output tokens

Lowest available price from all providers
Fri Jul 17 2026 • llm-stats.com
Google
Gemma 4 31B
Input tokens$0.13
Output tokens$0.38
Best providerDeepinfra
Zhipu AI
GLM-5.2
Input tokens$0.95
Output tokens$3.00
Best providerDeepinfra
Notice missing or incorrect data?Start an Issue

Model Size

Parameter count comparison

722.3B diff

GLM-5.2 has 722.3B more parameters than Gemma 4 31B, making it 2352.8% larger.

Google
Gemma 4 31B
30.7Bparameters
Zhipu AI
GLM-5.2
753.0Bparameters
30.7B
Gemma 4 31B
753.0B
GLM-5.2

Context Window

Maximum input and output token capacity

GLM-5.2 accepts 1,048,576 input tokens compared to Gemma 4 31B's 262,144 tokens. Both models can generate responses up to 131,072 tokens.

Google
Gemma 4 31B
Input262,144 tokens
Output131,072 tokens
Zhipu AI
GLM-5.2
Input1,048,576 tokens
Output131,072 tokens
Fri Jul 17 2026 • llm-stats.com

Input Capabilities

Supported data types and modalities

Gemma 4 31B supports multimodal inputs, whereas GLM-5.2 does not.

Gemma 4 31B can handle both text and other forms of data like images, making it suitable for multimodal applications.

Gemma 4 31B

Text
Images
Audio
Video

GLM-5.2

Text
Images
Audio
Video

License

Usage and distribution terms

Gemma 4 31B is licensed under Apache 2.0, while GLM-5.2 uses MIT.

License differences may affect how you can use these models in commercial or open-source projects.

Gemma 4 31B

Apache 2.0

Open weights

GLM-5.2

MIT

Open weights

Release Timeline

When each model was launched

Gemma 4 31B was released on 2026-04-02, while GLM-5.2 was released on 2026-06-16.

GLM-5.2 is 3 months newer than Gemma 4 31B.

Gemma 4 31B

Apr 2, 2026

3 months ago

GLM-5.2

Jun 16, 2026

1 months ago

2mo newer

Knowledge Cutoff

When training data ends

Gemma 4 31B has a documented knowledge cutoff of 2025-01-01, while GLM-5.2's cutoff date is not specified.

We can confirm Gemma 4 31B's training data extends to 2025-01-01, but cannot make a direct comparison without GLM-5.2's cutoff date.

Gemma 4 31B

Jan 2025

GLM-5.2

Provider Availability

Gemma 4 31B is available from DeepInfra, FriendliAI, Novita, Together. GLM-5.2 is available from DeepInfra, Fireworks, FriendliAI, Novita, Together, ZAI.

Gemma 4 31B

deepinfra logo
Deepinfra
Input Price:Input: $0.13/1MOutput Price:Output: $0.38/1M
friendli logo
FriendliAI
Input Price:Input: $0.14/1MOutput Price:Output: $0.40/1M
novita logo
Novita
Input Price:Input: $0.14/1MOutput Price:Output: $0.40/1M
together logo
Together
Input Price:Input: $0.39/1MOutput Price:Output: $0.97/1M

GLM-5.2

deepinfra logo
Deepinfra
Input Price:Input: $0.95/1MOutput Price:Output: $3.00/1M
fireworks logo
Fireworks
Input Price:Input: $1.40/1MOutput Price:Output: $4.40/1M
friendli logo
FriendliAI
Input Price:Input: $1.40/1MOutput Price:Output: $4.40/1M
novita logo
Novita
Input Price:Input: $1.40/1MOutput Price:Output: $4.40/1M
together logo
Together
Input Price:Input: $1.40/1MOutput Price:Output: $4.40/1M
z logo
Unknown Organization
Input Price:Input: $1.40/1MOutput Price:Output: $4.40/1M
* Prices shown are per million tokens

Outputs Comparison

Notice missing or incorrect data?Start an Issue discussion

Key Takeaways

Supports multimodal inputs
Less expensive input tokens
Less expensive output tokens
Larger context window (1,048,576 tokens)
Higher AIME 2026 score (99.2% vs 89.2%)
Higher GPQA score (91.2% vs 84.3%)
Higher Humanity's Last Exam score (54.7% vs 26.5%)

Detailed Comparison

Interactive Arena

Judge for yourself.

Run your own prompts against Gemma 4 31B and GLM-5.2 side-by-side, then vote on the output you prefer.

Gemma 4 31B
✓ Preferred
GLM-5.2
Open in Playground
AI Model Comparison Table
Feature
Google
Gemma 4 31B
Zhipu AI
GLM-5.2

FAQ

Common questions about Gemma 4 31B vs GLM-5.2.

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

GLM-5.2 significantly outperforms across most benchmarks. Gemma 4 31B is made by Google and GLM-5.2 is made by Zhipu AI. The best choice depends on your use case — compare their benchmark scores, pricing, and capabilities above.

How does Gemma 4 31B compare to GLM-5.2 in benchmarks?

Gemma 4 31B scores AIME 2026: 89.2%, MMMLU: 88.4%, t2-bench: 86.4%, MathVision: 85.6%, MMLU-Pro: 85.2%. GLM-5.2 scores AIME 2026: 99.2%, HMMT 2025: 94.4%, HMMT Feb 26: 92.5%, GPQA: 91.2%, IMO-AnswerBench: 91.0%.

Is Gemma 4 31B cheaper than GLM-5.2?

Gemma 4 31B is 7.3x cheaper for input tokens. Gemma 4 31B costs $0.13/M input and $0.38/M output via deepinfra. GLM-5.2 costs $0.95/M input and $3.00/M output via deepinfra.

What are the context window sizes for Gemma 4 31B and GLM-5.2?

Gemma 4 31B supports 262K tokens and GLM-5.2 supports 1.0M tokens. A larger context window lets you process longer documents, conversations, or codebases in a single request.

What are the main differences between Gemma 4 31B and GLM-5.2?

Key differences include context window (262K vs 1.0M), input pricing ($0.13 vs $0.95/M), multimodal support (yes vs no), licensing (Apache 2.0 vs MIT). See the full comparison above for benchmark-by-benchmark results.

Who makes Gemma 4 31B and GLM-5.2?

Gemma 4 31B is developed by Google and GLM-5.2 is developed by Zhipu AI.