Skip to content
One AI API Key
Blog

GLM-5.4 loop transformer architecture, explained simply

Z.ai scaled the Loop for three months and the Loop Transformer is the first change users see. What a looped transformer is, and why it shapes the reasoning.

One AI API Key TeamPublished 16 min read
On this page

When Z.ai launched GLM-5.4 on 23 November 2026, the company made an unusual admission for a model release: three months of work had gone into scaling two things, what it calls the Loop and model size. And the improvement users would notice first, Z.ai said, is the Loop Transformer. Most launch announcements talk about benchmark scores. This one pointed at the architecture before it pointed at the numbers, which tells you the Loop is the part Z.ai most wants you to associate with this model.

GLM-5.4 launch announcement emphasizing the Loop Transformer architecture
Z.ai’s GLM-5.4 launch put the Loop Transformer front and center, naming it the first change users would notice after three months of scaling work.

This post explains what a looped or recursive transformer actually is, in plain terms, without requiring a deep learning background. It covers why Z.ai bet three months on it, how looping explains the distinctive many-small-steps reasoning style that showed up in the first independent testing, what the unconfirmed 700 billion parameter figure does and does not mean, and what we still do not know until the technical report lands.

A note on sources before we start. The Loop framing comes from Z.ai directly. The 700 billion parameter figure comes from AICodeKing, who reported it with the explicit caveat that he was not certain and that a technical report is coming. Z.ai has not confirmed it. We will keep those two clearly separated throughout.

What a transformer does in the first place

To understand a looped transformer, start with what an ordinary one does, because the loop is a change to a familiar recipe. A transformer is the architecture behind essentially every large language model, including GLM-5.4. It reads text as a sequence of tokens and predicts what comes next by passing that sequence through a stack of layers. Each layer looks at the tokens, decides which ones relate to which, and refines its understanding a little. By the time the sequence reaches the top of the stack, the model has built up enough internal representation to predict the next token.

The depth of that stack, how many layers it has, is one of the main ways models got more capable over the years. A deeper stack means more rounds of refinement, which historically meant a smarter model and also a bigger, more expensive one. If you wanted a model that reasoned better, the traditional move was to add layers, add width, and accept a much larger parameter count. That is the scaling recipe that produced the current frontier, and it works, but it is expensive in both training and inference.

What “looping” changes

A looped transformer takes a different path to depth. Instead of building a stack where every layer is a distinct set of weights, it reuses the same weights across multiple passes. You run the input through the model, take the output, and feed it back through the same model again, refining the representation each time. It is a loop rather than a ladder.

The clearest way to picture it is the difference between rewriting a paragraph on several separate sheets of paper, where each sheet is a fresh layer with its own ink, and rewriting the same paragraph on one sheet over and over, refining it each pass. The looped version does the second thing. It reuses the same machinery, so each extra round of refinement costs compute but not new parameters.

That trade is the whole point. A looped architecture can reason for more steps without the parameter count exploding. It buys depth of computation with extra forward passes instead of extra weights. In a model that is otherwise built on a mixture-of-experts design, where only a fraction of parameters activate per token, the loop sits on top and lets the model iterate further on a problem without adding permanent size. Z.ai framing three months of work around scaling the Loop is a bet that this kind of recursive refinement is a more efficient path to capability than raw scale alone.

Looping and mixture-of-experts, together

GLM-5.4 is reported to combine looping with a mixture-of-experts design, and the two ideas solve different problems, which is why pairing them is clever. It helps to separate them cleanly because they get confused.

The mixture-of-experts part is about which parameters activate for a given token. Instead of one dense network that uses all its weights on every token, an MoE model has a set of specialist subnetworks, called experts, and a router that sends each token to a small number of them. Most of the parameters stay idle for any given token. That is what lets the model have a huge total parameter count while keeping the compute per token modest, and it is the standard trick behind most current large models.

The looping part is about reusing the same weights across passes, as covered above. It does not change which experts activate. It changes how many times the model refines its answer using those experts. So the two are orthogonal: MoE controls the width of each pass, looping controls the number of passes. Together they let a model be very large in total parameters, cheap in per-token compute, and deep in iterative refinement, all at once.

This combination is also why the reported 700 billion figure is hard to interpret without the technical report. In an MoE, the total parameter count and the active parameter count are very different numbers, and the total is what makes headlines while the active count is what drives cost and speed. A “700B model” that activates only a fraction of those parameters per token is a different beast, in both capability and expense, than a dense 700B model. Until Z.ai publishes both numbers, the headline figure alone does not tell you much about how the model actually runs. Our GLM-5.4 self-hosting guide covers why that distinction dominates any deployment math.

Why this explains the reasoning style

Here is where the architecture connects to something you can actually observe, because the first independent testing of GLM-5.4 showed a very specific behavioral profile and looping is a clean explanation for it.

