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

GLM-5.4 Loop Transformer Deep Dive: Architecture and Cost-Effectiveness

GLM-5.4 Loop Transformer Deep Dive: Architecture and Cost-Effectiveness

GLM-5.4 uses looped shared weights to add computational depth; 30B ablation shows major gains, but pricing and long-tail latency bear watching.

GLM-5.4's core is not stacking parameters but increasing effective computational depth via the Loop Transformer: the middle 28 layers are shared and looped twice, adding 28 layers of execution depth, enabled by per-token gating, hybrid KV cache, and reuse-absorbed attention indexing. 30B ablation shows math M25 up 11.25 points and science/long-context up 7–8+, though average output shrinks 2%–15% and long-tail thinking appeared on launch day. With 750B benchmarks and API pricing unpublished, simulating at 5.3 prices suggests overthinking could raise per-request cost from 1.36 to 3.6–6.4 yuan. The article recommends measuring total cost per successful task rather than unit price, notes strong-weak collaboration suits planning/execution separation, and advises mature low-cost models plus strong review as a fallback initially.

Introduction: A New Path Prioritizing Computational Depth

The release of GLM-5.4 has sparked widespread discussion in the community. Its core idea is not to stack parameters, but to increase effective computational depth through the Loop Transformer architecture. According to an in-depth breakdown by a technical creator on Bilibili (combined with feedback from multiple community sources), 5.4's ablation experiments at the 30B scale show a significant score increase, but the full 750B benchmark results and API pricing have not yet been published. Long-tail thinking feedback also appeared on launch day, so cost-effectiveness remains to be seen.

This article systematically reviews GLM-5.4's technical characteristics and deployment recommendations across four dimensions: architecture principles, experimental data, multi-model collaboration patterns, and cost sensitivity.

Architecture Principles: Looped Shared Weights and Three Engineering Innovations

GLM-5.4 designates the middle 28 layers of the base model as a shared module, executed for two rounds, effectively increasing the total number of executed layers by 28. Although the parameter count does not grow, repeated execution still requires computation and memory bandwidth, and is not equivalent to adding 28 independent layers.

To make the loop architecture truly deployable, 5.4 relies on three engineering innovations:

  • Per-token gating: Prevents activation range explosion and ensures the stability of looped computation.
  • Hybrid KV cache: Controls memory usage for million-token contexts and enables efficient inference over long sequences.
  • Reuse-absorbed attention indexing: Eliminates redundant index computation and reduces the overhead introduced by looping.

Controlling memory for million-token contexts

Three easily confused concepts need to be clarified: MoE determines which experts are activated; Loop determines how many rounds shared weights are looped in depth; external thinking tier determines how many reasoning tokens are generated. These are at different levels and do not replace one another.

Loop Transformer is a class of architecture that lets a model iterate over the same weights multiple times, in contrast to a standard Transformer where each layer's weights are used only once. The basic approach is to select a contiguous block of layers from the base model as a shared module and call it repeatedly for N rounds during the forward pass, extending effective computational depth to "fixed layer count × loop rounds." Since the parameter count stays the same while computation grows with each loop, such models can trade the same memory footprint for stronger reasoning ability, but the cost is that each loop must run through the full attention and feed-forward computation, increasing memory bandwidth pressure. Loop structures also tend to cause activation values to amplify exponentially with each round, so gating or normalization mechanisms are usually needed to constrain them.

MoE (Mixture of Experts) is a sparse architecture that keeps per-inference computation low even when the total parameter count is large: the feed-forward layer is split into multiple parallel "experts," and each token is scored by a router so that only a few experts are activated for computation. Its core variable is "which experts are activated," which is orthogonal to how many rounds the model loops in depth—the former determines the computational width within a single layer, while the latter determines how many passes the network executes. Therefore, when evaluating Loop-type models, one cannot simply convert the equivalent layers brought by looping into MoE parameter expansion; the two affect memory, bandwidth, and latency through completely different paths.

30B Experimental Data: Score Gains and Shorter Outputs

The officially published 30B ablation experiments show that under training conditions with about 100 more layers' worth of computation at 10%, math M25 improves by 11.25 points, and science and long-context scores also improve by more than 7 to 8 points. Note, however, that these are only 30B ablation results and do not represent the ranking of the 750B flagship.

According to analysis by the Bilibili creator, average output length in the 30B experiments shrank by 2% to nearly 15%, suggesting that some implicit computation may have replaced explicit thinking. This is not contradictory to the extremely long thinking seen in a few requests on launch day—an average reduction does not mean there is no long-tail risk.

Can reduce explicit reasoning tokens

Loop Transformer is not exclusive to large models. As early as July there was the 3B Nanbeige 4.2, and on November 20 there was the 26.4B Inkling 2 mini, whose three loop rounds reduced explicit reasoning tokens by about 53%. The real significance of GLM-5.4 is that it pushes this path to the 750B flagship.

