GLM 4.7 vs GLM 5

Z.ai · China  |  Z.ai · China · Updated June 2026

Quick verdict

Both are Z.ai models. GLM 5 is the newer, generally stronger default; reach for GLM 4.7 when its lower price or a specific cost or latency profile matters more than the latest capabilities.

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

Side-by-side specs

SpecGLM 4.7GLM 5
ProviderZ.ai (China) Z.ai (China)
ReleasedDecember 22, 2025 February 11, 2026
Context window200K (~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
Modalitiestext, code text, code
SWE-Bench Verified73.8% 77.8%
MRCR v2 @ 1MNot 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 analysing very long documents or codebases

GLM 4.7

Larger 200K window fits more in one prompt.

Anyone whose priority is genuinely permissive open weights — an mit-licensed 358b mixture-of-experts with no commercial restrictions

GLM 4.7

It is specifically built for that.

Anyone whose priority is agentic planning and long-horizon coding workflows

GLM 5

That is its strongest area.

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, it is built for 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, and cheap long-running agent loops thanks to aggressive prompt caching.

Its trade-offs are real: 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, and 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 11, 2026 by Z.ai, it is built for agentic planning and long-horizon coding workflows, complex systems design and backend reasoning, iterative self-correction on autonomous tasks, and open weights under the permissive MIT license.

Its trade-offs: 200K context trails 1M-context rivals, and 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 the same training philosophy and ecosystem — the decision is purely tier vs. cost. GLM 5 is the more capable, more recent option; the other earns its place only when its price or latency profile fits a specific job better. Most teams should default to GLM 5 and drop down only with a concrete reason.

Want both GLM 4.7 and GLM 5 without two subscriptions? LumiChats gives you these plus 40+ models under one ₹69/day pass (about $1/day) — draft with one, cross-check with the other.

See pricing

Frequently 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?

Since both are Z.ai models, the newer one (GLM 5) is usually the better default unless you need a specific cost or latency profile from the other.

Which is newer, GLM 4.7 or GLM 5?

GLM 5 — released February 11, 2026, about 51 days after GLM 4.7.

Related comparisons

Specifications and benchmarks reflect publicly reported figures as of June 2026 and may change as providers release updates. Always verify on your own workload.