Z.ai's GLM-5.4 loops its layers to rival multi-trillion-parameter models
The 750B flagship runs 28 layers twice using shared caching and sparse attention, targeting developers interested in 'Generalized Coding' beyond traditional software.

Z.ai has introduced GLM-5.4, a 750-billion-parameter flagship model that reuses its own layers to achieve greater computational depth without inflating its parameter count. According to the company, the model reaches performance comparable to conventional models with 2 to 3 trillion parameters, marking a meaningful step toward what Z.ai calls "Generalized Coding."
Running layers twice to punch above its weight
Standard language models process text by passing it through each layer once. GLM-5.4 instead takes 28 layers and runs them twice, refining intermediate results on the second pass. According to Z.ai, this loop architecture makes the network effectively deeper without adding parameters. OpenAI has employed a similar approach since GPT-6 Astra, and the broader concept dates back to the Universal Transformer paper from 2018.
Z.ai retrained its GLM-5 base model — released in February — into this loop configuration rather than training from scratch. The company notes that loop models trained from scratch have so far performed worse than standard models under the same compute budget.
The conversion introduces a practical problem: simply overwriting intermediate states on the second pass can push values outside the range the layers were trained on. GLM-5.4 addresses this with dedicated gates for each token and pass, controlling how much new output flows back into the data stream. The model builds context cautiously on the first pass and writes changes back fully on the second, stepping in more strongly on difficult tokens during the first pass.
Keeping memory and compute costs in check
A second pass through the layers would normally double memory usage. Z.ai avoids this by having both passes share the KV cache — the temporary memory for previously processed tokens. The second pass stores its extra values only in a small local window, which the company says keeps overhead manageable even at a 1-million-token context.
On the compute side, GLM-5.4 uses sparse attention to select the most relevant earlier tokens upfront rather than scanning the full context each time. The second pass reuses the selection from the first rather than making a new one, yielding nearly identical results, according to Z.ai. The company reports throughput of up to 200 tokens per second off-peak and 70 to 80 tokens per second under load.
What the 30B test model shows — and what it doesn't
Z.ai tested the loop architecture on models ranging from 1 to 750 billion parameters before deploying it in the flagship. For a direct comparison, the team built a 30B loop model with the same parameter count as its baseline, giving the loop version roughly 10 percent more training compute.
The gains were uneven but notable on reasoning-heavy tasks:
- AIME25 (math): scores rose from 19.2 to 30.4 points
- GPQA-Diamond (expert science): up from 47.6 to 56.3 points
- AA-LCR (long-context): climbed from 40.3 to 47.7 points
- MMLU-Pro (knowledge): gained just over three points
- IFBench (instruction following): gained just over three points
Responses also got shorter — 14.9 percent on MMLU-Pro, 11.7 percent on GPQA-Diamond, and 2 percent on AIME25. Z.ai says part of the reasoning shifts out of the output tokens and into the loop's extra computational depth.
However, Z.ai has published no benchmark scores for the 750B model itself. The figures in its blog post come solely from the 30B test, and there are no independent evaluations from groups like Artificial Analysis. By Z.ai's own account, the model's biggest weakness is overly long reasoning phases where it gets stuck, though the company says the extended double-checking improves accuracy.
Generalized Coding and what to watch
Z.ai frames GLM-5.4 as the start of "Generalized Coding," where code becomes the foundation for tasks beyond traditional software development. To illustrate, the company showed a self-scored music video, a six-axis robot arm designed in FreeCAD, a complete game, and an interactive 3D scene built from mathematical geometry and custom shaders — all generated by the model.
The model is currently available through the GLM Coding Plan, the ZCode coding environment, and Z.ai Chat. An API is set to follow, with token pricing not yet announced. Z.ai plans to release the model weights after further safety testing and has also announced a much larger model expected soon.
At 750 billion parameters, GLM-5.4 targets the same tier as Kimi K3.1 Pro (2.8 trillion parameters) and Qwen3.8-Max (2.4 trillion parameters) — models more than three times as large. Its predecessor, GLM-5.3, drew all gains from post-training and had its weight release delayed due to strong vulnerability-finding abilities; Anthropic later found GLM-5.3 could build exploits nearly on par with Claude Mythos Preview.
For developers and creators evaluating frontier models, the loop architecture offers a different cost-performance trade-off worth monitoring as independent benchmarks emerge.
Earlier this year, Inkling 2 Mini's looped reasoning showed the same architecture running on a laptop, and researchers in Bonn demonstrated that looped transformers benefit from greater compute depth on math while everyday knowledge benefits more from greater memory — the same trade-off Z.ai cites.
Frequently asked questions
What is loop transformer architecture in GLM-5.4?
GLM-5.4 runs a block of 28 shared layers twice, refining intermediate results from the first pass to make the network deeper without adding parameters. Dedicated gates control how much new output flows back into the data stream on the second pass.
How does GLM-5.4 handle memory overhead from the second pass?
Both passes share the KV cache, and the second pass stores its own extra values only in a small local window. According to Z.ai, this keeps overhead manageable even at a 1-million-token context.
Are there benchmark scores for the 750B GLM-5.4 model?
No. Z.ai has published no benchmark scores for the 750B model. The figures shared come from a 30B test model, and there are no independent evaluations from groups like Artificial Analysis.
Sources
Keep reading

42 State AGs Fight to Stop Character.AI From Selling 21 Million Users' Chat Histories
OpenAI's GPT-6.2 billing fix means Astra users hit limits 40% faster
