> ## Content Index
> Fetch the complete content index at: https://orbiorbi.com/news/llms.txt
> Use this file to discover other available public pages before exploring further.

# GLM-5.4 runs 28 layers twice. Does that mean faster coding?
- URL: https://orbiorbi.com/news/en/glm-5-4-loop-transformer-tradeoffs/
- Published: 2026-11-24T11:13:03.000Z
- Updated: 2026-11-24T11:13:03.000Z
- Description: Z.ai runs 28 network layers twice in GLM-5.4, doing more computation with the same weights. The model is on Coding Plan, but its prolonged thinking shows why fast text output does not always mean faster delivery.
- Author: Orbis News
- Tags: AI explained, #en, #orbis-auto, #mt-review

Z.ai launched GLM-5.4 on November 23, running part of its network twice to create its first flagship model built on a loop transformer. It is available through Coding Plan, and the company also lists ZCode and Z.ai Chat as access points. The model adds vision capabilities and showcases code-generated music videos, games and a six-axis robotic arm.

The most interesting change is inside the model. GLM-5.4 uses a base model at roughly the 750B-parameter scale, running 28 of its layers for two iterations. The aim is to improve capabilities through more computation without adding another set of parameters. But Z.ai also acknowledges that the model can get stuck in overly long “marathon thinking.” For programmers, whether an extra pass is worthwhile depends on how much usable work that waiting produces.

Our view is that GLM-5.4 is worth trying on complex coding and geometry tasks that require sustained reasoning. If your priority is making a small change within seconds, do not let the advertised peak speed of 200 tokens per second decide for you. Fast output still leaves the reasoning process between you and a finished task.

## GLM-5.4’s loop runs inside 28 network layers

In a conventional transformer, information passes through different network layers as an input is processed, with each layer performing its own computation. GLM-5.4 takes 28 layers from its base model and runs the same weights for two iterations. The second pass continues from the internal state left by the first, refining the result. You do not need to ask the same question twice in chat or have a coding agent call the model a second time.

Reusing weights increases computational depth without doubling the parameter count. In its technical blog, Z.ai compares GLM-5.4’s intelligence with that of models containing 2T–3T parameters. That is a capability comparison; the base model is still at roughly the 750B scale. What increases is how often the same network is used.

Simply feeding a section of the network back through itself does not guarantee a better result. If the second pass overwrites the first pass’s state too aggressively, downstream layers receive internal values that differ too much from those seen during pretraining. Z.ai adds per-token gates to each iteration to control how much of an update is written back. A token is a unit used to process and generate text; here, a gate acts as a control on the strength of each update.

The team’s observations after training suggest that the first pass generally writes more conservatively, building global context. The second uses that state to write back more of its refinements. Update strength also adjusts for harder tokens.

Z.ai did not train this looped model from scratch. Its blog notes that looped architectures appeared in the 2018 Universal Transformer, but looped networks trained from scratch still lagged behind versions without shared weights under the same pretraining compute budget. The team instead adapted an already pretrained base model through continued training, validating the approach at 1B, 4B, 30B and 750B scales.

Thinking Machines Lab’s Inkling 2 Mini, released a few days earlier, also runs its middle layers repeatedly, with three passes and 26.4B total parameters. One takes the small-model route; the other brings looping to a large flagship. Two passes versus three is no basis for ranking them. GLM adapts an existing large model, while Inkling puts looping into a small model that can run locally.

## An extra pass starts with the GPU memory bill

When processing long text, a model stores information from earlier attention calculations so it can use it when generating more content. This is commonly called the KV cache, with K and V standing for keys and values. Longer contexts mean larger caches. Keeping a complete copy for every loop would push up GPU memory requirements along with computation.

GLM-5.4’s second pass keeps using the important context selected in the first pass, storing its newly computed information only for a nearby stretch of text. Technically, the former reuses sparse KV, while the latter adds a local sliding window. The additional cache for an extra pass is therefore one sliding window rather than another copy of the entire long context. At the one-million-token context length discussed by Z.ai, that design directly affects whether deployment costs remain manageable.

The second pass also reuses the sparse attention indices generated in the first: it keeps the positions already selected for attention, reducing the cost of finding them again. Along with the gates that control updates, Z.ai addresses computational stability, caching and retrieval costs together to bring looping to a model at roughly the 750B scale.

A controlled experiment gives a clearer picture of the intended payoff. Comparing models with the same 30B, or 30 billion, parameters, the looped version used about 10% more total training compute. After long-context supervised fine-tuning, with thinking enabled, it improved on math, scientific reasoning and long-context tasks. Across most benchmarks, including GPQA-Diamond and MMLU-Pro, average output length also fell by 10–14%, mainly because the reasoning traces were shorter.

