AI
AIBeginner

GLM-5.4 Explained: Z.ai's Loop Transformer, Vision Coding Plan, and the Missing Benchmarks

Technical breakdown of Z.ai’s GLM-5.4: how its 28-layer 2x Loop Transformer works, what changes in the GLM Coding Plan (1M context, native vision, +50% quota), why latency spikes on max effort, and why benchmarks and open weights are still missing.

Cover image: GLM-5.4 Explained: Z.ai's Loop Transformer, Vision Coding Plan, and the Missing Benchmarks
Contents

Z.ai (formerly Zhipu AI) dropped GLM-5.4 on November 23, 2026, in an unusual way: straight into the GLM Coding Plan model selector before publishing a formal model card, Hugging Face weights, or a frontier benchmark table.

Yet the architectural bet behind it is one of the most interesting shifts in flagship coding models right now: GLM-5.4 is Z.ai’s first flagship built as a Loop Transformer — trading raw inference speed for deeper multi-step reasoning, native vision, and a 50% quota boost inside coding agents.

GLM-5.4 Loop Transformer 3D editorial cover showing a luminous dual-pass crystal ring and 1M context coding plan highlights.

The short verdict: Use GLM-5.4 inside the GLM Coding Plan when you need deep debugging, screenshot-to-UI iteration (native vision), or complex script/CAD generation and can tolerate slower responses. Stay on GLM-5.3 (or faster models) if you need pay-as-you-go API billing, self-hosted open weights, or snappy low-latency edits.

What Is GLM-5.4’s Loop Transformer Architecture?

For the past several generations, frontier labs bought reasoning depth by stacking more unique layers and scaling total parameter counts toward multi-trillion weights. That makes models expensive to store in GPU memory and slow to deploy.

GLM-5.4 takes a different route — the same recurrent paradigm we analyzed in Inkling 2 Mini and Looped Transformers, scaled up to Z.ai’s flagship tier:

Diagram comparing a standard dense transformer against GLM-5.4’s 28-layer 2x Loop Transformer with gated progressive updates and hybrid KV caching.
GLM-5.4 reuses 28 layers twice per forward pass using per-token gating and hybrid KV caching, simulating deeper reasoning without doubling stored weights.
  • 28 layers looped twice: Built on the ~750B-scale GLM-5 base architecture, GLM-5.4 routes a 28-layer block through two iterations per forward pass using shared weights.
  • Gated progressive updates: Simply feeding hidden states back into the same weights can cause activation values to explode or drift. Z.ai adds per-token gates that regulate how much of each second-pass update is written back into the residual stream.
  • Memory & KV optimizations: Hybrid KV caching and reused sparse attention indices keep the 1M-token context window (glm-5.4[1m]) and 128K output limit practical without blowing up KV-cache memory linearly with loop depth.

The critical engineering distinction: looping saves weight memory, not compute FLOPs. Every token still pays the arithmetic cost of running those 28 layers twice. You get reasoning depth closer to much larger 2T–3T parameter models, at the cost of higher per-token latency.

In Z.ai’s controlled iso-parameter 30B ablation study (with thinking mode enabled and roughly 10% extra training compute), adding the loop mechanism after long-context fine-tuning pushed AIME25 from 19.17 to 30.42 (+11.3 points) — showing that depth via recurrence pays off disproportionately on multi-step mathematical and algorithmic reasoning.

What Actually Changes in the GLM Coding Plan

On launch day, Z.ai positioned GLM-5.4 around “Generalized Coding” — software engineering plus visual, game, video-script, and mechanical 3D/CAD generation (such as FreeCAD Python scripting for multi-axis robotic mechanisms and generative SVG layouts). Three practical changes matter immediately if you use coding harnesses like Claude Code, Codex, OpenCode, or Cline:

  1. Native vision arrives on the flagship tier: Text-only GLM-5.3 could not inspect UI screenshots, rendered layouts, or architecture diagrams directly. GLM-5.4 accepts image inputs natively inside the coding loop — closing the feedback cycle between code generation and visual inspection.
  2. +50% weekly token quota (1.5× multiplier): Subscribers on Coding Plan weekly tiers (Lite, Pro, Max) receive 50% more available quota for GLM-5.4 relative to GLM-5.3.
  3. 1M context window on demand (glm-5.4[1m]): Long repositories and multi-file refactors can target glm-5.4[1m] directly without switching models mid-session, while keeping standard glm-5.4 for tighter everyday loops.

Effort Playbook in Claude Code: Avoiding “Marathon Thinking” Timeouts

Early developer tests highlight a sharp operational trade-off. Because the Loop Transformer performs two full passes and pairs them with deep reasoning chains, GLM-5.4 frequently enters “marathon thinking loops” on non-trivial tasks — running noticeably slower than fast non-looped coding models like Gemini 4 Neon.

  • Use high / max effort for: Root-cause debugging across multiple services, race conditions, legacy query refactoring, FreeCAD/SVG geometry scripts, and screenshot-driven UI audits.
  • Lower effort (or switch to a fast model) for: Renaming symbols, writing unit-test boilerplate, small CSS tweaks, and quick PR copy edits. In Claude Code, leaving default max effort enabled on trivial prompts burns latency and risks client timeouts without improving output quality.

