Z.ai's GLM-5.4 gets smarter by running its own layers twice
GLM-5.4, released by Z.ai on 23 November, loops 28 layers of the GLM-5 base model for two iterations at the 750B scale. The lab says it reaches intelligence levels comparable to 2T-3T parameter models. It is available in Z.ai's chat and coding products; the API is marked as coming soon and open weights are planned.
In a standard transformer each layer runs once per forward pass. In what Z.ai calls a Loop Transformer, a group of weight-shared layers runs for multiple iterations and refines the hidden states from the previous pass, which gives a deeper network without increasing the parameter count. The lab's reasoning, carried over from its GLM-5.3 write-up, is that memory-intensive tasks benefit from more parameters while reasoning-intensive tasks benefit from more effective compute, and that large-scale software engineering, cybersecurity, 3D modeling and physical control are long chains of reasoning that stacking parameters cannot solve.
The idea is not new, the post says: the 2018 Universal Transformer proposed weight-shared depth, and recent work has shown gains at small scales. But looped models trained from scratch still lag behind unshared models under the same pre-training compute budget. Z.ai therefore adapted an already pre-trained base model into a Loop Transformer through continued training, which it says raises the intelligence ceiling with a relatively small compute overhead. GLM-5.4 loops 28 layers of the GLM-5 base model for two iterations.
Three changes made this workable at the 750B scale. Directly overwriting hidden states on the second pass made activation norms blow up, so the model has independent per-token gates for each iteration; after training, the first pass writes conservatively with small gate values and the second writes full updates. To keep memory in check, the second loop reuses the sparse KV cache selected in the first pass and keeps only a sliding window of its own, so an extra loop costs one sliding window of cache and not a full context cache, which the lab says keeps the deployment cost increase over GLM-5.3 well under control at 1M context lengths. And the second loop reuses the sparse attention indices of the first, adding zero indexing overhead.
Before committing its flagship to the design, Z.ai validated it on 1B, 4B, 30B and 750B base models. On a 30B model with the same architecture as the 750B base it ran a controlled comparison with identical parameter counts and only about 10% more total training compute, and reports clear gains for the looped version, the largest in math, scientific reasoning and long-context tasks. Across most benchmarks, such as GPQA-Diamond and MMLU-Pro, average output length dropped by 10 to 14%, mostly from shorter chains of thought. In the lab's words, part of the reasoning shifts from explicit output tokens into the implicit depth of the loop.
The lab reports speeds of up to 200 tokens per second during off-peak hours and 70 to 80 at peak load. It also names a limitation: the model tends to get caught in overly long marathon thinking loops, though the lab adds that this prolonged reflection consistently improves accuracy.
Z.ai presents the release as the start of Generalized Coding, where code becomes the base for a wider range of tasks. Its demonstrations have GLM-5.4 write code that produces a self-narrated music video, a six-axis robotic arm modeled in FreeCAD, a complete game and an interactive 3D scene.
GLM-5.4 is offered through the GLM Coding Plan, the ZCode tool and Z.ai Chat. The API is listed as coming soon, and the lab plans to open-source the weights after completing necessary safety hardening. Simon Willison, who tried the model on release day, notes that it is not yet available as open weights and that he reached it by signing up for the Coding Plan, whose key worked with Z.ai's OpenAI-compatible API. He points out that Inkling 2 Mini from Thinking Machines Lab, released on 20 November, is also a looped transformer, running its middle layers three times for every token. Z.ai says its next, significantly larger model will be ready soon.
