Z.ai details GLM-5.4’s loop architecture: 28 middle layers run twice
Z.ai disclosed how GLM-5.4, already offered to coding subscribers, reuses 28 middle layers. Its published comparison used a 30-billion-parameter experimental model and more training compute, not a matched test of the flagship’s speed, quality or cost. A general API and downloadable weights remain unreleased.
On November 23, Z.ai disclosed the architecture of GLM-5.4. The Chinese AI lab had already made that model an option for coding subscribers earlier that day. What the technical announcement added was how it reuses 28 middle layers from the GLM-5 base: it runs them twice with shared weights. The second pass adds computation without duplicating that block’s parameters. Z.ai published a comparison on a smaller experimental model, not evidence that the flagship beats its predecessor at the same operating cost.
Using the same block repeatedly is not new. The 2018 Universal Transformer proposed shared computation across steps. On November 20, Thinking Machines Lab released Inkling 2 Mini, which runs 12 middle layers three times. That is a separate model, not a head-to-head result. Z.ai’s August GLM-5.3 reused the GLM-5.2 base and focused on post-training, while the August GLM-5.3-Flash already supported multimodal input. The question this time is whether a large pretrained model can learn to make better use of a repeat pass. Z.ai says it experimented at several scales. The clearest published comparison uses two 30-billion-parameter configurations and about 10% more total training compute for the looped version. Matching the parameter count did not match the compute budget.
The second pass does more than reread the first. According to Z.ai, each pass has a gate that adjusts how much information to write back for each token. The first pass typically writes more conservatively, while the second refines the state. The number of passes is still fixed; it does not increase automatically on harder tokens. The second pass also borrows part of the first pass’s context cache and keeps a shorter cache of its own. Reusing the first pass’s attention indices saves a separate selection step. None of that makes the second pass free.
Z.ai ran the controlled comparison on the 30B model after long-context fine-tuning, with thinking mode enabled. It reports that average outputs on several reasoning tests were about 10–14% shorter, mainly because the visible reasoning was shorter. It also acknowledges that the flagship sometimes spends too long thinking. These are not contradictory measurements of the same system, and neither establishes that subscribers will pay less. For an engineer on a deadline, the questions are whether the patch passes tests and how long that takes. Z.ai still lists the general API as forthcoming and the weights as planned.
iHolyshit review
This is a promising way to scale a model, but the vendor’s examples do not settle its value at a comparable price. Over the next six to twelve months I would look for tests on real codebases under the same budget, measuring accepted patches, elapsed time and rework. Shorter visible reasoning will not help much if it simply replaces time spent reading with time spent waiting.
Share this article
What do you think of this story?
Anonymous feedback, up to 5 reactions per article.
Reader comments
Comment without signing in, or sign in to display your member name.
Discuss the technology and the story. Hate, politics and war, threats, abuse, personal accusations, sexual content, ads, links and personal information are not allowed.
No comments yet. Be the first to share.