Twenty-Eight Layers, Run Twice

On 23 November Z.ai published “Toward Generalized Coding with Our First Loop Transformer,” the launch post for GLM-5.4. The architecture is the news. In a standard transformer each layer runs once per token. In GLM-5.4, the post says, “a group of weight-shared layers runs for multiple iterations, refining the hidden states from the previous pass. This gives us a deeper network without increasing the parameter count.” Concretely: “GLM-5.4 loops 28 layers of the GLM-5 base model for two iterations.”

The post makes two claims about what this buys. The first is that GLM-5.4 reaches “intelligence levels comparable to 2T-3T parameter models.” The second is a controlled experiment on a 30B model, where “with identical parameter counts and only ~10% more total training compute, the looped version showed clear gains.” It also says the looped model writes shorter answers, so “part of the reasoning shifts from explicit output tokens into the implicit depth of the loop.”

I think the engineering is real, and the ablation discloses more than most launches do. But the control in that ablation holds the wrong thing constant, and once you correct for it the shorter answers stop looking like savings.

What the ablation shows

The table in the post compares a 30B model “with the exact same architecture as our 750B base” against its looped version. Both were “evaluated on the 30B model after 200K long-context SFT, with thinking mode enabled.”

Benchmark Baseline + Loop Change Avg. output length
AIME25 19.17 30.42 +11.3 −635 tokens (−2%)
GPQA-Diamond 47.58 56.26 +8.7 −2,473 tokens (−11.7%)
AA-LCR 40.33 47.67 +7.3 −539 tokens (−9.7%)
MMLU-Pro 71.65 75.05 +3.4 −863 tokens (−14.9%)
IFBench 50.20 53.47 +3.3 −763 tokens (−13.0%)
GLM 30B ablation: baseline versus looped scores A dot plot of five benchmark scores for Z.ai's 30B model, before and after looping, on a scale from 0 to 80. AIME25 rises from 19.17 to 30.42, a gain of 11.3 points. GPQA-Diamond rises from 47.58 to 56.26, plus 8.7. AA-LCR rises from 40.33 to 47.67, plus 7.3. MMLU-Pro rises from 71.65 to 75.05, plus 3.4. IFBench rises from 50.20 to 53.47, plus 3.3. Source: Z.ai's GLM-5.4 post, 23 November 2026. 30B ISO-PARAMETER ABLATION · BASELINE (OPEN) VS + LOOP (FILLED) · Z.AI, 23 NOV 2026 AIME25 GPQA-Diamond AA-LCR MMLU-Pro IFBench AIME25 baseline 19.17 — Z.ai, 23 Nov 2026 GPQA-Diamond baseline 47.58 — Z.ai, 23 Nov 2026 AA-LCR baseline 40.33 — Z.ai, 23 Nov 2026 MMLU-Pro baseline 71.65 — Z.ai, 23 Nov 2026 IFBench baseline 50.20 — Z.ai, 23 Nov 2026 AIME25 with loop 30.42 — Z.ai, 23 Nov 2026 GPQA-Diamond with loop 56.26 — Z.ai, 23 Nov 2026 AA-LCR with loop 47.67 — Z.ai, 23 Nov 2026 MMLU-Pro with loop 75.05 — Z.ai, 23 Nov 2026 IFBench with loop 53.47 — Z.ai, 23 Nov 2026 +11.3 +8.7 +7.3 +3.4 +3.3 0 20 40 60 80 Sample counts per benchmark are not given. AIME25 has 30 problems, so one problem is worth 3.3 points.
The biggest gain is on the benchmark with the longest answers and only 30 problems.

The pattern the post points out is real: the biggest jumps are on math and science reasoning, the smallest on MMLU-Pro and instruction following. Two details complicate the numbers.

AIME25 is 30 problems, so 11.3 points is about three and a half problems’ worth. The post doesn’t say how many times each problem was sampled. Both scores divide out to whole numbers over 240 answers (46 and 73), which fits eight samples per problem, but that is my inference, not something Z.ai states.

And the length column doesn’t quite match the prose. The text says “across most benchmarks like GPQA-Diamond and MMLU-Pro, average output length drops by 10–14%.” In the table MMLU-Pro drops 14.9% and AIME25, the benchmark with the largest gain, drops 2%. Working back from the percentages, the AIME25 answers average roughly 32,000 tokens and the GPQA ones about 21,000, so the loop barely shortened the longest answers in the table.

Identical parameters, different work

“Identical parameter counts” is true and it is the wrong control. A loop doesn’t add weights; it reuses them. That is exactly why it adds compute: every token goes through the looped layers twice.

GLM-5’s published configuration has 78 transformer layers. Its model card puts it at 744B parameters with 40B active. GLM-5.4 runs 28 of those layers a second time, so a token now takes 106 layer passes instead of 78. That is 36 percent more layer work per token, both in the forward pass and in the sequential chain the hardware has to walk through before the next token can start.

