28 Nov 2026, Sat

Z.ai Unveils GLM-5.4: A Paradigm Shift in AI with Looped Transformer Architecture and Generalized Coding Capabilities

Z.ai has officially launched GLM-5.4, a groundbreaking flagship model that redefines the landscape of artificial intelligence through its innovative "Loop Transformer" architecture. This cutting-edge design marks a significant departure from conventional Transformer models by enabling layers to be reused multiple times within a single processing pass, rather than simply stacking new layers. This architectural innovation allows GLM-5.4 to achieve greater computational depth and process more information per token without an increase in the number of parameters. The concept of a looped transformer is not entirely new; Thinking Machines Lab recently showcased a similar approach with its Inkling 2 Mini model, which gained attention for its ability to run locally on laptops.

GLM-5.4 distinguishes itself further by integrating vision capabilities, a significant expansion from its text-centric predecessors. Moreover, the model is engineered to excel in what Z.ai terms "Generalized Coding." This ambitious concept extends the application of code generation and understanding beyond traditional software development to encompass complex engineering and design disciplines, including mechanical design and 3D modeling. This expansion signifies a move towards AI that can directly interface with and contribute to the physical world of design and manufacturing. The release of GLM-5.4 follows closely on the heels of GLM-5.3, which Z.ai introduced in August, boasting advanced cybersecurity features and reportedly uncovering a significant vulnerability in the Cursor code editor.

Currently, GLM-5.4 is accessible through Z.ai’s specialized offerings: the GLM Coding Plan, ZCode, and Z.ai Chat. While API access is slated for release soon, Z.ai has indicated that open weights will follow only after rigorous safety hardening measures are implemented, with no specific timeline provided for this crucial step. Z.ai has published a win-rate chart comparing GLM-5.4 against three other models, though the company has not detailed the specific evaluation methodology employed. The most substantial controlled benchmark evidence presented by Z.ai stems from a separate test conducted on a 30 billion parameter model, and the company candidly acknowledges that GLM-5.4 can, at times, fall into overly lengthy reasoning loops.

The Mechanics of GLM-5.4: Unpacking the Looped Transformer Efficiency

Z.ai categorizes large-scale software engineering, advanced cybersecurity, intricate 3D modeling, and sophisticated physical control systems as "ultra-long-chain reasoning tasks." These tasks are characterized by the necessity of following multi-step causal chains while meticulously maintaining global logical consistency. The company asserts that simply increasing the number of parameters or relying on extensive data memorization is insufficient to tackle these complex challenges effectively.

In contrast to conventional Transformers, which process each layer only once during a forward pass, GLM-5.4 employs a novel approach. It directs intermediate representations through the same set of layers twice. This iterative processing significantly enhances the model’s computational depth and its ability to refine understanding without the need to expand the parameter count, a common and often resource-intensive method in AI development. The foundational concept of layer reuse was explored as far back as 2018 with the Universal Transformer, though much of the subsequent research has focused on smaller-scale models. GLM-5.4 scales this principle to its 750 billion parameter model by looping 28 layers of the GLM-5 base model for two iterations. This adaptation was achieved through continued training on an already pre-trained model.

The iterative looping process, while powerful, introduces its own set of computational costs. To strike a balance between performance gains and deployment expenses, Z.ai has implemented three key architectural modifications:

  • Gated Progressive Updates: The repeated updating of a model’s internal representations can sometimes lead to instability. To mitigate this, GLM-5.4 incorporates per-token gates that regulate the extent to which each iteration modifies these representations. Z.ai explains that during the first pass, the model builds global context and makes conservative updates. The second pass then unlocks these gates, allowing for more comprehensive updates. Crucially, these gates dynamically adjust the step size based on token difficulty; more challenging tokens receive more aggressive updates in the initial pass, ensuring a more nuanced learning process.

  • Hybrid KV Cache: Maintaining a complete Key-Value (KV) cache for each iteration of the looping process can be memory-intensive. GLM-5.4 optimizes this by reusing the sparse KV cache generated during the first pass. For the second pass, it limits additional storage requirements to a sliding window mechanism, significantly reducing memory overhead.

  • Sparse Attention Index Reuse: The attention mechanism is a core component of Transformers. In GLM-5.4, the second loop of the model reuses the attention indices generated by the first loop’s indexer. This clever optimization avoids the computational cost of a second indexing pass. Z.ai’s experimental results indicate that this approach yields performance nearly identical to recomputing indices on every pass, demonstrating substantial efficiency gains.

    Z.ai's GLM-5.4 aims to match models up to four times its size by running 28 layers twice

