Loop Transformer: Twice the Thinking, Same-Size Model
Loop Transformer is a technology that allows a neural network to «think twice» without increasing its physical size or parameter count.
The Mechanics of Loop Transformer
In a classic neural network, information flows strictly in one direction — from input to output, passing through each layer only once. This is a linear conveyor belt. Loop Transformer introduces an element of recursion into this conveyor.
Instead of designing a model with 2 trillion unique layers, engineers at Z.ai took the existing GLM-5 base (750 billion parameters) and forced 28 of its central layers to process the data twice.
Iteration 1: Formation of a primary semantic draft.
Iteration 2: Critical analysis and refinement of that draft, taking into account the intermediate information already obtained.
This resembles the process of editing text: an author writes a draft and then returns to the beginning to polish the phrasing, using the knowledge of the story’s ending. The model literally gains the ability to double-check its own thoughts before emitting a token.
How to Avoid Overheating
Implementing such an architecture at the scale of hundreds of billions of parameters is a colossal challenge, as a double pass risks doubling memory requirements. To maintain efficiency, three technological solutions were applied:
Dynamic Gating: The system analyzes each token. If the data is simple, it takes a «shortcut» path. If it is complex, the loop is activated for deep processing.
Hybrid KV-Cache: To avoid recalculating the relationships between words in a context of 1 million tokens during the second pass, the model reuses the indices created in the first iteration.
Sparse Attention: Using only the most relevant data connections to minimize computational load.
Economics and Performance
Switching to a cyclic architecture changes the economics of AI ownership. Traditionally, to gain a 10% increase in intelligence, one had to increase the model size by 10–20%. Loop Transformer allows for comparable quality by utilizing existing weights more efficiently.
Key results of GLM-5.4:
Comparable Power: In terms of solving complex tasks, the model approaches systems with 2–3 trillion parameters while remaining 3–4 times smaller.
Internal Logic: The model began producing shorter, more precise answers (10–14% shorter in MMLU-Pro tests). This happens because reasoning now occurs inside hidden loops rather than being «spilled out» as long text.
Cost: Z.ai subscribers received 50% more tokens per week, as the system spends fewer credits on the same operation compared to a linear architecture.
The Shadow of the Architecture
The ability to «think twice» has a side effect. Developers admit the model is prone to «marathon self-check cycles.» When faced with a complex task, Loop Transformer may begin to infinitely refine intermediate conclusions, which leads to a drop in generation speed to 70–80 tokens per second under load.
This transforms the neural network from a fast chatbot into a thoughtful analyst who requires time to verify its own calculations.
From Size to Efficiency
Loop Transformer is a signal of the industry’s maturation. The era of «brute force,» where victory went to whoever had the largest data center, is being replaced by an era of algorithmic elegance.
This approach is already moving beyond text. Z.ai positions GLM-5.4 as a tool for Generalized Coding. Thanks to its capacity for deep reasoning, the model can do more than just write code; it can design 3D printers in FreeCAD, create games with physics, and edit videos through programmatic instructions.
The reuse of layers proves that to make AI smarter, you don’t necessarily have to build it bigger. Sometimes, you just have to give it the ability to reread what it has written.
Contact our experts to select the optimal hardware configuration and calculate rental pricing for your AI workloads.