Z.ai follows OpenAI into loop transformer territory with its new 750B flagship model
Key Points
- Z.ai has introduced GLM-5.4, a 750-billion-parameter model that runs 28 layers twice to increase computational depth without adding parameters.
- Dedicated control gates, a shared token cache, and sparse attention keep memory and compute costs from rising sharply.
- According to Z.ai, GLM-5.4 can use code to generate videos, games, and CAD models. The model is available on Z.ai's platforms, with its weights set to follow.
Z.ai is moving its flagship model to a loop architecture that runs some of its layers twice. With GLM-5.4, the company wants to mark the start of "Generalized Coding," where code also generates videos, games, and CAD models.
Following OpenAI, Z.ai is introducing GLM-5.4, its first large model built on a loop transformer. While standard language models use each layer once per pass, GLM-5.4 runs a block of shared layers multiple times, refining the intermediate results from the previous pass to make the network deeper without adding parameters. OpenAI has used a similar architecture since GPT-6 Astra. According to Z.ai, the 750-billion-parameter model reaches performance comparable to models with 2 to 3 trillion parameters.
The team retrained the GLM-5 base model released in February into a loop model that runs 28 layers twice. Loop models trained from scratch have so far performed worse than models without shared weights under the same compute budget, Z.ai writes.
Gates and shared caching keep the second pass manageable
Converting the model introduces a problem, Z.ai says. If the model simply overwrites intermediate states on each pass, activations grow sharply from round to round, leaving subsequent layers with values outside the range they were trained on.
To handle this, GLM-5.4 uses dedicated gates for each token and pass to control how much of the new output flows back into the data stream. According to Z.ai, the model builds context cautiously on the first pass and writes its changes back in full on the second. On difficult tokens, Z.ai says, the first pass steps in more strongly.

Because the second pass would otherwise double memory usage, both passes share the KV cache, the temporary memory for previously processed tokens. The second pass stores its own extra values only in a small local window. As a result, Z.ai says, the overhead compared to GLM-5.3 stays manageable even at a 1-million-token context.
To save on compute as well, the model uses sparse attention to pick the most relevant earlier tokens upfront rather than scanning the entire context every time, a standard technique. The second pass then reuses that selection from the first instead of making a new one. According to Z.ai, that yields nearly the same results as picking tokens separately on each pass. The company also says the model reaches up to 200 tokens per second off-peak and 70 to 80 tokens per second under load.
A looped 30B test model beats its baseline with shorter reasoning chains
Before rolling out the architecture in its flagship, Z.ai tested it on models with 1, 4, 30, and 750 billion parameters. For a direct comparison, the team used a 30B model built on the same architecture as the large base model. Both versions had the same parameter count, while the loop version received about 10 percent more training compute. Its biggest gain came on the AIME25 math benchmark, where scores jumped from 19.2 to 30.4 points. Scores on the expert-level science questions in GPQA-Diamond rose from 47.6 to 56.3 points, and on the AA-LCR long-context test they climbed from 40.3 to 47.7 points. Gains were smaller at just over three points on the MMLU-Pro knowledge test and on IFBench, which tests instruction following.
Responses also got shorter, shrinking 14.9 percent on MMLU-Pro, 11.7 percent on GPQA-Diamond, and just 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.

It is still impossible to judge how well GLM-5.4 actually performs, as Z.ai has published no benchmark scores for the 750B model and the figures in its blog post come solely from the 30B test. There are no independent evaluations from groups like Artificial Analysis either.
By Z.ai's own account, GLM-5.4's biggest weakness is overly long reasoning phases in which the model gets stuck, though the company says that extended double-checking improves accuracy.
Z.ai views GLM-5.4 as the starting point for "Generalized Coding," where the company says code becomes the foundation for tasks beyond traditional software development. To illustrate the idea, Z.ai shows a music video scored by the model itself, a six-axis robot arm it says GLM-5.4 designed in FreeCAD, a complete game, and an interactive 3D scene built from mathematical geometry and custom shaders.
Z.ai plans to release model weights and a much larger model
GLM-5.4 is available through the GLM Coding Plan, the ZCode coding environment, and Z.ai Chat, with an API set to follow and token pricing not yet announced. Z.ai plans to release the model weights after further safety testing, and it also announced a much larger model expected to arrive soon.
Shared layers date back to the Universal Transformer in 2018. In March, researchers in Bonn showed 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 to explain its architecture. Thinking Machines also drew attention recently with Inkling 2 Mini because the loop model runs locally on Macs with at least 32 GB of RAM.
At 750 billion parameters, GLM-5.4 is nowhere near running on a laptop, but Z.ai is instead targeting the tier of Kimi K3.1 Pro and Qwen3.8-Max. At 2.8 trillion and 2.4 trillion parameters, respectively, those models are more than three times as large and require large amounts of compute.
For its predecessor GLM-5.3, Z.ai kept the existing base model and drew all of its gains from post-training. The company delayed releasing its weights because of the model's strong vulnerability-finding abilities, and Anthropic later found that GLM-5.3 could build exploits on its own, almost on par with Claude Mythos Preview.
THE DECODER+
AI News Without the Hype – Curated by Humans
- Every Plus article and the full archive
- No ad banners
- Frontier Radar: 6 deep dives a year
Already a subscriber? Sign in