What looping 28 of 78 layers adds, and what it doesn't Top panel: layer passes per token. GLM-5 runs 78 layers once, 78 passes. GLM-5.4 runs the same 78 plus a second pass through 28 of them, 106 passes, 36 percent more. Bottom panel: parameter counts in billions. GLM-5 stores 744 billion parameters, and so does GLM-5.4. If the second pass were counted as a separate copy of 28 layers, the unrolled model would be about 1,011 billion. Z.ai's claim is comparability with 2,000 to 3,000 billion parameter models. Sources: Z.ai GLM-5.4 post, 23 November 2026; GLM-5 model card and configuration, February 2026; the unrolled figure is the author's arithmetic. LAYER PASSES PER TOKEN VS PARAMETERS · GLM-5 CONFIG, Z.AI POST LAYER PASSES PER TOKEN PARAMETERS, BILLIONS GLM-5 GLM-5.4 Stored weights Unrolled copy Z.ai's claim 78 layer passes per token — GLM-5 config.json 78 first-pass layers — GLM-5.4 post, 23 Nov 2026 28 layers run a second time — GLM-5.4 post, 23 Nov 2026 78 106 +28, second pass 744B — GLM-5 model card ~1,011B if the 28 looped layers were separate weights — author's arithmetic "comparable to 2T-3T parameter models" — Z.ai, 23 Nov 2026 744B ~1,011B 2,000–3,000B
The loop leaves the weights alone and raises the work per token by about a third. Counting the second pass as extra weights still gets you to about 1T, not 2T.

Two caveats on my arithmetic. The second pass is cheaper on attention than the first, since it reuses the first pass’s sparse attention indices and shares most of its KV cache, and the post says “an extra loop only costs one sliding window of KV cache rather than a full context cache.” That is a memory saving. The mixture-of-experts feed-forward work in each looped layer still runs again. And the post gives the 28-of-78 split only for the 750B model. It doesn’t say what fraction of layers the 30B ablation loops; below I assume the same share.

The same unrolling gives a sanity check on “2T-3T.” If you treat the second pass as 28 extra layers with their own weights, 744B becomes about 1T. So the claim has to rest on benchmark results against unnamed larger models, and the post publishes no table for it.

Shorter answers, more work per answer

This is where the “fewer tokens” finding changes meaning. If each output token costs about 36 percent more layer work and the answer is 11.7 percent shorter, the answer as a whole costs about 1.36 × 0.883 ≈ 1.20 times as much. Applying the same correction to every row:

Output tokens fall, layer work per answer rises For each of five benchmarks, two bars around a zero line. Outlined bars show the change in average output tokens reported by Z.ai: AIME25 minus 2 percent, GPQA-Diamond minus 11.7, AA-LCR minus 9.7, MMLU-Pro minus 14.9, IFBench minus 13.0. Filled bars show the author's estimate of the change in layer passes per answer, assuming 106 instead of 78 passes per token: AIME25 plus 33 percent, GPQA-Diamond plus 20, AA-LCR plus 23, MMLU-Pro plus 16, IFBench plus 18. CHANGE PER ANSWER · TOKENS (OUTLINED, Z.AI) VS LAYER WORK (FILLED, ESTIMATE) AIME25 GPQA-Diamond AA-LCR MMLU-Pro IFBench Output tokens −2% — Z.ai, 23 Nov 2026 Output tokens −11.7% — Z.ai, 23 Nov 2026 Output tokens −9.7% — Z.ai, 23 Nov 2026 Output tokens −14.9% — Z.ai, 23 Nov 2026 Output tokens −13.0% — Z.ai, 23 Nov 2026 Layer work per answer +33% — estimate from 106/78 × 0.98 Layer work per answer +20% — estimate from 106/78 × 0.883 Layer work per answer +23% — estimate from 106/78 × 0.903 Layer work per answer +16% — estimate from 106/78 × 0.851 Layer work per answer +18% — estimate from 106/78 × 0.87 −2% −11.7% −9.7% −14.9% −13.0% +33% +20% +23% +16% +18% Estimate assumes the 30B model loops the same share of layers as the 750B (28 of 78) and counts output tokens only. Prompt tokens also pass through the loop, so long-input tasks like AA-LCR land closer to +36%.
Every row costs more per answer than before. The loop moved work out of the tokens you can count and into depth you can't see on the bill.

Read closely, the post’s phrasing admits this: reasoning “shifts” into “the implicit depth of the loop.” Shifted work still has to be done. What the table doesn’t let you do is compare the looped model against an unlooped one that got the same extra 20 to 33 percent of compute some other way, by thinking longer, sampling twice, or being a wider model. That is the comparison that would tell you whether looping is the efficient way to spend the extra work or just one way.

The post also notes that the 30B looped model had “~10% more total training compute” than the baseline. It doesn’t say whether the unlooped baseline got a matching round of continued training. That matters for a reason I’ll come back to.

Neural networks have been run in loops before

The post credits the 2018 Universal Transformer and recent recurrent-depth work, and concedes that “looped models trained from scratch still lag behind unshared models under the same pre-training compute budget.” The idea is older than that, and so is the control problem.

