Z.ai has announced GLM-5.4, its first flagship model built on a Loop Transformer architecture. According to the company, it achieves a level of intelligence comparable to that of 2T-3T parameter models, a claim not yet backed by a scoreboard for the flagship model. For developers, Z.ai highlights the concept of ‘Generalized Coding,’ where code serves as a tool to produce videos, games, 3D shaders, or CAD models.
A Transformer is the architecture underpinning most large language models, these systems trained to manipulate text. In a classic Transformer, each layer is executed only once per pass. In GLM-5.4, a group of 28 layers with shared weights runs twice, i.e., 2 iterations.
Z.ai did not train this loop model from scratch. It adapted the base GLM-5 model, already pre-trained, through continued training. The technical post published by Z.ai indicates that loop models trained from scratch still lag behind non-shared models given equal computation. Adapting an existing base would, according to the company, raise its ceiling with a relatively low computational overhead.
Three modifications to make the architecture practicable
According to Z.ai, rewriting hidden states from one loop to another caused activation norms to explode. GLM-5.4 therefore adds independent gates, specific to each token and each iteration. The first pass writes small updates and builds the global context, while the second opens these gates to refine the output. On the most difficult tokens, the first pass writes more strongly.
A naive design would retain a full KV cache for each loop. The KV cache is an intermediate memory used during text generation. In GLM-5.4, the second loop reuses the sparse KV selected during the first pass and only keeps its own KV in a local sliding window. The overhead thus corresponds to just one sliding window, not a full cache, which, according to Z.ai, keeps the cost increase compared to GLM-5.3 at 1M context. Finally, the second loop reuses the indices from the first pass’s indexer, with no indexing overhead. Z.ai reports results nearly identical to those obtained by recalculating indices on each pass.
Results published on a 30B model
Z.ai has not yet published benchmark scores for the 750B model. A team member indicated these scores will come later, according to DataCamp. The only available data comes from an ablation with equal parameters on a 30B model that shares the architecture of the 750B base. The loop version used about 10% more total training compute, and scores were measured after a long-context SFT of 200K, thinking mode activated.
The most marked gain concerns AIME25, which goes from 19.17 to 30.42 (+11.3). GPQA-Diamond improves from 47.58 to 56.26 (+8.7), AA-LCR from 40.33 to 47.67 (+7.3), MMLU-Pro from 71.65 to 75.05 (+3.4), and IFBench from 50.20 to 53.47 (+3.3), the smallest gain. Z.ai also notes that response length decreases on most tasks: by 14.9% on MMLU-Pro and 11.7% on GPQA-Diamond. The company suggests that part of the reasoning may shift to the implicit depth of the loop. AIME25 is an exception, with only a 2% decrease. Z.ai also reports a phenomenon it calls ‘marathon thinking,’ prolonged reasoning loops.
Access, throughput, and pricing
The model is currently accessible only via Z.ai’s products: the GLM Coding Plan, the ZCode desktop app, which works on macOS, Windows, and Linux (beta), and Z.ai Chat. The weights are not yet published and must undergo security reinforcement. Z.ai announces up to 200 tokens/s off-peak and 70 to 80 tokens/s under peak load. The GLM Coding Plan offers Lite at $12.6/month, Pro at $56, and Max at $117.6. Z.ai notes these prices may change.
