[KongchangAI]
· 3 min read· 1,625 words

GLM-5.4 Loop Transformer Explained: How to Improve Performance Without Adding Parameters

GLM-5.4 Loop Transformer Explained: How to Improve Performance Without Adding Parameters

GLM-5.4 improves performance with unchanged parameters via looped inference, betting on architectural innovation rather than a parameter race

Zhipu GLM-5.4 quietly went online, with the core change being the Loop Transformer architecture: input first passes through the first several layers for preliminary understanding, then about 28 middle layers run for two rounds with shared parameters, and the second round reuses the KV information and TopK indices from the first round, combined with dual-path attention to read both global history and newly generated local information. This yields extra computational depth without increasing parameter count, at the cost of higher inference latency. The article argues that this signals Zhipu's shift from a parameter race to expanding capability boundaries, with the product focusing on the general Coding field covering code, video, and 3D generation. The official comparison gives a score increase from 19 to 30.42 and claims to be the domestic model with the strongest feel, but the author reminds readers that a single metric does not equal comprehensive superiority, and the latency cost in real-time scenarios and performance outside the scenarios still require independent verification.

Title

GLM-5.4 Loop Transformer Explained: How to Improve Performance Without Adding Parameters

Meta Description

Zhipu's GLM-5.4 adopts the Loop Transformer architecture, improving performance without increasing parameter count through parameter sharing and looped inference. This article explains its dual-path attention, KV reuse mechanism, and general Coding positioning, and analyzes the route choices and limitations behind the architectural innovation.

Article Content

Zhipu's latest flagship model GLM-5.4 quietly went online, without a grand launch event, yet it brought a change at the architectural level worth reading closely—Loop Transformer. In a video, Bilibili creator Xiao Liu broke down the official documentation, and the core conclusion is straightforward: improve performance without increasing the model's parameter count. This sounds like marketing talk, but the mechanism and trade-offs behind it deserve a deeper discussion.

What Exactly Is Loop Transformer Looping Over

Architectural approach of not increasing parameter count

The traditional Scaling Law logic of large models is to stack parameters, data, and compute—the larger the parameters, the stronger the capability. But this path will eventually hit a bottleneck—cost, energy consumption, and inference latency are all hard constraints. Loop Transformer takes a different direction: keep parameters unchanged and let the model run several more rounds during the inference stage.

In terms of structure, input text, images, and other information first pass through the first several layers for preliminary understanding (the "layers 1 to 26" preprocessing understanding stage mentioned by the creator), and then enter the loop body. In the second round, the loop body performs deeper reasoning based on the results of the first round's thinking, so you will see that the chain in the deep reasoning stage is noticeably longer. The cost is increased inference time; the benefit is that even if the model's parameter count is not large, performance can be pushed to a higher level.

This idea is not new—looped computation and weight sharing have long been discussed in academia. The characteristic of GLM-5.4 is that it engineered this mechanism into a flagship model and provided quantifiable benefits.

Scaling Law is the background premise for understanding this architectural turn. It originates from empirical regularities summarized by OpenAI and other institutions around 2020: the cross-entropy loss of a model decreases as a power law with parameter count, data volume, and compute, so "bigger is stronger" became the main line of the large-model race over the past few years. But this curve is not endless—to maintain a fixed rate of loss decrease, the required compute grows exponentially, while training cost, memory usage, and inference latency expand simultaneously. For this reason, the industry began exploring paths that "do not rely on stacking parameters for performance," including sparse expert models (MoE), long chain-of-thought reasoning, and test-time compute scaling. Loop Transformer belongs to an architectural implementation of the latter type of approach: placing extra computation in the inference stage to repeatedly call the same set of weights, trading time for quality. Only by understanding this can one understand where exactly the "different direction" mentioned in the article is.

Dual-Path Attention and KV Reuse: Looping Is Not Simple Repetition

Deep reasoning chain becomes longer

If it were merely running the same set of layers twice, that would be no different from deepening the network, and the parameter count would actually double. The key design of Loop Transformer lies in parameter sharing + computation result reuse.

In the video, the creator relayed the official documentation's statement: about 28 middle layers run for two rounds, the two rounds share parameters, and the second round directly uses the KV information and TopK indices produced in the first round. Combined with the dual-path attention mechanism, the second round both reads the global information from the first round and processes the local information newly generated by itself, combining the two to improve model performance.

This explains why "performance can improve without adding parameters"—the increment comes from the extra computational depth brought by looping and cross-round information reuse, not from new weights. Put more plainly, the model learned to "think one more round," not to "grow another brain."

