Skip to main content
osky
Sección
AI

On November 23, 2026, Z.ai (Zhipu's international brand) introduced GLM-5.4, its new flagship model and the first one built on a Loop Transformer architecture: instead of passing each token through all of its layers just once, the model runs a block of 28 middle layers twice, with the same weights. The promise is more reasoning without adding parameters; according to Z.ai, it performs like a model with 2 to 3 trillion parameters (2T–3T) while starting from a base of roughly 750 billion. It's already available to GLM Coding Plan subscribers, but the per-token API is not: it will arrive, the company says, once a safety evaluation is finished. And open weights, which have been the house trademark, will have to wait.

For anyone who programs with agents, the news has two layers: the technical one (why a loop could be the next lever after "more parameters") and the practical one (what it costs to use today and what limitations the maker itself admits).

What a Loop Transformer is, no hype

In a normal Transformer, each layer runs once per step. In one with a loop, a group of layers that share weights runs several times, and each pass refines what the previous one left behind. The result: a deeper network with the same number of parameters.

The idea isn't new and Z.ai acknowledges it: the Universal Transformer already proposed depth with shared weights back in 2018. The problem, according to the blog, is that looped models trained from scratch still underperform normal ones given the same training budget. That's why Z.ai didn't start from scratch: it took the already pretrained GLM-5 base and converted it into a Loop Transformer through continued training. That way, it says, it raises the intelligence ceiling at a relatively small compute cost.

The official diagram shows the layout: layers 1 to 26 run once (the "prelude"), layers 27 to 54 run twice, and layers 55 to 78 wrap things up (the "coda").

Diagram of the GLM-5.4 architecture: prelude of layers 1 to 26, pass 1 and pass 2 over the same layers 27 to 54 with gates, and coda of layers 55 to 78

The three tricks to keep the loop from getting expensive

Going around twice sounds like paying double. Z.ai describes three changes so that doesn't happen at the 750B scale:

  • Per-token gates. If the second pass simply overwrites the state, the activation norms blow up and the lower layers receive out-of-scale values. GLM-5.4 adds independent per-token gates on each pass that decide how much of the update gets written. After training, the first pass writes cautiously and builds the global context; the second opens the gates and refines. On hard tokens, the first pass writes more strongly.
  • Hybrid KV cache. Storing a full cache per pass would multiply memory. The second pass reuses the sparse cache selected by the first (the diagram marks top-k of 2,048) and only adds its own sliding window, 128 tokens according to the diagram. Z.ai says that this way, at 1 million tokens of context, the deployment cost compared to GLM-5.3 stays "well under control."
  • Reused attention indices. The base uses sparse attention; the second pass uses the indices computed by the first, with no extra indexing cost. According to its tests, the result is nearly identical to recomputing them.

The numbers: what they do and don't show

The cleanest data point in the announcement isn't from the big model, but from a controlled experiment: a 30B model with the same architecture as the 750B base, compared against itself with and without the loop, with the same parameters and only ~10% more training compute.

Chart of Z.ai's ablation on a 30B model: AIME25 rises from 19.17 to 30.42, GPQA-Diamond from 47.58 to 56.26, AA-LCR from 40.33 to 47.67, MMLU-Pro from 71.65 to 75.05, and IFBench from 50.20 to 53.47

Test Without loop With loop Improvement Shorter response
AIME25 19.17 30.42 +11.3 2%
GPQA-Diamond 47.58 56.26 +8.7 11.7%
AA-LCR 40.33 47.67 +7.3 9.7%
MMLU-Pro 71.65 75.05 +3.4 14.9%
IFBench 50.20 53.47 +3.3 13.0%

Two things come out of that, according to Z.ai: the biggest gains are in math, scientific reasoning, and long context, and the model writes 10% to 14% less on most tests, because part of the reasoning moves from visible tokens into the depth of the loop.

For GLM-5.4 itself, the documentation publishes a "win rate" chart: it wins 51.1% of comparisons against GLM-5.3, 41.8% against Kimi K3.1 Pro, and 36.6% against DeepSeek-V4.1-Flash-1017 (with ties of 25.7%, 26.9%, and 30.2%). My take: these are the maker's own figures, with no detailed methodology in the announcement, and the comparison doesn't include the top closed models. "Comparable to a 2T–3T model" is a claim by Z.ai, not an independent measurement.

How much it costs and where to use it

Today GLM-5.4 lives inside the subscription: the GLM Coding Plan starts at 18 dollars a month and works from the coding tools you already use, plus ZCode and the Z.ai chat. The plan documentation shows an interesting detail: GLM-5.4 spends fewer credits per token than GLM-5.3 (multipliers of 4.6 for input, 1.1 for cached input, and 16 for output, versus 6.9, 1.7, and 24). That's why the weekly quota stretches 1.5 times further with the new model.

Another detail that's handy in Mexico: Z.ai charges 50% of credits outside peak hours, and its peak time is Monday to Friday from 14:00 to 18:00 in Singapore, that is, from midnight to 4:00 a.m. in Mexico City. In practice, nearly the entire Mexican workday falls in cheap hours. On speed, Z.ai reports up to 200 tokens per second off-peak and 70 to 80 at peak.

The spec sheet: video, image, text, and file input; text output; 1 million tokens of context; up to 128K of output; thinking mode, function calling, streaming, context caching, and structured output.

What's not there yet: per-token API pricing or open weights. Z.ai says it will release the weights "responsibly" after strengthening safety, with no date. If your use case depends on running it on your own infrastructure, for now you'll have to wait.

The limitation the maker admits

Z.ai says it straight: the model tends to get stuck in "marathon thinking" loops, overly long reflections. It adds that this excess self-correction improves accuracy, but for anyone paying by credits or waiting on responses in an agent, overthinking also means more time and more consumption. I haven't tested it: all of this comes from Z.ai's official blog and documentation.

It's not the only one betting on the loop

Three days earlier, on November 20, Thinking Machines Lab launched Inkling 2 Mini, an open-weights model with 26.4B total parameters that runs its middle layers three times per token and fits in about 20 GB. In the Hacker News thread about GLM-5.4, which passed a thousand points, one comment brought it up precisely to point out that Z.ai wasn't first: Thinking Machines had already published an open model with a loop.

My take: if two labs with such different strategies arrive at the loop in the same week, one with a laptop-sized model and the other with its 750B flagship, the question for the coming months stops being "how many parameters?" and becomes "how many loops?" Z.ai has already previewed that its next model, "significantly larger," inherits all of this and will be ready soon, and that it is researching how to give hard tokens more loops adaptively.

Sources