What Is Loop Transformer? GLM-5.4 Runs Its 28 Layers Twice

Zhipu GLM-5.4 uses Loop Transformer to repeat layers rather than stack parameters, boosting reasoning at lower cost.
Zhipu's GLM-5.4 adopts Loop Transformer, running 28 layers twice to improve reasoning without significantly increasing parameters. Inspired by Google research, it shows reasoning relies more on compute steps than memorization. GLM-5.4 has ~750B parameters, claimed to rival 2-3T models. Engineering hurdles are solved via continued training, gating, and memory borrowing. A 30B-parameter controlled experiment shows the loop version uses only 10% more training compute and performs better on reasoning and long text, but inference costs rise and it sometimes can't stop. This points to a new path for model enhancement.
Does making large models stronger always require stacking more parameters? Zhipu offers a different path with GLM-5.4: using a Loop Transformer to run some layers twice, letting the model "think longer" rather than "remember more." Bilibili creator 小无头AI breaks down the technology in a video—here are the core ideas and noteworthy details.
What Is Loop Transformer?
The core idea of Loop Transformer can be understood through the analogy of an editor revising a draft. In a traditional large model, each time it generates a character, information must be passed up through many layers from the bottom. Each layer is like an editor who takes the draft improved by the previous editor and refines it a bit more. Parameters are the editors' experience—the more editors, the larger and more expensive the model.

Loop Transformer doesn't increase the number of editors; instead, it has the same batch of editors revise the draft again. In GLM-5.4, a block of 28 layers is sent back to the beginning after being processed, so the same "editors" revise it once more. The parameters barely change, but the draft gets revised 28 extra times. According to the creator, GLM-5.4 has roughly 750 billion parameters, and Zhipu claims it is comparable to models with 2 to 3 trillion parameters—a comparison that currently remains Zhipu's own claim.
Transformer architecture is the foundational structure of current mainstream large models, centered on the self-attention mechanism, which allows the model to dynamically attend to other words in the input sequence when processing each word. A traditional Transformer is built by stacking multiple layers, each containing an attention sublayer and a feed-forward network sublayer, with information passed upward layer by layer. The more layers, the higher the parameter count and computational cost. Loop Transformer does not change this basic structure; instead, it treats several consecutive layers as a repeatable module and increases computational depth by looping that module multiple times without increasing the parameter count. This design borrows the idea of weight sharing from recurrent neural networks (RNNs) but retains the parallel processing capability of Transformers.
Why Does Running It Again Make It Smarter?
A 2025 paper from Google Research offers an explanation: many reasoning problems lack "steps of thinking," not "things to remember." Looping a few layers many times can nearly match much larger models on reasoning tasks, but helps far less on knowledge tasks that rely on memorization.

In other words, revising more times can clarify the logic but cannot add much knowledge. This explains why Loop Transformer performs better on math, scientific reasoning, and long-text tasks.
MMLU-Pro is an enhanced benchmark of MMLU (Massive Multitask Language Understanding), covering professional questions across dozens of disciplines including math, physics, chemistry, law, and medicine, requiring models to perform multi-step reasoning. Compared with the original MMLU, MMLU-Pro increases the number of options, raises question difficulty, and reduces prompt-sensitivity issues, making it better at distinguishing a model's true level of complex reasoning. This benchmark is often used to evaluate large models on knowledge-intensive tasks, contrasting with the reasoning tasks where Loop Transformer excels.
Three Engineering Challenges
The idea is simple, but implementation is not easy. The creator summarizes three key obstacles:
First, training from scratch actually performs worse. Previous experiments found that training loop models from scratch performs worse under the same compute. Therefore, GLM-5.4 is trained continuing from GLM-5 rather than built from scratch.
Second, numerical stability. Repeated computation over the same block causes values to grow larger and larger, making training unstable. Zhipu's solution is to add a "gate" to each character—revising less on the first pass and opening up more on the second.

Third, memory overhead. Each additional pass requires an extra copy of memory. Zhipu has the second pass borrow the content recorded in the first pass, storing only a small recent segment additionally.
Numerical stability refers to the phenomenon in deep neural networks during training where, due to many layers or repeated computation, values such as activations and gradients may grow or shrink exponentially, causing gradient explosion or vanishing and preventing training from converging. In recurrent structures, the same set of weights is applied multiple times, making numerical accumulation more pronounced. Common mitigation methods include LayerNorm, gradient clipping, and residual connections. Zhipu's "gate" mechanism is essentially a form of dynamic scaling, controlling the magnitude of information updates in each loop through learnable gating coefficients to suppress numerical divergence.
Controlled Experiment: Stronger Reasoning, Real Costs
Zhipu conducted a controlled experiment with the same parameter count: both at 30 billion parameters, the loop version used only about 10% more training compute and performed better on math, scientific reasoning, and long text. On exams such as MMLU-Pro, its output was also 10% to 14% shorter.
The costs are equally clear: each character generated requires computing 28 extra layers, raising inference cost. Zhipu also admits that GLM-5.4 sometimes "thinks endlessly" and can't stop. The creator offers an analogy: revising each sentence twice is fine, but writing endlessly means going off-script. Zhipu is reportedly researching having only the characters that need it run an extra pass, while the rest go through once.

Bigger or Thinking Longer?
The claim that 750 billion parameters rivals 2 to 3 trillion remains Zhipu's own statement—there are no official benchmark results, and the model cannot be downloaded or accessed via API. But the direction this technology points to is worth considering: making a model stronger doesn't necessarily require making it bigger; it can also mean thinking longer. As the diminishing marginal returns of parameter expansion are increasingly discussed, recurrent computation offers a new approach to improving reasoning ability under controllable training costs. How to strike a balance between "thinking longer" and "not being able to stop" will be key to future implementation.
One-line Summary
Zhipu's GLM-5.4 uses Loop Transformer to repeat some layers instead of stacking parameters, improving reasoning at lower cost.
Paragraph Summary
Zhipu's GLM-5.4 adopts Loop Transformer technology, computing 28 layers twice to improve reasoning without significantly increasing parameters. Inspired by Google research, the technique shows reasoning tasks depend more on computational steps than knowledge memorization. GLM-5.4 has about 750 billion parameters, and Zhipu claims it rivals 2-3 trillion parameter models. Engineering challenges are addressed through continued training, a gating mechanism, and memory borrowing. A 30-billion-parameter controlled experiment shows the loop version uses only 10% more training compute and performs better on reasoning and long text, but inference costs rise and it sometimes can't stop. This direction offers a new approach to model enhancement.
Related articles
NVIDIA Cuts Gaming GPU Supply by Anoth…
NVIDIA Cuts Gaming GPU Supply by Another 20-30%, Pushing Players to the Margins
VideoCardz reports NVIDIA has cut quarterly gaming GPU supply by another 20-30%. We analyze the capacity allocation logic behind the cut, the price impact on gamers and channels, and whether this signals gaming's declining priority in NVIDIA's strategy.

The Three-Fruit Puzzle: How Can the Bear Guarantee Getting Half the Fruit?
Explore the three-fruit puzzle: how can a bear choose 51 out of 100 baskets and guarantee at least half of the apples, pears, and kumquats? This article introduces the background, formalization, and possible solutions.

An Unexpected Discovery in a Home Depot Retention Pond: The Hidden Life of Urban Ecology
Biologist Joseph Ricketts snorkeled in a Home Depot retention pond and found triops, frogs, and snakes. This article explores ecological resilience in temporary urban waters and what wetland loss reveals.