Z.ai Introduces GLM-5.4: A New Era in AI with Loop Transformer Architecture

5 min read
Z.ai Introduces GLM-5.4: A New Era in AI with Loop Transformer Architecture - cover image
Summary

Z.ai announces GLM-5.4, combining a 750B-parameter foundation with a 28-layer Loop Transformer design, a 1M-token context window, generalized coding capabilities, and an open-weights roadmap.

For years, the dominant formula for pushing frontier intelligence in large language models has been straightforward: add more parameters, expand layer stacks, and pour massive compute into ever-larger training clusters. On November 23, 2026, Chinese AI lab Z.ai (Zhipu AI) directly challenged that playbook with its new flagship model, GLM-5.4. Built around a novel Loop Transformer architecture, GLM-5.4 increases internal computational depth without inflating total parameter counts, signaling a meaningful shift in how frontier reasoning models can be scaled.

Constructed on top of the roughly 750-billion-parameter GLM-5 base, GLM-5.4 was not trained from scratch as an isolated research experiment. Instead, Z.ai adapted its pretrained foundation into a looped design through continued training. According to the company, this conversion path delivers significantly stronger stability and training efficiency than building looped architectures from zero. More importantly, Z.ai reports that this architectural leap allows a 750B-scale model to achieve the reasoning depth and overall intelligence profile typically associated with massive 2-trillion to 3-trillion-parameter systems.

How Does the Loop Transformer Architecture Work?

In a conventional Transformer, input tokens pass sequentially through a fixed stack of unique layers exactly once per forward pass. Improving multi-step reasoning usually demands either adding billions of extra parameters or forcing the model to generate lengthy explicit chain-of-thought tokens at inference time. GLM-5.4's Loop Transformer changes that equation from the inside.

Specifically, 28 layers of the base model are executed across two iterations per forward pass using shared weights. Intermediate hidden states produced during the first pass are routed back into the same layer block for a second refinement pass. Conceptually, the mechanism mirrors how a human reads a dense technical specification or complex code block: the first pass captures the broad structure, while the second pass resolves subtle dependencies and causal chains. Because the network gains extra processing depth without duplicating weights, part of the reasoning workload shifts into implicit latent refinement rather than bloating explicit output tokens.

Memory and Speed Optimization at a 1M-Token Context

Looping layers multiple times is attractive in theory, yet it can easily trigger latency spikes and memory bottlenecks when operating over long contexts. GLM-5.4 supports a 1-million-token context window and up to 128K output tokens, and Z.ai pairs its looped design with three targeted systems optimizations to keep inference practical:

  • Per-token gating mechanisms: Dynamically regulate how much each token's representation updates during the second loop iteration, preserving compute efficiency where deep refinement is unnecessary.
  • Shared KV caches across loops: Prevent key-value memory footprints from multiplying as the same 28-layer block runs twice, keeping memory bandwidth manageable at scale.
  • Reused sparse attention indices: Cut redundant attention lookup overhead across iterations, allowing long-context inputs to remain responsive.

Together, these engineering choices enable GLM-5.4 to process massive repositories, lengthy technical documentation, images, and video inputs inside a single session without collapsing under hardware constraints.

Generalized Coding: From Software to 3D Design

Z.ai positions GLM-5.4 around a broader thesis it calls Generalized Coding—treating code not merely as an end product for web or backend engineering, but as a universal medium for solving multidisciplinary problems. With native multimodal support across text, files, images, and video, the model can translate UI screenshots, architectural diagrams, or visual references directly into multi-file software implementations.

Beyond conventional software engineering, GLM-5.4 demonstrates strong multi-step consistency in domains that rely on programmatic control. Use cases highlighted by Z.ai include scripting physics simulations, assembling playable game prototypes, automating video editing pipelines, and generating 3D scenes or mechanical assemblies by writing and executing Python scripts inside tools such as Blender and FreeCAD. Cybersecurity analysis and autonomous multi-step agent workflows also benefit directly from the model's tighter causal tracking across long contexts.

Early Benchmarks and the Deep-Thinking Tradeoff

Before scaling up to 750B parameters, Z.ai validated the Loop Transformer design on controlled 30B-parameter test models. Those experiments recorded substantial gains across mathematics, scientific reasoning, and long-context evaluations—including notable jumps on benchmarks such as GPQA-Diamond and MMLU-Pro—while simultaneously reducing output verbosity by 10 to 14 percent.

Early independent coding evaluations echo those findings. On King Bench 4, a challenging multi-application coding suite, GLM-5.4 achieved 33.2 out of 60 (55.3%) at its maximum effort tier. That represents a 5.7-point leap over GLM-5.3's 27.5 score, placing GLM-5.4 ahead of leading open-tier coding rivals at launch and tightly competitive with select closed commercial frontier models. However, both Z.ai's release notes and early reviewers highlight a practical tradeoff: on highly complex prompts, the model can enter intensive "marathon thinking" loops. Developers need to tune its effort levels—Low, Medium, High, and Max—according to latency budgets to avoid timeouts on tight workflows.

Access, API Availability, and the Open-Weights Roadmap

At launch, GLM-5.4 is rolling out through Z.ai's subscription-based GLM Coding Plans (Lite, Pro, and Max tiers), its agentic development environment ZCode, and compatibility endpoints that work with developer tools such as Claude Code. Standalone pay-as-you-go public API pricing has not yet been formally published.

For the open-source ecosystem, the biggest question remains weight availability. Unlike earlier releases such as GLM-5.2 and GLM-5.3, GLM-5.4's weights were not published on Hugging Face on day one. Z.ai has stated that it intends to open-source the model weights responsibly once additional safety hardening and evaluations conclude. Even ahead of that release, proving the Loop Transformer architecture at a 750B scale sends a clear signal across the industry: the next chapter of AI progress will rely as much on smarter architectural depth as on raw parameter count.

Weekly Newsletter

This week’s posts, in your inbox every Monday

A short summary of the posts published that week on AI, Claude Code, MCP and web development. No new posts, no email.

  • One email a week
  • No ads
  • One-click unsubscribe