The 30B comparison model moved some reasoning inside the network, shortening the thinking it wrote out. On the GLM-5.4 flagship, however, Z.ai still lists excessively long thinking as a major limitation.

## From code to robotic arms and bird-watching scenes

GLM-5.4’s demonstrations go beyond filling in functions and fixing web pages. Z.ai shows a self-narrated music video, a six-axis robotic arm built in FreeCAD, and a game with character movement, physics, maps, combat and art assets. Another demonstration uses mathematical geometry and GLSL shaders to generate an interactive 3D bird-watching scene.

![Six-axis robotic-arm assembly demonstration accompanying the official GLM-5.4 article](https://orbiorbi.com/news/content/images/2026/11/freecad-early.webp)

Six-axis robotic-arm assembly demonstration accompanying the official GLM-5.4 article; source: [Z.ai](https://z.ai/blog/glm-5.4?ref=orbiorbi.com)

These outputs illustrate what Z.ai calls “Generalized Coding”: using code to work with more tools and complete a wider range of tasks. The robotic-arm demo puts the output into a CAD modeling tool, while the bird-watching scene connects geometry with graphics rendering. Coding can thus serve engineering and visual work as well as code files in software projects.

For creators, the appeal is being able to express shape, motion and interaction through editable programs. For developers, that also raises the difficulty: the model must keep multiple steps consistent, with earlier structures supporting later actions. Z.ai places large-scale software engineering, 3D modeling and physical control on the same research track because they all require long reasoning chains.

On Hacker News, HarHarVeryFunny welcomed Z.ai’s disclosure of engineering details, while Aurornis pointed to the contemporaneous release of Inkling 2 Mini to challenge a simple East-versus-West account of progress in looped models. On Reddit’s LocalLLaMA, naftalinus focused on how the second pass reuses KV and indices.

## 200 tokens per second can still leave you waiting

Z.ai reports speeds of up to 200 tokens per second during off-peak hours and 70–80 tokens per second under peak load. Those figures describe text generation speed. If the model repeatedly reconsiders its approach before answering, faster generation can still leave you waiting longer overall.

That is one of the community debate’s most practical points for programmers. In one Hacker News thread, users complained that some models spend too long thinking about simple changes, while others advised against leaving reasoning effort at its highest setting. The discussion covers multiple models rather than a standardized GLM-5.4 speed test. But the prolonged thinking that Z.ai itself acknowledges does affect how users schedule their work.

A complex task can justify more time because useful reasoning can save debugging later. Small changes often happen while someone is watching the screen, unable to proceed until the result arrives; the wait interrupts their work directly. When choosing a model, look beyond how much text it generates per second to whether it can move the task to a usable result within the time you are willing to wait.

To try GLM-5.4 now, existing Coding Plan users can set the model name to `glm-5.4`, or use the ZCode and Z.ai Chat options listed by the company. IT Home reports that V2, V3 and team users receive 1.5 times the usage quota for this model. The technical blog still labels API access as coming soon and says weights are planned for release after safety hardening. Anyone wanting to deploy it themselves must wait for the weights to be released.

If you are working on code or geometry tasks that span multiple steps, GLM-5.4 is worth setting aside time to try. If you are waiting for a small change before you can continue, prioritize a model that delivers promptly. Time to complete the task is closer to your actual cost than the amount of text generated per second.

## Further reading

- [Z.ai: GLM-5.4 technical blog and official demonstrations](https://z.ai/blog/glm-5.4?ref=orbiorbi.com)
- [Wang Miao, IT Home: GLM-5.4 arrives on Coding Plan](https://www.ithome.com/1/030/809.htm?ref=orbiorbi.com)
- [Fan Jialai, The Paper: GLM-5.4 launch report](https://m.thepaper.cn/newsDetail%5Fforward%5F34539134?ref=orbiorbi.com)
- [Hacker News: GLM-5.4 discussion](https://news.ycombinator.com/item?id=50609685&ref=orbiorbi.com)
- [Reddit LocalLLaMA: GLM-5.4 discussion](https://www.reddit.com/r/LocalLLaMA/comments/1y3enps/glm54%5Ftoward%5Fgeneralized%5Fcoding%5Fwith%5Four%5Ffirst/?ref=orbiorbi.com)
- [Thinking Machines Lab: Inkling 2 Mini](https://thinkingmachines.ai/news/inkling-2-mini/?ref=orbiorbi.com)