Z.ai’s GLM-5.4 runs the same 28 layers twice
By AgentRiot Editorial
Z.ai’s first flagship Loop Transformer adds a second pass through a shared block of layers. It’s available through the Coding Plan, ZCode and Chat; the direct API and weights are still pending.

Z.ai released GLM-5.4 on November 23 (opens in new tab) with a change to how its flagship model processes a token. Instead of moving through every layer once, it runs a block of 28 layers twice. The second pass uses the same weights, so the block gets another chance to refine its internal representation without requiring a second set of layer parameters. It still has to do the extra work. Sharing weights is a way to add compute without adding a duplicate block, not a way to make the second pass free.
What the second pass reuses
Z.ai says it took an already pretrained GLM-5 base at the 750-billion-parameter scale and adapted it through continued training. Its technical guide (opens in new tab) describes a first pass that builds context and writes relatively small updates, then a second pass that uses that state to make larger refinements. Learned gates control the size of those updates for each token. That does not mean the shipped model decides how many passes to run: varying the number of passes for harder tokens is still on Z.ai’s research agenda.
There’s also a memory cost to revisiting layers. A straightforward implementation would keep another full key-value cache for each pass, increasing the memory needed to serve long inputs. Z.ai says the second pass reuses the first pass’s selected cache entries and keeps its own fresh entries only for a sliding window. It also reuses the first pass’s sparse-attention index rather than calculating it again. The design cuts some of the overhead of looping; Z.ai has not published a hardware or serving-cost comparison in the launch post that shows how much an outside operator would save.
The comparison is on a 30B model, not the flagship
Z.ai’s cleanest experiment compares two 30-billion-parameter models, one with a loop and one without. The parameter counts match, but the looped model used about 10% more total training compute. The company says the strongest gains were on longer reasoning tasks and that average output length fell 10–14% on most of the benchmarks it discusses, including GPQA-Diamond and MMLU-Pro. Those are vendor results from the smaller model with thinking enabled; they aren’t a measured token saving for GLM-5.4 on production coding jobs.
For the flagship, Z.ai reports up to 200 tokens per second off-peak and 70–80 at peak load on its serving infrastructure. It also warns that GLM-5.4 can spend too long thinking. Tokens per second says how fast it generates, not how long a job takes when the model decides to generate more tokens. The release demos, including code for a FreeCAD design and an interactive 3D scene, show what Z.ai built with the model. They don’t establish how often another team can get the same result. The launch post does not provide a common flagship benchmark table that supports ranking GLM-5.4 against named rivals.
What’s available now
The model guide (opens in new tab) lists a 1M-token context, up to 128K output tokens, and text output from video, image, text or file inputs. The launch post points to the Coding Plan (opens in new tab), ZCode (opens in new tab) and Z.ai Chat (opens in new tab). On weekly Coding Plan quotas, Z.ai says GLM-5.4 gets 1.5× the GLM-5.3 allowance. That’s a plan quota, not a per-token price or a claim about every plan’s limits.
Z.ai says the direct Model API (opens in new tab) is waiting on a security assessment, and its API price list (opens in new tab) does not list GLM-5.4. It plans to release the weights after safety hardening. For now, the practical comparison is in the coding tools that already offer it: give GLM-5.4 and your current model the same long task, then compare completion time and how much work you have to correct. A faster token stream is only useful if it gets you to a usable result sooner.

