A flagship that runs its own layers twice

Z.ai has released GLM-5.4, and the unusual thing about its new flagship is not how big it is but how often it runs. The company’s technical documentation describes the model as its first flagship built on a Loop Transformer architecture: it takes 28 layers of the existing GLM-5 base model and runs them for two iterations on every forward pass. The parameter count does not move. The effective depth doubles.

Z.ai says the result reaches “intelligence levels comparable to 2T-3T parameter models”. It has published no benchmark scores for the flagship to support that figure, and the model is for now only reachable through the company’s GLM Coding Plan.

Why loop instead of grow

In an ordinary transformer each layer runs once per forward pass. In a looped one, a block of weight-shared layers runs several times, each pass refining the hidden states the previous one produced. Z.ai is explicit that the idea is not new: it credits the 2018 Universal Transformer for weight-shared depth, and concedes that looped models trained from scratch still trail unshared models given the same pre-training compute.

Its answer was to avoid training from scratch. Z.ai converted an already pre-trained base model into a Loop Transformer through continued training, which it says raised the intelligence ceiling “with a relatively small compute overhead”. The company’s stated reasoning is that memory-heavy tasks reward more parameters while reasoning-heavy ones reward more effective compute — and that large-scale software engineering, cybersecurity, 3D modelling and physical control are all long-chain reasoning problems that stacking parameters does not solve.

Steel gear wheels meshing inside an industrial machine housing
Illustration: Z.ai's loop reuses one block of weights across two iterations per forward pass. Flickr · pexels · Pexels License

Three changes to make looping affordable

Running a block twice naively doubles the KV cache, so Z.ai describes three modifications made at what it calls the 750B scale. Per-token gates write each iteration’s candidate updates back into the residual stream proportionally, which the company says stops activation norms blowing up; after training, the first pass writes conservatively and the second opens up. A hybrid KV cache lets the second loop reuse the sparse keys and values the first pass selected while keeping its own within a sliding window, so an extra loop costs one sliding window rather than a full context cache. And the second loop reuses the first loop’s sparse-attention indices outright, which Z.ai reports performs almost identically to recomputing them.

The published evidence is from a 30B model

The architecture was validated progressively on 1B, 4B, 30B and 750B base models, Z.ai says. The controlled comparison it reports, however, is on the 30B model. With identical parameter counts and roughly 10% more total training compute, the looped version gained most on maths, scientific reasoning and long-context tasks, and average output length fell by 10 to 14% on benchmarks including GPQA-Diamond and MMLU-Pro — reasoning shifting, in Z.ai’s description, out of explicit tokens and into the depth of the loop.

Rows of fibre-optic connectors plugged into a patch panel, cables looping away to the left
Illustration: the architecture's cost sits in the key-value cache, which Z.ai redesigned to keep looping affordable. Brett Sayles · pexels · Pexels License

Availability, speed and a stated flaw

GLM-5.4 handles video, image, text and file input, has a one-million-token context window and a 128,000-token maximum output. Z.ai reports up to 200 tokens per second off-peak and 70 to 80 at peak load. Coding Plan subscribers on weekly quotas get 1.5 times the GLM-5.3 allowance; the Model API, Z.ai says, will arrive “upon completion of the security assessment”.

The company names one limitation plainly: the model tends to get stuck in overly long “marathon thinking” loops, though it argues the extra reflection does improve accuracy beyond what its parameter count would suggest.

Z.ai says it is now pursuing both depth and scale, and that a “significantly larger” successor built on what it learned here “will be ready soon”. The open questions it lists are adaptive compute, so harder tokens get more iterations, and how the returns from looping behave as both loop count and model size keep rising. The nearer test is simpler: whether independent benchmark scores, once the API opens, support the two-trillion-parameter comparison.