Two concrete workflows show the difference in practice:

  • Vision feedback loop (UI or CAD): Drop a screenshot of a clipped mobile layout or a misaligned FreeCAD bracket directly into glm-5.4 on high effort. Because vision is native, the model inspects the rendered defect itself and patches the exact CSS rule or geometry constraint without you translating coordinates into prose.
  • 1M context vs. fast inner loop: Switch to glm-5.4[1m] when you need to ingest a whole multi-service log dump or cross-repo migration plan in one prompt; drop back to standard glm-5.4 with reduced effort as soon as you move to file-by-file test fixes.

The Missing Benchmarks, API, and Open Weights

Unlike prior Z.ai launches, GLM-5.4 shipped without three things engineers usually check first:

  1. No official frontier benchmark table at launch: As both DataCamp and VentureBeat noted, Z.ai did not publish a model card or standard SWE-bench Verified / LiveCodeBench scorecards on day one — relying instead on win-rate charts without full methodology and internal 30B prototype ablations (+3.3 to +11.3 points, including 19.17 to 30.42 on AIME25). Independent trackers like Artificial Analysis have not scored it yet because public APIs and weights are absent; in early community runs such as KingBench 4, GLM-5.4 placed around 7th at max effort while emitting heavy “marathon thinking” token chains.
  2. No pay-as-you-go API yet: If you integrate models via metered API endpoints, GLM-5.3 ($1.40/M input, $4.40/M output) and GLM-5.3-Flash remain the active public pay-as-you-go options while GLM-5.4 undergoes safety hardening.
  3. No Hugging Face weights for self-hosting yet: Previous GLM-5 releases made open weights a headline feature for teams running local security and coding deployments. For GLM-5.4, Z.ai held weights back pending security and safety evaluations, with no firm public release date announced at launch.

When to Use GLM-5.4 vs. GLM-5.3 or Fast Models

Treat GLM-5.4 as a high-depth specialist inside Coding Plan subscriptions rather than a universal drop-in replacement for every prompt:

Decision matrix comparing GLM-5.4 Coding Plan, GLM-5.3 API/Open Weights, and fast non-looped models across latency, vision, open weights, and best use cases.
Choose GLM-5.4 for Coding Plan + vision debugging; stick with GLM-5.3 for metered APIs or open weights, and fast models for rapid edits.
When to Use GLM-5.4 vs. GLM-5.3 or Fast Models
Criterion GLM-5.4 GLM-5.3 Fast Non-Looped Models
Architecture 28-layer 2× Loop Transformer Standard non-looped MoE Standard / lightweight
Access at launch GLM Coding Plan only Public API + Open Weights Public API / Local
Quota / Pricing 1.5× (+50%) Coding Plan quota $1.40 / $4.40 per 1M tokens Low cost per token
Vision support Native (screenshots, UI, CAD) Text-only (Flash has vision) Varies
Context & output 1M context · 128K output Standard flagship context Fast TTFT
Best suited for Hard debugging, UI vision, CAD/3D Metered APIs, self-hosting Boilerplate, prose, quick edits

Community feedback also notes that GLM-5.4 feels heavily “code-maxxed”: its logic and code structure are unusually thorough, while general creative writing and casual prose can come across as rigid compared to general-purpose chat models.

Bottom Line

GLM-5.4 is a bold architectural milestone for Z.ai — proving that Loop Transformers can push flagship coding depth and earn a +50% Coding Plan quota bump without training a 3T-parameter monster. Just go in with eyes open: until Z.ai ships public benchmarks, metered APIs, and open weights, its sweet spot is strictly deep, vision-enabled coding inside Coding Plan subscriptions — with effort tuned down whenever speed matters more than marathon reasoning.

Frequently asked questions

How does GLM-5.4's Loop Transformer work?

Instead of training a 2T–3T parameter model with unique weights for every layer, GLM-5.4 takes a 28-layer block on a ~750B GLM-5 base and runs it twice per forward pass. Per-token gated progressive updates and hybrid KV caching keep activations stable while trading extra compute latency for deeper multi-step reasoning.

Is GLM-5.4 available via pay-as-you-go API or open weights on Hugging Face?

Not at launch. On November 23, 2026, Z.ai released GLM-5.4 exclusively to GLM Coding Plan subscribers (usable in Claude Code, Codex, OpenCode, and Cline). Pay-as-you-go API access and open weights are planned after safety evaluations complete; GLM-5.3 remains the active public API model.

What is the difference between GLM-5.3 and GLM-5.4?

GLM-5.4 adds native vision (screenshots, UI mockups), switches to a 2x Loop Transformer for deeper reasoning, supports a 1M context window with 128K output, and grants 1.5x (+50%) token quota on Coding Plan tiers. GLM-5.3 is text-only on the flagship tier and already has published open weights and pay-as-you-go API pricing.

Why is GLM-5.4 slow or timing out in Claude Code?

Looping layers twice plus deep internal reasoning ('marathon thinking loops') increases per-token latency. Coding tools like Claude Code often default to maximum effort, which forces unnecessary reasoning passes on simple edits. Lowering the effort setting for routine prompts prevents timeouts.

Did Z.ai publish official SWE-bench or frontier benchmarks for GLM-5.4?

No comprehensive frontier leaderboard scorecard or formal model card was published at launch. Z.ai supported the architectural shift with internal 30B ablation results (gains of ~3.3 to 11.3 points on reasoning and math benchmarks like AIME25), while independent third-party benchmarks are still emerging.

From the community

Discussion on Mastodon & Bluesky

Replies to this article from the open web, pulled in live. No ads, no tracking scripts.

Loading replies …
Reply on MastodonReply on Bluesky

Reply there — it shows up here automatically.

ENDE