AICodeKing ran GLM-5.4 through KingBench 4 on launch day. Against a frontier model he calls Neon, GLM-5.4 took 1,128 reasoning steps to Neon’s 244, and generated about 1.04 million reasoning tokens to Neon’s roughly 70,000. It reasoned on nearly every step, with under 1% of steps showing near-zero reasoning. Per step it was not slow, 22.9 seconds against Neon’s 26.7, but it took far more steps overall, which is why it was about four times slower on the full task.

Step count comparison showing GLM-5.4 at 1128 reasoning steps against Neon at 244
The step count from the independent run: 1,128 steps for GLM-5.4 against 244 for Neon, the signature of a looped, iterate-many-times design.

That is almost exactly what a looped architecture predicts. A model that refines its thinking by iterating through the same weights will tend to break a problem into many small recursive passes rather than a few large ones. Each pass is cheap and focused. The model builds up its answer incrementally, checking and refining as it goes, which produces the long chains of reasoning steps that the KingBench run measured. The architecture and the observed behavior line up, which is the strongest reason to take the Loop framing seriously even without a technical report.

There is a useful analogy, and we will use just one here. A looped model solving a hard problem is less like a person who thinks for a long time and then writes down a complete answer, and more like a person who writes a draft, rereads it, fixes it, rereads again, and iterates many times before finishing. The iteration is the capability. It is also the cost, and our GLM-5.4 KingBench 4 deep dive covers the full step and token breakdown that quantifies that cost.

The 700 billion figure, and why it is unconfirmed

The most-reported technical detail about GLM-5.4 is that it is a looped transformer with roughly 700 billion parameters. That number comes from AICodeKing, who reported it while stating plainly that he was not certain. Z.ai has not confirmed it, has not published a parameter count, and has said a technical report is coming.

We are repeating that caveat because it is easy to lose in retelling. A specific-sounding number travels fast and picks up false authority with each share. Until Z.ai publishes it, 700 billion is a reporter’s unverified estimate, not a fact about the model. It is plausible, because a looped mixture-of-experts in this class would be a very large model, but plausible is not confirmed.

What the uncertainty means practically is that you should not build hardware plans, cost models, or deployment decisions on the 700 billion figure. Our GLM-5.4 self-hosting guide is explicit that any GPU count for this model is a guess until the parameter count is official, and our GLM-5.4 open weights guide covers the fact that the weights are not published at all, so there is nothing to measure yet.

Looping is a 2026 trend, not a Z.ai solo bet

It is worth knowing that Z.ai is not alone in this direction, because that context makes the Loop bet look less like a wild swing and more like a read on where model design is heading. Through 2026, looping and recursive architectures have shown up across several frontier labs. OpenAI’s Astra and MiniMax’s M2.7 have both been reported as using looped designs, and GLM-5.4 now sits in that same camp. When multiple independent labs converge on the same architectural idea in the same window, it usually means the idea has a real efficiency argument behind it rather than being one team’s experiment.

The shared logic is the one this post has already covered: reusing weights across passes buys reasoning depth without paying for it in parameter count. For labs pushing against the cost ceiling of ever-larger dense models, that trade is attractive, because inference cost is the constraint that decides what you can afford to serve. A looped model that gets more capable per forward pass without getting much bigger is a way to keep improving while holding the serving bill roughly flat. That is the bet, and Z.ai spending three months scaling it suggests the early returns were enough to justify the investment.

The caveat is the same one that runs through this whole post: the reports on Astra and M2.7 being looped are themselves unconfirmed, and so is the detail that GLM-5.4 is a looped 700B model. What is confirmed from Z.ai directly is the Loop framing and the three months of work. The rest is informed reporting that points in a consistent direction but has not been verified by a technical report from any of the labs involved.

What the per-step speed says about the design

There is a detail in the independent run that supports the looping story from an unexpected angle, and it is the per-step timing. GLM-5.4 averaged 22.9 seconds per reasoning step, which was faster than Neon’s 26.7 seconds, even though GLM-5.4 took roughly four times longer overall. A model that is faster per step but far slower per task is a model that does cheap, small increments of work many times over rather than a few expensive ones.

That profile fits a looped design well. Each pass through a reused set of weights is a bounded, predictable unit of compute. You would expect each pass to be comparatively quick, and you would expect the total to grow with the number of passes the problem demands. That is precisely what the run measured: fast individual steps, a very large number of them. A dense model that reasoned by going deeper into a much larger stack would tend to show the opposite signature, slower and heavier individual steps. The timing data is circumstantial, but it points the same way as the step count, which is why the looped explanation is more than a convenient narrative.

Per-step speed comparison showing GLM-5.4 at 22.9 seconds per step against Neon at 26.7
Per-step timing: GLM-5.4 was faster per step, 22.9 seconds to Neon’s 26.7, but took many more steps, the fingerprint of cheap iterative passes.

What looping means for how you use the model

The architecture is not just interesting for its own sake. It points to how GLM-5.4 should be deployed, and that is the practical payoff of understanding the Loop.

A model that reasons in many small recursive steps is a strong fit for work where deep, careful thinking matters more than raw speed. That is code review, where you want the model to reread and reconsider for bugs and security issues. That is planning, where you want a large task broken into considered steps. That is big-picture analysis, where thoroughness pays off. AICodeKing’s verdict from the KingBench run was exactly this: reviewer and planner, not end-to-end code generator. A looped model’s strength is the iteration, and iteration is worth most in roles that reward it.