In 2015 Ming Liang and Xiaolin Hu added recurrent connections to every convolutional layer of an image classifier and unrolled them for one to three iterations. Their recurrent model, RCNN-96, had 0.67 million parameters; the feed-forward control, WCNN-128, had 0.6 million. They matched parameters, as Z.ai did, and the recurrent model won. But they also tested a plain weight-shared stack, which is closer to a straight loop. They wrote that “simply increasing the depth of CNN by sharing weights between layers can result in the same depth and the same number parameters as RCNN, but such a model may not compete with RCNN in performance.” With more iterations, that stack got “lower training error but higher testing error.” It overfit. Reusing weights helped only in the version that kept feeding the original input back in at every step.

GLM-5.4’s gated updates look like an answer to the same problem: the post says that without them, overwriting hidden states causes “activation norms to blow up across iterations.” But the old result is a reminder that iso-parameter wins depend on details of how the loop is wired, and don’t come free with the idea.

The sharper warning is from 2024. Jonathan Chagnon, Markus Hagenbuchner, Ah Chung Tsoi and Franco Scarselli replaced ordinary convolutional layers with recurrent ones in three networks, balancing weights “for a fairer comparison.” The swap “significantly improves the performances of the 4-CL model, but not those of ResNet or DenseNet.” When they turned the shallow model into a ResNet one step at a time to see where ResNet’s advantage came from, they found “the performance improvement is largely driven by the training regime.” The architectural steps “only account for about 6 point of the observed accuracy improvement.”

So the 10 percent matters. In a converted model, the extra round of training is part of the treatment. A control that gets the same continued training without the loop is the only way to separate the two.

Depth shows up as latency

There’s a cost the ablation can’t capture at all, because it’s about time, not accuracy. A second pass through 28 layers is sequential: the second pass can’t start until the first is done, and the next token can’t start until both are.

Langerman, Johnson, Buettner and George made this point about convolutional networks in 2020. Across 37 networks on eight devices, they found that “the total number of floating-point operations (FLOPs) in a model is an inconsistent predictor of real execution time” on GPUs. What predicted it was the longest chain of dependent operations, because “the data dependencies at a model-level will still result in a serial execution.” A loop lengthens that chain by design.

Z.ai reports that GLM-5.4 “reaches up to 200 tokens/s during off-peak hours and maintains 70–80 tokens/s at peak load,” and that it fused kernels to cut “the fragmented overhead amplified by looping.” It doesn’t give the same figure for GLM-5.3 on the same hardware, which is the number that would show what the loop costs in wall-clock time.

What I’d want to see

I don’t think any of this makes the architecture a bad bet. Ruben van Bergen and Nikolaus Kriegeskorte argued in 2020 that recurrence is a way to fit deeper computation into fixed hardware, and reusing a trained base instead of pretraining from scratch is a sensible way to try it at 750B. The post is also candid about the limits, including a tendency “to get caught in overly long ‘marathon thinking’ loops.”

But “identical parameters” is a storage claim, and the question a user or an operator has is about compute and time. Three numbers would settle it:

  1. A compute-matched control: the unlooped 30B, given the same continued training, run with enough extra thinking budget to match the looped model’s layer work per answer.
  2. The fraction of layers looped in the 30B ablation, and sample counts per benchmark.
  3. Tokens per second for GLM-5.3 and GLM-5.4 on the same hardware at the same load.

Until then, the honest reading of the table is that the looped model spends roughly a fifth to a third more work per answer and gets 3 to 11 points for it. That might be a good trade. The post just doesn’t show the alternatives.

I ran into the same gap between stored and used parameters in September, with DeepSeek’s V4.1-Flash card.

References

  1. Z.ai. “Toward Generalized Coding with Our First Loop Transformer” (GLM-5.4). 23 November 2026. z.ai/blog/glm-5.4
  2. Z.ai. GLM-5 model card and config.json (78 hidden layers; 744B parameters, 40B active). Hugging Face, February 2026. huggingface.co/zai-org/GLM-5
  3. Liang M, Hu X. “Recurrent convolutional neural network for object recognition.” 2015 IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pp. 3367–3375, June 2015. doi:10.1109/CVPR.2015.7298958
  4. Chagnon J, Hagenbuchner M, Tsoi AC, Scarselli F. “On the effects of recursive convolutional layers in convolutional neural networks.” Neurocomputing 591:127767, July 2024. doi:10.1016/j.neucom.2024.127767
  5. Langerman D, Johnson A, Buettner K, George AD. “Beyond Floating-Point Ops: CNN Performance Prediction with Critical Datapath Length.” 2020 IEEE High Performance Extreme Computing Conference (HPEC), pp. 1–9, 22 September 2020. doi:10.1109/HPEC43674.2020.9286182
  6. van Bergen RS, Kriegeskorte N. “Going in circles is the way forward: the role of recurrence in visual inference.” Current Opinion in Neurobiology 65:176–193, December 2020. doi:10.1016/j.conb.2020.11.009