Early Performance Indicators and Lingering Questions

Z.ai claims that GLM-5.4 achieves intelligence levels comparable to models with 2 to 3 trillion parameters, though the methodology behind this assertion has not been elaborated upon. The most concrete evidence of its performance comes from a 30 billion parameter test model. In this controlled environment, the looped version of the model required approximately 10% more training compute compared to a non-looped baseline of the same size. Z.ai reports the most significant improvements in areas such as mathematics, scientific reasoning, and long-context tasks. Furthermore, the model demonstrated shorter average outputs, with an approximate 15% improvement on the MMLU-Pro benchmark and a 12% improvement on GPQA-Diamond. It is important to note that these specific performance metrics were derived from the smaller test model, not GLM-5.4 itself.

Community Reception: Praises for Bug Finding, Concerns Over Speed and Competitive Gaps

Early feedback from developers who have begun testing GLM-5.4 highlights its strengths in code review and security testing, alongside criticisms regarding its speed and the performance gap compared to leading models. AICodeKing, in a post on X, ranked GLM-5.4 seventh on his KingBench 4 coding benchmark. At its maximum reasoning effort, GLM-5.4 required a considerable 431 minutes to complete the tests, a stark contrast to the 109 minutes taken by Google’s Gemini 4 Neon. This difference is further underscored by the number of steps involved: 1,128 for GLM-5.4 versus 244 for Gemini 4 Neon. AICodeKing’s assessment suggested that while GLM-5.4 might not be ideal for direct, high-speed task execution, its utility as a code reviewer, capable of identifying complex architectural issues and security vulnerabilities, is highly valuable.

Migel Tissera, another tester, employed GLM-5.4 as a "black-box attacker" against a simulated private lab environment. According to his post on X, the model successfully executed a multi-step remote code execution chain, demonstrating its prowess in penetration testing and security assessment scenarios.

However, not all testers have been entirely convinced. Loktar expressed a strong opinion on X, stating that GLM-5.4 "is nowhere near Opus 5.5 not a single Open model is right now," indicating a perceived performance deficit compared to leading proprietary models. Darek Gusto, while welcoming the integrated vision capabilities and the increased quota, noted the absence of specific coding benchmark scores in the launch materials. In a post on X, Gusto humorously remarked that while he hoped his jaw would drop from GLM-5.4’s capabilities, it instead dropped "when I realized that even in the blog there are no coding benchmarks." A critical perspective also emerged from Reddit’s r/LocalLLaMA community, where one user found GLM-5.4 to be "absolutely garbage" for any application outside of coding, and further complained that the model frequently expends computational resources on "reasoning about whether something is OK" within its chain of thought, leading to token wastage.

Pricing, Coding Plan, and Availability: A Glimpse into the Future

GLM-5.4 is presently accessible through Z.ai’s dedicated platforms: the GLM Coding Plan, ZCode, and Z.ai Chat. For users operating on weekly quota plans, Z.ai has indicated that GLM-5.4 benefits from a quota that is 1.5 times that of GLM-5.3, offering users more extensive usage.

According to Z.ai’s developer documentation, GLM-5.4 demonstrates enhanced input versatility, accepting text, image, video, and file inputs, while its output remains text-based. It boasts an impressive 1 million token context window and a maximum output length of 128,000 tokens. This represents a significant upgrade from its predecessor, GLM-5.3, which was limited to text-only inputs. Notably, the launch announcement did not include any vision benchmark scores.

Details regarding general API pricing have not yet been disclosed. Z.ai has stated that API access will be made available soon, following the completion of a comprehensive security assessment. For context, Z.ai’s existing documentation lists GLM-5.3 pricing at $1.40 per million input tokens, with cached input priced at 26 cents and output tokens at $4.40 per million. GLM-5.4’s pricing structure is not yet available on this page.

The release of open weights for GLM-5.4 remains a significant question mark, with Z.ai withholding any definitive release date or details regarding the specific licensing terms. The company has stated its commitment to responsible open-sourcing: "We plan to open-source the model weights responsibly after completing necessary safety hardening," a company representative affirmed. This cautious approach underscores Z.ai’s prioritization of safety and ethical deployment of its advanced AI technologies.

By admin