GLM-5.4: Z.ai's Loop Transformer Runs Layers Twice
A second pass through the same layers
Z.ai released GLM-5.4 on November 23, 2026, and the headline is not the parameter count. The Chinese lab, formerly Zhipu AI, built its new flagship around a Loop Transformer: 28 layers of the GLM-5 base model run twice per forward pass, reusing the same weights. The company says it thinks like a 2–3 trillion-parameter model, from a base of roughly 750 billion.
The release landed quietly — GLM-5.4 first appeared in the Coding Plan menu, with the technical post hours later. Yet it still reached the Hacker News front page with more than 1,000 points. The idea is simple: instead of stacking more layers, run the layers you already have twice.
Source: Z.ai
What happened
The core mechanism is weight-shared depth. In a standard Transformer, each layer runs once per forward pass. In GLM-5.4, a group of 28 middle layers runs for two iterations, refining the hidden states left by the first pass. The parameter count stays the same; the network gets deeper.
Z.ai did not train a looped model from scratch. The idea goes back to the 2018 Universal Transformer, and looped models trained from scratch still trail unshared models at equal compute, so the lab adapted its pre-trained GLM-5 base through continued training instead, raising the intelligence ceiling for relatively little extra compute.
Three changes keep the second pass affordable at 750B scale:
- Gated progressive updates. Each iteration writes candidate updates back into the residual stream through independent per-token gates. The first pass writes conservatively to keep activation scales stable; the second pass opens the gates and refines, with harder tokens getting bigger updates on the first pass.
- Hybrid KV cache. The second loop reuses the sparse KV cache selected in the first pass and keeps only its own small sliding window, so an extra loop costs one sliding window of KV cache rather than a full context cache, keeping the deployment cost increase over GLM-5.3 under control even at 1M-token context.
- Sparse attention index reuse. The second loop reuses the attention indices the first loop's indexer already generated, adding no indexing overhead, and Z.ai reports this performs nearly identically to recomputing indices on every pass.
Z.ai validated the design at 1B, 4B, 30B, and 750B scales. On a 30B model, a controlled iso-parameter comparison found clear gains with only about 10% more total training compute: GPQA-Diamond rose from 47.6 to 56.3, and average output length fell by 10 to 14%, mostly from shorter chains of thought. Part of the reasoning moved from explicit output tokens into the loop's implicit depth.
Why it matters
Open-weight labs have spent the fall racing on size: Alibaba's Qwen4-Max at 2.4T parameters, Moonshot's Kimi K3 at 2.78T, and Sarvam-105B-1711 chasing agent benchmarks with a smaller footprint. GLM-5.4 argues the other direction: depth without size. If looping works at flagship scale, the next round of open models may compete on re-reading their own work.
Source: Z.ai
Z.ai calls this "Generalized Coding": code as the tool for jobs beyond software development. The demos show it writing code to produce a self-narrated music video, build a 6-axis robotic arm in FreeCAD, create a complete game, and generate an interactive 3D bird-watching scene from pure geometry and GLSL shaders. Vision support is new, and the model id glm-5.4[1m] points to a 1M-token context window.
For agent builders, the interesting claim is the shorter outputs. Agents burn time and tokens on long chains of thought, and a model that reasons inside its own layers instead of spelling every step out loud would make multi-step tool use cheaper and faster. So far the evidence is the 30B ablation, not the flagship.
Z.ai published no benchmark scores for GLM-5.4 itself. The 30B numbers show the loop helps at small scale, but nobody outside Z.ai can check the flagship until there is an API. Artificial Analysis, Terminal-Bench, and DesignArena all list GLM-5.3 and none list GLM-5.4, because without an API there is nothing to measure. The 2–3T comparison is a company claim, not a verified result. Z.ai is also candid about a flaw: the model "tends to get caught in overly long 'marathon thinking' loops," though the post says that prolonged reflection consistently improves accuracy beyond what the parameter count would suggest. Long thinking is a real cost for agent loops, where every extra second compounds across tool calls.
How to try it
Today there is exactly one way in: a GLM Coding Plan subscription, $18 a month for Lite, $80 for Pro, $168 for Max. The plan works with coding tools such as Claude Code and Cline, and Z.ai says GLM-5.4 uses two-thirds of the credits GLM-5.3 used, effectively 50% more usage under the same weekly quota. The model is also live in ZCode and Z.ai Chat.
The public API is listed as coming soon, opening only after a safety evaluation. On open weights, the post is explicit: "We plan to open-source the model weights responsibly after completing necessary safety hardening." No date, no license. GLM-5.3 is already widely available via OpenRouter and Amazon Bedrock, so the weights will probably arrive, but until they do, GLM-5.4 is hosted-only.
Coding Plan subscribers can switch at no extra cost. Everyone else should wait: there is no download, no API, and no independent benchmark to run against yet.
What to watch next
Three things will decide whether GLM-5.4 matters beyond launch week. First, the weights: a date and a license would turn a hosted announcement into something the open-source community can build on. Second, independent scores: once the API opens, Artificial Analysis and Terminal-Bench will test the 2–3T claim. Third, the loop itself: Z.ai is exploring adaptive compute, and its next, significantly larger model will carry forward what it learned here. If looping scales, expect other labs to try the same conversion. The post reads like a recipe.
For now, GLM-5.4 is a bet that depth beats size, published as a technical post, not a benchmark table. The idea is worth watching; the proof is still to come.


Comments
Post a Comment