Models & Research

GLM-5.4: Z.ai runs its flagship through a loop

2 min read AI-generated

750 billion parameters, with 28 layers run twice. Open weights only come after safety hardening, and the regular API doesn't offer the model yet.

Featured image for "GLM-5.4: Z.ai runs its flagship through a loop"

Chinese AI lab Z.ai released GLM-5.4 on Monday, its first flagship built on a Loop Transformer architecture. At 750 billion parameters, Z.ai says it reaches the level of models with two to three trillion. The announcement passed 1,000 points on Hacker News.

What a Loop Transformer does

In a standard Transformer, each layer runs once per forward pass. In a Loop Transformer, a group of weight-shared layers runs several times in a row, refining what the previous pass computed. The network gets deeper without adding parameters. GLM-5.4 runs 28 layers of the GLM-5 base model twice.

The idea isn’t new, and Z.ai says so itself. Looped models trained from scratch still trail regular models on the same compute budget, though. So Z.ai took an already pre-trained model and converted it into a Loop Transformer through continued training. A few tricks keep the second pass from blowing up memory: it reuses the first pass’s KV cache and only adds a sliding window of its own. At one million tokens of context, Z.ai says, the extra deployment cost over GLM-5.3 stays under control.

In a 30-billion-parameter comparison with identical parameter counts and about 10 percent more training compute, the loop helped most with math, scientific reasoning and long context, according to Z.ai. Outputs also got 10 to 14 percent shorter, because part of the reasoning moves into the depth of the loop. Z.ai names one weakness itself: overly long “marathon thinking” loops.

Where to get it

Simon Willison tried GLM-5.4 on Monday and had to sign up for Z.ai’s coding plan to do it. The regular API doesn’t offer the model yet; Z.ai lists it as “coming soon.” Open weights are supposed to follow “after completing necessary safety hardening.” Willison built a plugin for his llm tool and says GLM-5.3 and 5.4 look about the same in his pelican test.

Two looped models in one week

GLM-5.4 is the second looped model in a week. On November 20 Thinking Machines released Inkling 2 Mini, which runs its middle layers three times. Both labs make the same argument: agentic coding depends on long chains of reasoning, and compute depth helps there more than extra parameters. There are no independent benchmarks for GLM-5.4 yet; everything so far rests on Z.ai’s own ablations. Z.ai is already teasing its next, significantly larger model, built on what it learned about loops.

Sources

Z.aiGLMOpen SourceModelsCodingChina