KV Cache is the concept that most needs supplementing here. During autoregressive generation in a Transformer, each layer computes Key and Value vectors for the tokens already processed; without caching, every new token generated would require recomputing all preceding context, which is extremely costly. KV cache stores these intermediate results and reuses them directly in subsequent steps, and is infrastructure for inference acceleration. The article's statement that "the second round directly uses the KV information produced in the first round" means that the loop body does not need to rebuild the context representation from scratch, but continues processing on top of the first round's results—this is precisely the key to producing an increment despite parameter sharing. The accompanying TopK indices usually appear in sparse attention or MoE routing, used to record the most relevant positions or experts actually activated in each round, so that the second round can focus on key points and reduce redundant computation. Together, the two prevent "running one more round" from degenerating into expensive repetitive labor.

What Zhipu Is Betting On: Expanding Capability Boundaries Rather Than a Parameter Race

Route choices behind architectural innovation

One judgment from the creator deserves attention: this is a signal that Zhipu is developing in another direction, namely the expansion of AI capability boundaries. Stacking parameters to a certain level will inevitably encounter a bottleneck; it is only a matter of time. Rather than continuing to raise the stakes in the parameter race, it is better to find new growth points at the architectural level.

This also explains the positioning of GLM-5.4—it focuses on the general Coding field. According to the creator's explanation, general Coding is not just writing code; it also extends to directions such as video and 3D, and can use code as a tool to drive multimodal generation. The stronger reasoning capability brought by Loop Transformer precisely matches tasks of this kind that require multi-step planning.

There is a rather confident statement in the official documentation: among all current domestic models, GLM-5.4 is the domestic model with the strongest feel. When relaying it, the creator used "beats everything" to describe this tone, and reminded viewers that this is only the official claim and that actual experience varies from person to person.

General Coding is a concept worth expanding on. It is not simply "code completion," but rather treats code as an executable intermediate representation: the model first generates structured code or scripts, and then uses tools such as rendering, simulation, or geometric construction to drive the generation of modalities such as video and 3D assets. Compared with directly "painting" results with diffusion models, the code path has the advantages of being editable, reusable, and verifiable, and is also easier for multi-step planning and error correction. Such tasks place significantly higher demands on reasoning depth than single-turn Q&A—they require decomposing goals, arranging steps, and checking intermediate products, which exactly corresponds to the extra computational depth that Loop Transformer obtains through looping. Therefore, the architectural choice and product positioning mesh with each other: the capability growth point is chosen in multi-step reasoning, and the application scenarios fall on general Coding, which requires multi-step planning.

Data and Boundaries of Performance Improvement

Performance statements in official documentation

The video gives a specific comparison: a certain score rose from 19 to 30.42, used to illustrate the performance leap after the Loop architecture improvement. The creator also showed use cases shared by netizens, believing that these examples can corroborate the effectiveness of the architectural innovation.

What needs to be kept clear is that a score improvement in a single dimension does not equal comprehensive superiority; the latency cost brought by looped inference may become a burden in real-time scenarios, and performance outside general Coding scenarios also awaits verification by more independent evaluations. The creator himself also clearly stated that he would not do a first-release review, but instead chose to calm down and read the documentation. This attitude itself is worth noting—architectural interpretation and actual experience are two different things.

Conclusion

The question raised by GLM-5.4's Loop Transformer is more interesting than the answer it gives: when the marginal returns of parameter expansion diminish, where is the innovation space for model architecture? Looped inference is an answer with engineering value, but whether it represents the mainstream direction of the next generation still needs more models and more empirical tests for cross-validation. For developers, what is worth paying attention to is not only benchmark scores, but the real performance of this architecture on long-chain reasoning tasks.

One-line Summary

GLM-5.4 uses looped inference to improve performance with unchanged parameters, betting on architectural innovation rather than a parameter race

Paragraph Summary

Zhipu's GLM-5.4 quietly went online, and the core change is the adoption of the Loop Transformer architecture: input first passes through the first several layers for preliminary understanding, then about 28 middle layers run for two rounds with shared parameters, and the second round reuses the KV information and TopK indices from the first round, combined with dual-path attention to simultaneously read global history and newly generated local information. This yields extra computational depth without increasing parameter count, at the cost of higher inference latency. The article argues that this is a signal of Zhipu shifting from a parameter race to expanding capability boundaries; the product focuses on the general Coding field, covering code, video, and 3D generation. The official comparison gives a score increase from 19 to 30.42 and claims to be the domestic model with the strongest feel, but the author reminds readers that a single metric does not equal comprehensive superiority, and the latency cost in real-time scenarios and performance outside the scenarios still require independent verification.

#GLM-5.4#Loop Transformer#Zhipu#parameter sharing#KV cache#general Coding#model architecture
Share:

Related articles