Ablation study refers to adding or removing a component or setting one at a time under controlled conditions to isolate that factor's independent contribution to the final metric. The 30B ablation in this article compares score differences with and without the loop structure while holding model scale, data, and training budget fixed. The value of such experiments lies in clear causal attribution, but their conclusions are limited by scale: the direction and magnitude of gains on small models may not extrapolate linearly to the 750B flagship, especially when data mixtures, training stability, and inference strategies all change. Therefore, treating 30B improvements directly as a prediction of flagship ranking is a common misreading.

Multi-Model Cost-Effectiveness and Collaboration Strategies

Since 5.4's standalone API price has not been announced, we use 5.3's current RMB pricing as a baseline: 100K input plus 20K output costs 1.36 yuan on paper for 5.3, while Flash costs only 0.136 yuan. But subscription quotas cannot be directly converted to per-token unit prices. Assuming 5.4 follows 5.3's pricing for sensitivity simulation, once there is 5x or 10x overthinking output, the cost per request jumps from 1.36 yuan to 3.6 yuan or even 6.4 yuan, and latency and cost are amplified simultaneously.

Latency and cost are amplified simultaneously

Converted at the day's exchange rate into a unified USD logarithmic chart, GLM-5.3 Flash and GPT6 Luna are both in the low-price tier around $0.1, Deep-seek's cached price is extremely low, and GLM-5.3 is about 3 to 4 times Gemini Neo. 5.4 has still not been announced. Under a fixed on-paper workload of 100K input plus 20K output, spending across models ranges from 2 cents to $1.6, a spread of nearly 80x. But real procurement cannot look only at on-paper unit prices; it must be measured by the total cost per successful task, including retries.

Community feedback shows that the four comparison models each have shortcomings: GLM-5.4 stands out for long-tail thinking latency; Deep-seek requires attention to counterattack costs; Astra has isolated cases of stopping midway; and Gemini Neo has abnormal thinking errors and compatibility feedback.

Applicable Boundaries of Strong-Weak Collaboration

Not all tasks are suitable for strong-weak collaboration. Multi-module architectures and pre-release review are suited to separating planning from execution, while small changes or high-concurrency core design are actually faster and more stable end-to-end with a single strong model. The choice should be based on failure cost, not unit price.

In Cloud Code there are three pairing approaches: the recommended one is to use the Operous Plan alias to let 5.4 do planning and Flash do execution; you can also configure an independent Flash sub-agent; or Flash can modify code first and then 5.4 reviews the staging area.

Alias lets 5.4 do planning

DeepCodex follows the same role-division logic: use GPT6.1 SOH for planning and review, LUNA for execution, and escalate back to SOH promptly after consecutive failures. However, the community currently lacks rigorous controlled experiments, so the two approaches cannot be directly ranked. Based on theoretical workload, the on-paper cost of SOH plus LUNA can drop from $0.65 to $0.27, saving 58.5%, but this is only an idealized model; in real environments, handoff context and counterattack overhead must be deducted to see the net benefit.

Cost per successful task is the actual expenditure metric obtained after factoring in unit price, retries, failure rework, and human intervention. Compared with on-paper unit price, it is closer to procurement decisions: a model with an extremely low unit price but a high failure rate and repeated retries may have a real cost higher than a model with a higher unit price but a high first-pass rate. The usual calculation is "cost per call × average attempts ÷ success rate," plus hidden overhead such as handoff context and review steps. For strong-weak collaboration architectures, this metric is especially critical, because context transfer between planning and execution models itself consumes extra tokens.

Deployment Recommendations and Outlook

Technically, Loop opens a new path for depth scaling, but 5.4 still has long-tail latency and undetermined pricing. For deployment, it is advisable to first rely on a combination of mature low-cost models and strong review as a fallback, and then make large-scale replacements after independent benchmarks and API quotes are available.

For developers, the focus should shift from "lowest unit price" to "total cost per successful task," and whether to adopt a strong-weak collaboration architecture should be decided in light of the failure cost of their own tasks.

One-line Summary

GLM-5.4 increases computational depth with looped shared weights; 30B ablation shows significant score gains, but pricing and long-tail latency remain to be seen.

Paragraph Summary

GLM-5.4's core is not stacking parameters but increasing effective computational depth through the Loop Transformer architecture: the middle 28 layers of the base model are set as a shared module and looped for two rounds, equivalently adding 28 layers of execution depth, enabled by three engineering innovations: per-token gating, hybrid KV cache, and reuse-absorbed attention indexing. The 30B ablation experiments show math M25 improves by 11.25 points, with science and long-context scores up by more than 7 to 8 points, but average output shrinks by 2% to 15%, and long-tail thinking feedback appeared on launch day. Since full 750B benchmark results and standalone API pricing have not been published, simulations based on 5.3 pricing suggest overthinking could raise per-request cost from 1.36 yuan to 3.6–6.4 yuan. The article recommends measuring by total cost per successful task rather than unit price; strong-weak collaboration suits scenarios that separate planning from execution, and initial deployment should use mature low-cost models plus strong review as a fallback.

#GLM-5.4#Loop Transformer#shared-weight looping#ablation study#cost per successful task#strong-weak collaboration#computational depth#API pricing
Share:

Related articles