Wink Pings

GLM-5.4: Parameters Didn't Grow, the Model Got Deeper, and Code Starts Generating Videos

Zhipu has brought Loop Transformer to its flagship model. GLM-5.4's parameter count hasn't increased, but it can think more deeply. The boundaries of code have been pushed further: videos, 3D models, and robotic arms can all be generated with code. This article breaks down the three changes to the Loop architecture, and why "Thunder-Thinking" isn't bad news.

Zhipu has released GLM-5.4 today. It is the first flagship model to use Loop Transformer.

Loop means that a group of layers with shared weights executes in a loop. The parameter count stays the same, yet the model can effectively become larger. Zhipu's claim: intelligence reaches the level of a 2–3T-class model.

GLM-5.4 cover image

At the same time, the company launched a "Pan-Coding" path. Code is becoming the foundation for completing a broader range of tasks. Generating videos with code, building games, and creating 3D models are no longer demos—they are now built-in capabilities of the model.

The release also mentioned a phenomenon: the model can easily slip into "Thunder-Thinking" mode. It takes a long time before answering, circling as if replaying things in its head. Zhipu doesn't think that's a bad thing. Long thinking lets the model keep reflecting and self-correcting—exactly what long-horizon tasks need.

Loop Architecture: Running the Same Layers for Extra Rounds

In a standard Transformer, each layer is executed only once in the forward pass. Loop Transformer runs a group of shared-weight layers for multiple rounds, with each round continuing from the hidden state of the previous round. That makes the network deeper without adding parameters.

Zhipu discussed this in the GLM-5.3 technical blog: memory-oriented tasks benefit from more parameters, while reasoning-oriented tasks benefit from more effective compute. Large-scale software engineering, cybersecurity, and 3D modeling are essentially extremely long-chain reasoning: you have to keep deriving along multi-step causal chains while maintaining global logical consistency. You can't learn these abilities by stacking parameters or rote memorization. So GLM-5.4 introduces Loop Transformer.

This idea isn't new. Universal Transformer proposed it in 2018. But weight sharing is usually not advantageous in pretraining—given equal compute, it performs worse than not sharing weights. Zhipu's solution is not to pretrain from scratch. It converts an already-pretrained base model into a Loop Transformer, trading a small compute overhead for a higher intelligence ceiling.

GLM-5.4 selects 28 layers from the GLM-5 base and runs them through two rounds. To balance effectiveness and deployment cost, three changes were made at the 750B scale:

  • Gated progressive update. If each round's output directly overwrites the hidden state, activation norms will blow up. Now each round has an independent per-token gate that writes a proportion of the candidate change back into the residual stream. After training, the division of labor is clear: the first round is responsible for establishing global context; the second round opens up writes for refinement. For positions that are hard to predict, the first round writes in more.

  • Global KV cache sharing + independent sliding window. The naive approach is to store a full KV cache each round, which multiplies memory. Now the second round reuses the first round's sparse KV and only keeps KV generated by the second round within the sliding window. One extra loop costs just one extra sliding window. With a 1M-token context, the deployment cost increase is manageable.

  • Reusing sparse attention indices. The base model uses sparse attention. The second round directly reuses the indices generated by the first round, saving indexer overhead. Experiments show this is almost identical to recomputing the indices every round.

Validation: The Longer the Reasoning Chain, the Bigger the Gain

Zhipu validated this on 1B, 4B, 30B, and up to 750B models. In the same-parameter comparison at 30B, the parameter counts are exactly the same, total training compute increases by only about 10%, and the Loop version improves clearly.

Two findings are key:

  • The longer the reasoning chain, the more Loop helps. The biggest gains are in mathematical reasoning, long context, and code—precisely the capabilities Pan-Coding depends on.

  • Loop thinks with fewer tokens. On benchmarks such as GPQA and MMLU-Pro, average output length drops by 10%–14%, with the reduction coming mainly from chain-of-thought. Some reasoning shifts from the token stream to the extra depth introduced by looping.

This also explains why Loop suits long-horizon tasks. Large-scale software engineering, cybersecurity, and 3D modeling are essentially extremely long-chain reasoning: you have to keep deriving along multi-step causal chains while maintaining global logical consistency. You can't learn these abilities by stacking parameters or rote memorization.

Pan-Coding: Code Becomes a Foundational Capability

Code is becoming the foundation of the model's ability to extrapolate. Since going all-in on coding in early 2025, Zhipu has unlocked agent engineering, long-horizon tasks, cybersecurity, and more. This time it is targeting "Pan-Coding," and the ceiling of this path is higher.

In real-world programming evaluations across 200 scenarios, GLM-5.4 stood out in visual coding, visual replication, and long-horizon tasks. The company calls it "the Chinese-made model with the strongest coding feel." Thanks to the combined improvements in code and vision, it has also unlocked many new scenarios:

  • Scaling Coding to Video: Creator Mike Luan used GLM-5.4 to take the music video "Hello World" from 0 to 1—concept, arrangement, motion, and visual rendering. The visuals were all drawn in real time with front-end code, with zero image assets. GLM-5.4 planned the music itself according to sections and shots, invoked a third-party music generation model, and autonomously completed multiple rounds of prompt modifications.

  • Scaling Coding to 3D: The creator "Night God Doesn't Speak" used no external 3D models and no texture files, generating from scratch a 3D macro interactive bird-watching experience with pure mathematical geometry and custom GLSL shaders. It reproduces a long-tailed tit with every feather clearly defined—breathing, tilting its head, and blinking its nictitating membrane.

  • Scaling Coding to Engineering: GLM-5.4 used FreeCAD for engineering modeling to build a six-axis robotic arm model, then invoked Blender to design motion, visualize, synthesize audio, and produce a simulation of the arm grabbing a logo.

All three cases point to the same conclusion: code can be a unified entry point for generating videos, 3D models, and engineering designs.

Availability and Speed

Starting today, GLM-5.4 is open to all GLM Coding Plan users and is also launched on coding platforms such as ZCode, Trae, WorkBuddy, and Qoder. The API will open after a security assessment, and the model weights are planned to be released as open source in a responsible way. Coding Plan V2/V3/Team users get quotas raised to 1.5×.

In terms of speed, it can reach up to 200 token/s during off-peak hours and still maintains 70–80 token/s during peak hours. For an architecture with multi-round looped computation, that number is no small feat. On the model-structure side, splitting the KV cache by distance makes the second round add almost no memory, and reusing sparse attention indices keeps loop rounds from adding retrieval overhead. On the operator side, core operators are fully fused, reducing intermediate read/write traffic and saving the scattered overhead amplified by looping at the kernel level.

Access:

Official products: z.ai, Zhipu Qingyan, AutoClaw. Launch partners: WorkBuddy, Doubao Work, Trae, Qianwen Office, Qoder, Miaoshou (CatPaw), MaDao, Baidu Dazi Enterprise Edition, AiWork, TJ Codely, OpenCode.

Closing Thoughts

GLM-5.4 is an initial exploration of Loop. Open questions remain: how tokens of different difficulty can get different amounts of compute, how adaptive computation should be done, and how gains will change as loop count and model scale keep increasing.

Scaling depth and scaling model size are being advanced together this time. GLM-5.4 validates the path of computational depth. The next model will be significantly larger and will carry everything learned here.

Next time you see GLM-5.4 thinking for a long time, that may not be bad news.

发布时间: 2026-11-23 17:42