By Mahan Kenway
Cover illustration: original AI-generated artwork created for this article.
Z.ai has introduced GLM-5.4, a coding-focused model that takes an unusual route toward greater depth: it runs part of its existing neural network twice instead of simply adding a new stack of independent layers.
The November 23 announcement describes the model as Z.ai’s first flagship built with a Loop Transformer. The company says the model combines stronger coding with vision capabilities and can tackle tasks involving games, 3D graphics and CAD. It is available through the GLM Coding Plan, ZCode and Z.ai Chat. A general model API is listed as coming soon, and the company says it intends to release the weights after safety hardening. Those weights are not available yet under the launch announcement.
That distinction matters. GLM-5.4 may be interesting to developers who want a hosted coding assistant today, but a future promise of open weights is not a download, a license or an option to run the model privately right now.
What the loop does
A conventional Transformer passes information through a sequence of layers. Each layer transforms the current internal representation before the next layer receives it. In a looped architecture, a group of layers is reused: the same learned weights operate again on the updated representation.
Z.ai says GLM-5.4 loops 28 layers of the GLM-5 base model for two iterations. Rather than train the looped system from scratch, the team says it converted an existing pretrained base and continued training. The second pass refines the hidden state produced by the first. Because the loop reuses weights, it increases computational depth without adding another independent copy of those layers.
This is different from asking a chatbot to print a longer explanation. The loop takes place inside the model’s numerical representations; a visible chain of thought consists of generated text. A model can use both approaches, and Z.ai says GLM-5.4 can still spend too long in “marathon thinking” on some tasks.
The idea itself is not new. The Universal Transformer paper, first posted in 2018, explored repeated self-attentive computation, and later recurrent-depth research studied scaling inference-time compute through repeated blocks. GLM-5.4 is notable for Z.ai’s claimed deployment of a related idea at flagship scale, not for inventing weight sharing.
Executing layers twice still requires additional computation. A model with fewer distinct parameters can therefore be more memory-efficient in one respect while taking more compute per generated token. Latency, throughput and overall cost depend on the serving hardware, caching, workload and implementation, not parameter count alone.
Z.ai describes three design choices intended to make looping practical:
- Gated updates: per-token gates control how strongly each pass updates the residual stream, helping avoid unstable activation scales during the conversion.
- Hybrid KV caching: the second pass reuses sparse key/value information from the first while maintaining an independent local sliding-window cache, rather than duplicating an entire long-context cache for every pass.
- Sparse attention index reuse: the second pass reuses attention indices from the first, avoiding another indexing pass.
These are the company’s technical descriptions, not an independently audited cost model. In particular, the announcement discusses performance at a one-million-token context length, but that alone is not a substitute for a documented product-wide context guarantee across every interface.
Z.ai reports up to 200 output tokens per second off-peak and 70–80 tokens per second at peak load. Treat these as vendor-reported observations for its serving environment, not a speed guarantee for an individual account. Prompt processing, queueing, tool calls, the number of generated tokens and other factors still affect the time it takes to finish a task.
The launch post says the model reaches capability levels comparable to models with two to three trillion parameters. That is a broad vendor claim, not an apples-to-apples guarantee, and parameter counts alone tell us little about a competitor’s architecture, active compute or real-world performance.
One useful detail is the smaller controlled comparison. Z.ai says it tested a 30-billion-parameter model with and without looping at the same parameter count, using roughly 10% more total training compute for the looped version. The reported evaluation followed what Z.ai describes as 200K long-context supervised fine-tuning, with thinking enabled; its announcement does not specify the unit for that figure. Z.ai reports gains on its evaluated tasks and says average output length fell by 10–14% on most of the cited benchmarks.
That experiment is evidence for the company’s design under those conditions; it does not prove the same percentage savings or quality gains on every GLM-5.4 deployment. The text of the launch announcement provides no detailed flagship benchmark table or independent reproduction. Until comparable evaluations are available, it is sensible to test the model rather than assume a headline translates to a particular codebase.
Access, quotas and a practical test
Z.ai’s Coding Plan documentation lists GLM-5.4 as supported across its plans, with both rolling five-hour and weekly usage limits. It describes credits based on input, cached input and output tokens, with a 50% discount to credit consumption during its stated off-peak hours. Rates and limits can change, so check the current plan documentation and account dashboard before budgeting a workload.
If you already have access, a useful comparison does not require a giant benchmark suite:
- Pick a handful of real issues with known tests, including a multi-file fix and one task that requires reading a screenshot or design.
- Run each model in the same agent harness with the same repository snapshot, tools and permissions. Record prompts and versions.
- Measure tests passed, reviewer corrections, elapsed time and credits or token usage. Include failed attempts and tool calls rather than counting only the final patch.
- Keep the agent in a restricted environment. Review generated code, external dependencies and shell commands before applying changes to production.
Vision support can make a model more useful for interface work, but a polished screenshot is not evidence that the implementation is accessible, secure or correct. Similarly, a convincing CAD or game demo is a starting point for verification, not proof that the result meets engineering requirements.
The takeaway
GLM-5.4 puts a concrete engineering tradeoff in the spotlight: reuse parameters to add computational depth, then work on caching and inference systems to contain the extra cost. The early architectural details are interesting, while the performance claims remain largely Z.ai’s own.
For now, the practical story is a hosted coding model with a novel looped design and usage-based plan limits. Developers who need a general API, local deployment or a specific open-weight license should wait for those releases and verify their terms rather than building on an assumption.