The same architecture is a poor fit for work that needs fast, short answers. If you want a model to autocomplete a function or answer a quick factual question, paying for a long recursive reasoning chain is wasteful. The Loop gives you depth when you need it, and it gives you cost when you do not. For what that means in real workloads, see GLM-5.4 coding performance, and for the deployment pattern it favors, see GLM-5.4 for code review.

The other practical implication is token economics. A model that generates over a million reasoning tokens on a hard task will drive output-token costs if it is metered per token. GLM-5.4 has no public token price yet, which our GLM-5.4 pricing guide covers, so the eventual rate card will decide how expensive the Loop is to run at scale. For now, Coding Plan subscribers get 50% more GLM-5.4 quota than GLM-5.3, which is the day-one way the cost is absorbed.

What we do not know until the technical report

Z.ai has said a technical report is coming, and it is the document that will turn most of this from inference into fact. Until it lands, here is what remains open. The confirmed parameter count, including whether 700 billion is anywhere near right. The exact loop design, including how many passes the model uses and whether the number of passes is fixed or adaptive per problem. The mixture-of-experts configuration, if the model is in fact an MoE. The training details behind three months of Loop scaling. And the official benchmark numbers, which are currently absent entirely, so our GLM-5.4 benchmarks guide is waiting on them.

One thing worth watching for specifically is whether the loop is fixed-depth or adaptive. A fixed-depth loop runs the same number of passes every time, which is simpler and predictable but spends the same compute on easy and hard problems alike. An adaptive loop decides how many passes to use based on the problem, which is more efficient but adds complexity to serving and cost prediction. The KingBench data does not settle this, but the difference matters a lot in production, because an adaptive model would be cheap on simple tasks and expensive on hard ones, while a fixed model would be uniformly costly. That is a real deployment question, not just an academic one, and it is exactly the kind of detail a technical report would answer.

It is also worth saying plainly that everything in this post about how the Loop works is inference from what Z.ai has said publicly plus the observed behavior in one independent run. The Loop Transformer being the first improvement users notice is a Z.ai statement. The many-small-steps reasoning is an observed measurement. The connection between the two is our interpretation, and a reasonable one, but the technical report is what will confirm or correct it. We would rather mark that clearly than present interpretation as fact.

Future update: the architecture, once the technical report lands

This section will be updated once Z.ai publishes the GLM-5.4 technical report. As of 23 November 2026, the only confirmed architectural facts are Z.ai’s own statements that three months went into scaling the Loop and model size, and that the Loop Transformer is the first improvement users will notice. The parameter count, the loop design, and whether the model is a mixture-of-experts are all unconfirmed.

Based on Z.ai’s history of shipping a technical report after major releases, a reasonable expectation is that the report settles three things. First, the confirmed parameter count, which will tell us whether the reported 700 billion figure is accurate, or whether it is a conflation with the 754 billion figure used for GLM-5.1. Second, the loop design, and specifically whether the number of passes is fixed or adaptive, which changes how the model prices out in production. Third, the official benchmark table, which is currently absent entirely and which will let GLM-5.4 be compared directly against other models on the same harnesses. That is a statement about what the report is expected to contain based on Z.ai’s past behavior, not an announced publication date or content list. If the technical report changes the picture, including contradicting the looped interpretation, we will update this section to match what Z.ai actually published.

How to think about the Loop in one line

If you take one thing from this post, take this. GLM-5.4 gets its capability from iterating on its own thinking using the same weights repeatedly, rather than from being a much wider or deeper model. That design makes it a deep, careful reasoner that shows its work in many small steps, which is why it excels at review and planning and why it is expensive as a raw generator. The three months Z.ai spent on the Loop were spent buying reasoning depth efficiently, and the first independent testing suggests the bet is paying off on capability. Whether it pays off on cost depends on a token price Z.ai has not published.

When the technical report arrives, this post gets updated with confirmed numbers. For how GLM-5.4 fits against the field in the meantime, see GLM-5.4 vs frontier, GLM-5.4 vs GLM-5.3 for what changed from the prior generation, and our best frontier models roundup for the models it competes with. For the models that make the opposite bet, prioritizing speed and low cost over recursive depth, see GLM-5.4 alternatives.

Sign up for a key to call GLM models through hosted access, or browse the model catalogue to see what is available today.

More GLM-5.4 coverage

This is part of a series on GLM-5.4. The rest of the cluster goes deeper on the areas this launch only sketched:

More in Blog

Try it

One API key for Claude, GPT, Grok, DeepSeek, Kimi, Qwen, GLM, MiniMax, Step, Crow, Dots, Beam, Nemotron, Jailbreak, MiMo, Gemini, Muse and Mistral.

One AI API Key speaks the OpenAI and Anthropic formats, so you change the base URL and the key, not your code. Credit packs start at $10, and every model has a published per-token rate.