GLM-5.4 Loop Transformer Release Notes
GLM-5.4 marks a shift toward 'Generalized Coding,' utilizing a new Loop Transformer architecture to achieve reasoning capabilities comparable to 2T-3T parameter models. By executing a shared block of layers across multiple iterations, the model achieves deeper logical processing without a proportional increase in parameter count or excessive memory overhead.
The Loop Transformer Architecture
Unlike standard Transformers where each layer executes once per forward pass, the Loop Transformer architecture runs a group of weight-shared layers across multiple iterations. This approach refines hidden states from previous passes, effectively increasing network depth. To adapt an existing pre-trained base model to this architecture, the developers implemented three key modifications:
- Gated Progressive Updates: To prevent activation norms from exploding across iterations, the model uses independent per-token gates. The first pass builds global context conservatively, while the second pass performs refined updates. This mechanism allows the model to adjust step sizes dynamically based on token difficulty.
- Hybrid KV Cache: Instead of maintaining a full KV cache for every iteration, the model uses cross-loop KV sharing supplemented by a local sliding window for the second pass. This design ensures that an extra loop only incurs the cost of a single sliding window, keeping deployment costs manageable at 750B scale.
- Sparse Attention Index Reuse: The second loop reuses the attention indices generated by the first loop, eliminating the overhead of recomputing indices on every pass.
Scaling and Performance
Controlled iso-parameter ablations on a 30B model demonstrated that the looped architecture provides clear performance gains in math, scientific reasoning, and long-context tasks with only a ~10% increase in training compute. Furthermore, the model exhibits improved efficiency by shifting some reasoning from explicit output tokens into the implicit depth of the loop, resulting in a 10–14% reduction in average output length on benchmarks like GPQA-Diamond and MMLU-Pro.
Inference throughput is maintained at 70–80 tokens/s during peak load, supported by kernel fusion and memory optimization to reduce fragmented overhead. Despite these gains, the developers acknowledge that the model occasionally suffers from 'marathon thinking' loops—prolonged reflection that improves accuracy but can impact latency.
Generalized Coding Capabilities
GLM-5.4 positions code as a foundational tool for solving tasks beyond traditional software development. The model has demonstrated capabilities in:
- Engineering and 3D Modeling: Generating CAD models for mechanical components.
- Game Development: Creating complete game environments including physics and assets.
- Creative Media: Writing code to generate and edit video content and interactive 3D experiences.
Community Reception and Discussion
Public reaction to the release has been mixed, with some users expressing concern over the lack of formal benchmark scores. Critics have noted that the 'marathon thinking' behavior can be detrimental to user experience, particularly for simpler tasks where the model's tendency to second-guess itself increases time-to-completion.
Regarding the architectural approach, some observers suggest that embedding reasoning loops directly into the model architecture is a logical evolution of current 'latent space' thinking. However, others remain skeptical about the long-term viability of this approach compared to externalizing reasoning through system harnesses. As one commenter noted:
"If they externalise their reasoning as code, it will survive compaction and context decay by becoming a durable artifact. It’s cool that models can do this, but I think it also shows harnesses still have significant weaknesses around long term memory and context."
Others pointed out the potential for 'marathon thinking' to become a usability hurdle, with one user remarking:
"It's becoming really hard using models with their 'marathon thinking' sessions. It's not a problem when dealing with more complex stuff but constantly second guessing themselves even when working with the simplest of things is very annoying."
GLM-5.4 is currently available via Z.ai services, with plans to open-source the model weights following safety hardening.