· AI dev tools

Z.ai GLM-5.4 model rivals 3-trillion-parameter models using Loop Transformer architecture

The ability of Z.ai's 750-billion-parameter model to potentially match the reasoning capabilities of models boasting 2 to 3 trillion parameters is a central claim from the company.


This assertion stems from the release of GLM-5.4 on Monday, which incorporates a Loop Transformer architecture. This novel design functions by running the identical set of 28 layers multiple times, thereby boosting computational depth without increasing the model's parameter count.

Z.ai engineered this architecture specifically to handle demanding workloads involving coding and agentic tasks. The decision to modify a pre-existing model arose after earlier trials demonstrated that training looped Transformers from scratch yielded poorer results compared to conventional models using the same amount of pretraining compute. Implementing this layer repetition at scale presented challenges concerning activation stability and efficient attention caching.

To manage these issues, Z.ai incorporated per-token gates designed to govern updates to the residual stream, effectively preventing activation norms from escalating across the repeated passes. For context lengths reaching up to one million tokens, GLM-5.4 cleverly reuses the first iteration's KV cache while maintaining a distinct sliding window for the second pass, thereby circumventing the memory burden associated with duplicating the entire attention history. Furthermore, the model reuses sparse attention indices between iterations, a feature Z.ai noted had a negligible effect on its performance during testing. To further optimize the process, Z.ai engineered fused inference kernels to decrease the amount of intermediate memory reads and writes during the repeated execution of layers.

When assessing performance, Z.ai tested the architecture across models ranging from 1 billion to 750 billion parameters, though the granular benchmark data originates from the 30-billion-parameter version. In evaluations using this smaller model, the looped design surpassed a standard Transformer of equivalent size in tasks related to mathematics, scientific reasoning, and handling long contexts, even while demanding roughly 10% more training compute. Interestingly, the model also produced 10% to 14% fewer output tokens on benchmarks such as MMLU-Pro and GPQA-Diamond; Z.ai suggests these shorter responses are due to reasoning being processed within the repeated layers rather than requiring extra generated output tokens.

The company refers to its methodology as Generalized Coding, and the practical demonstrations of GLM-5.4 showcase its capabilities in areas like constructing games that feature physics and combat systems, developing 3D environments utilizing GLSL shaders, and designing a six-axis robotic arm within FreeCAD. Z.ai's head, Zixuan Li, mentioned on X that the model exhibits improvements over GLM-5.3 in tasks such as test writing, code QA, feature development, bug fixes, and terminal-based operations, although the underlying evaluations have not been made public by the organization.

Regarding its operational performance, Z.ai reports a throughput reaching as high as 200 tokens per second during periods of low usage, which dips to between 70 and 80 tokens per second when traffic is heavy. One developer initially observed speeds between 150 and 170 tokens per second, but later reported slowing down to 40 to 50 tokens per second alongside traffic errors. Comparative data on inference costs and latency remains unavailable for controlled review. Z.ai also concedes that GLM-5.4 sometimes dedicates an excessive amount of time to reasoning through problems, and the company is currently investigating adaptive computation to restrict additional iterations only to those tokens that genuinely require them. GLM-5.4 is currently accessible via the GLM Coding Plan, ZCode, and Z.ai Chat, offering vision support alongside a one-million-token context window.

Why it matters

This development presents a significant architectural shift in LLMs, allowing for increased computational depth without proportional increases in parameter count. Developers should watch how this efficiency impacts the practical deployment and resource demands of large-scale coding agents.

Earlier coverage

Related coverage

Also worth reading

  1. next.js 16.5.0-canary.62 released with switchyard updates, Turbopack fixes
  2. AWS releases API Portal, API Security, AI Security for API and AI endpoint protection
  3. Anthropic Claude Ship lets Claude review, fix, and approve routine pull requests
  4. Google DeepMind releases Lean 4 framework to verify Gemini 4 agents cutting quantum costs 290-fold
  5. Signal blocks screenshots on Apple, Google OS to protect data from AI agents