GLM 4.7 vs GLM 5
Z.ai · China | Z.ai · China · Updated July 2026
Quick verdict
Both are Z.ai models, so this is a choice of tier. GLM 5 is the newer release (February 12, 2026), after GLM 4.7 (December 22, 2025). GLM 4.7 costs less ($0.6/$2.2 per 1M tokens vs $1/$3.2 per 1M tokens), so it suits high-volume work; test GLM 5 on your hardest tasks before paying more.
GLM 4.7 and GLM 5 are both Z.ai models, so the real question is not which lab to trust but which tier fits your workload and budget. GLM 4.7 is an MIT-licensed 358B open mixture-of-experts with strong 73.8% SWE-Bench Verified coding — but two generations behind GLM 5.2. GLM 5 is Z.ai's flagship open-weight (MIT) MoE foundation model, engineered for complex systems design and long-horizon agentic coding. Since both come from the same lab, the comparison below focuses on the tier-and-cost trade-offs that actually separate them.
Key differences at a glance
- ▸Price: GLM 4.7 is about 1.7× cheaper on input ($0.6/$2.2 per 1M tokens vs $1/$3.2 per 1M tokens) — modest, but it adds up at steady volume.
- ▸Context window: 200K vs 200K — within a few percent of each other, so treat this as a tie and test on your own long inputs, since usable recall varies by model.
- ▸Coding: GLM 5 leads SWE-Bench Verified by 4.0 points (73.8% vs 77.8%) — a real edge on hard, real-world software tasks.
- ▸Recency: GLM 5 is the newer model by about 52 days (released February 12, 2026), usually meaning fresher training data and capabilities.
Side-by-side specs
| Spec | GLM 4.7 | GLM 5 |
|---|---|---|
| Provider | Z.ai (China) | Z.ai (China) |
| Released | December 22, 2025 | February 12, 2026 |
| Context window | 200K (~304 pages) | 200K (~300 pages) |
| Price (in/out) | $0.6/$2.2 per 1M tokens | $1/$3.2 per 1M tokens |
| Open weight? | Yes — self-hostable | Yes — self-hostable |
| Modalities | text, code | text, code |
| SWE-Bench Verified | 73.8% | 77.8% |
| MRCR v2 @ 1M | Not published | Not published |
Who wins what
Genuinely permissive open weights — an MIT-licensed 358B mixture-of-experts with no commercial restrictions
GLM 4.7
An MIT-licensed 358B open mixture-of-experts with strong 73.8% SWE-Bench Verified coding — but two generations behind GLM 5.2 — and it runs cheaper at $0.6/$2.2 per 1M tokens.
Strong agentic coding for the price — 73.8% on SWE-Bench Verified undercut most closed frontier models at launch
GLM 4.7
At $0.6/$2.2 per 1M tokens it undercuts GLM 5 ($1/$3.2 per 1M tokens), and that gap compounds at volume.
An unusually generous 128K maximum output, which suits bulk refactors and long generation
GLM 4.7
GLM 4.7 lists an unusually generous 128K maximum output, which suits bulk refactors and long generation among its strengths; GLM 5 does not.
Agentic planning and long-horizon coding workflows
GLM 5
It scores 77.8% on SWE-Bench Verified against GLM 4.7's 73.8% — a 4-point edge on real repository work.
Complex systems design and backend reasoning
GLM 5
Z.ai's flagship open-weight (MIT) MoE foundation model, engineered for complex systems design and long-horizon agentic coding — and it leads SWE-Bench Verified 77.8% to 73.8%.
Iterative self-correction on autonomous tasks
GLM 5
Z.ai's flagship open-weight (MIT) MoE foundation model, engineered for complex systems design and long-horizon agentic coding — and it is the newer of the two.
Lowest cost at scale
GLM 4.7
At $0.6/$2.2 per 1M tokens, it is the cheaper of the two — the gap dominates the bill on high-volume workloads.
Which should you pick?
A cost-sensitive startup shipping high volume
→ GLM 4.7
At $0.6/$2.2 per 1M tokens it undercuts GLM 5, and on millions of tokens that margin decides the monthly bill.
Someone who wants the most recent release
→ GLM 5
Released February 12, 2026, after GLM 4.7 (December 22, 2025).
If this matters most: Genuinely permissive open weights — an MIT-licensed 358B mixture-of-experts with no commercial restrictions
→ GLM 4.7
This is GLM 4.7's main documented strength.
If this matters most: Agentic planning and long-horizon coding workflows
→ GLM 5
This is GLM 5's main documented strength.
GLM 4.7: where it fits
An MIT-licensed 358B open mixture-of-experts with strong 73.8% SWE-Bench Verified coding — but two generations behind GLM 5.2. Released December 22, 2025 by Z.ai.
Strengths: Genuinely permissive open weights — an MIT-licensed 358B mixture-of-experts with no commercial restrictions; Strong agentic coding for the price — 73.8% on SWE-Bench Verified undercut most closed frontier models at launch; An unusually generous 128K maximum output, which suits bulk refactors and long generation; Cheap long-running agent loops thanks to aggressive prompt caching.
Trade-offs: Two generations behind — GLM 5, 5.1 and 5.2 have all shipped since, and new builds should default to those; Its Verified lead narrows sharply on harder evaluations like SWE-Bench Pro; Text-only with no vision, and self-hosting a 358B model is a serious hardware commitment. At $0.6 in / $2.2 out per million tokens, it sits in the budget price band.
GLM 5: where it fits
Z.ai's flagship open-weight (MIT) MoE foundation model, engineered for complex systems design and long-horizon agentic coding. Released February 12, 2026 by Z.ai.
Strengths: Agentic planning and long-horizon coding workflows; Complex systems design and backend reasoning; Iterative self-correction on autonomous tasks; Open weights under the permissive MIT license.
Trade-offs: 200K context trails 1M-context rivals; Quickly superseded by GLM-5.1 and GLM-5.2. At $1 in / $3.2 out per million tokens, it sits in the budget price band.
The bottom line for this matchup
Because GLM 4.7 and GLM 5 come from the same lab (Z.ai), they share an ecosystem, API and tooling, so the decision is mostly tier versus cost. Newer is not automatically stronger: a newer budget tier can still trail an older flagship on hard reasoning. Run your hardest real task through both, then use the cheaper one wherever its output is good enough.
Comparing models for real work? LumiChats puts 40+ leading AI models under one ₹69/day pass (about $1/day), so you can draft with one and cross-check with another without stacking subscriptions.
See pricingFrequently asked questions
Is GLM 4.7 or GLM 5 better for coding?
On SWE-Bench Verified, GLM 4.7 scores 73.8% and GLM 5 scores 77.8% — GLM 5 has the measurable edge.
Which is cheaper, GLM 4.7 or GLM 5?
GLM 4.7 is cheaper — $0.6/$2.2 per 1M tokens vs $1/$3.2 per 1M tokens, roughly 1.7× apart on input.
Which has the bigger context window?
Effectively neither — 200K vs 200K is a difference of a few percent. Remember advertised ≠ usable: recall typically degrades before the ceiling.
Should I upgrade from GLM 4.7 to GLM 5?
Not automatically. Both are Z.ai models, and GLM 5 is the newer one, but they may be different tiers: $0.6/$2.2 per 1M tokens for GLM 4.7 vs $1/$3.2 per 1M tokens for GLM 5. Run one real task through both and switch only if the result justifies the price.
Which is newer, GLM 4.7 or GLM 5?
GLM 5 — released February 12, 2026, about 52 days after GLM 4.7.
Related comparisons
New model matchups
Sources
Specifications and benchmarks reflect publicly reported figures as of July 2026 and may change as providers release updates. Always verify on your own workload.