📑 Table of contents

GLM-5.4: Zhipu repeats its calculations with the Loop Transformer — when the middle layers loop, reasoning climbs

LLM & Modèles 🟢 Beginner ⏱️ 13 min read 📅 2026-11-24

GLM-5.4: Z.ai Replaces Brute Force with the Loop Transformer

🔎 A Loop, Not Another Stack

On November 23, 2026, Z.ai (Zhipu AI) unveiled GLM-5.4, the lab's first flagship model built around a Loop Transformer architecture. The principle fits in a single line: rather than stacking hundreds of distinct Transformer blocks, you reuse a shared layer block, applied in a loop on each pass. Z.ai claims performance "at the 750-billion-parameter scale," presented as rivaling models weighing 2 to 3 trillion parameters.

The timing is no accident. Inference costs are exploding with giant contexts, memory bandwidth has become the real bottleneck, and the industry keeps piling on more parameters to scrape together a few benchmark points. Faced with this, Z.ai — and before it Thinking Machines with Inkling 2 Mini — is betting on a different lever: more compute per token, not more parameters.

Caution is still warranted, though: the announcement contains no benchmark tables, and the demos deemed "cherry-picked" are already drawing reactions on Hacker News. Here's what we know, what we don't know, and what it concretely changes for those who code with LLMs.


The Essentials

  • Released on November 23, 2026: GLM-5.4 is Z.ai's first flagship model built on a Loop Transformer architecture, which reuses a shared layer block in a loop rather than stacking distinct blocks.
  • Unverified claim: Z.ai claims 750B-scale performance rivaling 2T-3T models — without publishing a benchmark table, a point immediately criticized on Hacker News.
  • 1M token context, 128K max output, and multimodal inputs: video, image, text, and files.
  • Hybrid KV Cache (Global Sharing + Independent Sliding Window): at 1M context, the increase in deployment cost compared to GLM-5.3 remains "well controlled," according to Z.ai.
  • Architecture progressively validated on 1B, 4B, 30B, and 750B base models.
  • "Generalized Coding" positioning: code as a foundation for broader tasks (3D modeling, cybersecurity, physical control), with expanded quotas for Coding Plan subscribers.

Tool Primary use Pricing (November 2026) Ideal for
GLM-5.4 — Z.ai Agentic coding, vision, 1M context Coding Plan (expanded quotas) + API — see z.ai Testing the loop architecture on real repos
GPT-5.5 — OpenAI High-end agentic (98.2 on our index) Subscription + API — see openai.com Demanding production, reliable fallback
Claude Opus 4.7 (Adaptive) — Anthropic Long-horizon coding (94.3 in agentic) Subscription + API — see anthropic.com Complex refactoring, long sessions
DeepSeek V4 Pro — DeepSeek Cost-controlled reasoning API — see deepseek.com Tight budgets, high volumes
Hostinger VPS for hosting agents, backends, and test environments from ~€3/month (November 2026, check hostinger.com) Setting up a test bench dedicated to coding models

The Loop Transformer, concretely: a shared block, not duplicated computations

The Loop Transformer reuses a single block of layers, applied repeatedly on representations that evolve with each iteration. This is the definition given by the analysis published on Medium: a classic Transformer stacks blocks, each with its own parameters; a Loop Transformer runs a shared block in a loop — schematically, h = SharedBlock(h) repeated R times.

The nuance is crucial. At each iteration, the hidden states are updated: the model refines its representation recurrently, it does not "redo the same computation". Effective depth becomes a runtime variable, decoupled from the number of parameters. You pay in flops, not in weight memory. On a 1M-token context, this memory saving is not a detail: it is often what decides whether the model is deployable or not.

The idea is not new. Universal Transformers (Dehghani et al., 2018) already proposed recursing over depth, and ALBERT (Google, 2019) shared its parameters across layers. What is new with Z.ai is the scale: according to the discussions on Hacker News, the Loop architecture was progressively validated on base models of 1B, 4B, 30B and then 750B. Crossing the flagship threshold — that's the real news.

My take: the economic elegance of the concept is real, but it says nothing about the quality of the outputs. A well-designed loop can make up for a parameter deficit — or simply shift the cost elsewhere.


Hybrid KV Cache: 1M context without sending the bill through the roof

It's the Hybrid KV Cache that makes the 1 million token context economically deployable — and it's probably the most credible part of the announcement.

A reminder of the problem: for each token in the context, the model must keep the attention keys and values in memory (the famous KV cache). This memory grows linearly with context length. At 1M tokens, it becomes the main wall of any long-context deployment, long before raw compute capacity.

GLM-5.4 combines two mechanisms, described in Z.ai's official announcement: a Global Sharing mechanism, which pools a global key-value memory, and an Independent Sliding Window, which maintains independent local windows. Claimed result: at context lengths of 1M, the increase in deployment cost compared to GLM-5.3 remains "well under control" — tightly contained.

It's a systems claim, not a benchmark claim. And paradoxically, that's exactly what makes it more credible: memory cost is something we know how to measure, whereas the performance figures are still pending. With a maximum output of 128K to match, the 1M context / 128K output duo clearly targets code workflows at the scale of an entire repository. To situate GLM-5.4 in the broader landscape, our monthly comparison of the best LLMs will be updated as soon as independent evaluations come out.


Two loops for the price of one: the model enters the agent loop

GLM-5.4 doesn't just loop its layers: Z.ai wants to place the model itself in the agentic loop — observe, edit, execute, verify.

Medium's analysis distinguishes two loops. The first is intra-model: the reuse of the shared block we just discussed. The second is external: reading files, editing code, running tests, inspecting results. This is the classic cycle of a development agent — and that's where vision comes into play.

With video, image, text, and file inputs, the coding model has direct access to the "observe" step: a screenshot of a buggy interface, a screencast of a failing test, a formatted log. No need to transliterate everything into text before reasoning. Hacker News commentators also note that GLM-5.4 appears to embed a true vision transformer, rather than a simple multimodal adapter bolted onto the LLM.

Dealroom summarizes the "Generalized Coding" positioning as follows: code as a foundation for broader tasks — 3D modeling, cybersecurity, physical control. The logic is coherent: if the model masters the edit-execute-verify cycle on code, it can extend it to other domains where the action is verifiable.

This coherence is, in my eyes, the most interesting point of the launch: the same loop philosophy applies both inside the model and to the orchestration around it. That's rare, and it's exactly the profile you'd expect from a good LLM for AI agents.


Inkling 2 Mini, GLM-5.4: Recurrence goes from curiosity to the mainstream

Z.ai is not alone in this territory, and that is what makes the launch historically interesting. Thinking Machines has released Inkling 2 Mini, a 26.4 billion parameter model of which only 3.4 billion are active, and whose middle layers loop three times per token — we analyzed it here: Inkling 2 Mini: 26.4B parameters, 3.4B active, and middle layers that loop 3 times per token.

Two independent labs, two implementations, one and the same thesis: per-token compute — internal recurrence — becomes a full-fledged scaling axis, alongside parameter count and data quantity. It is no longer an academic curiosity inherited from the 2018 Universal Transformers; it is an architectural choice being defended at flagship scale.

Why now? Because the three constraints that structure the industry — memory bandwidth, inference cost, energy — all penalize giant dense models. A loop lets you buy effective depth with compute time rather than with memory. If the trade-off holds at scale, the performance/cost ratio of frontier models changes shape.

Convergence does not mean victory, of course. Two labs can be wrong together. But when the recurrent bet is made simultaneously in Beijing and in the Thinking Machines sphere, it becomes the signal to watch for 2027.


What the critics say — and what nobody knows yet

The real problem with GLM-5.4 isn't its architecture: it's the absence of public evidence.

The Hacker News thread is merciless on this point: Z.ai's blog contains no benchmark tables, and the phrase "comparable to 2T-3T parameter models" is a claim without any controlled figures. The demos? Judged cherry-picked, as is almost systematically the case with this type of announcement. On Reddit, the mix is the same: genuine curiosity about the architecture, skepticism about the marketing.

The claim also needs to be put back into the context of the model family. On our overall index, GLM-5.1 topped out at 83, far behind GPT-5.5 (91) and Gemini 3.1 Pro (92). In agentic tasks, GLM-5 (Reasoning) self-hosted scored 82, versus 98.2 for GPT-5.5. The family therefore has real ground to make up — which makes a claim of parity with 2T-3T models all the more extraordinary, and therefore subject to an all the higher standard of proof.

What we don't yet know, and what would be needed to settle the matter: independent code evaluations, a detailed pricing structure, the status of the weights (open or not), and agentic evaluations in real-world conditions. The progressive validation across 1B, 4B, 30B and 750B is a good methodological signal — that's how you de-risk an architecture — but it is not proof of top-tier performance. Our monthly comparison will track the arrival of third-party evaluations.


Should you adopt GLM-5.4 for coding right now?

Test it, yes. Migrate your toolchain to it, no.

The right protocol comes down to four points. One: test on your real repositories, not on demos — which are by definition chosen to flatter the model. Two: leverage the 1M context where it's genuinely useful, i.e., cross-file reasoning, not routine completions. Three: measure objective things — successful edit rate, tests passing on the first try, cycle time — rather than the impression left by a session. Four: keep a proven fallback, GPT-5.5 or Claude Opus 4.7 (Adaptive), until independent evaluations exist.

Getting started is easy: Coding Plan subscribers benefit from expanded quotas, according to the November 24 digests (The Neuron, AIMap). To set up a serious test bench — mirror repo, CI, test agents — a dedicated VPS does the job just fine; Hostinger remains our go-to for this use case, starting at a few euros a month.

A broader question, finally: if models loop on their own through observe-edit-execute-verify, the developer's value shifts once again. We discuss this in No-code vs code: when should you learn to program? — and the answer isn't the one we expected two years ago. To choose your main tool in this new landscape, our guide to the best LLMs for coding compares the candidates on criteria that matter: edit success rate, useful context, cost per task.


❌ Common Mistakes

Mistake 1: thinking "loop" rhymes with "computations repeated for nothing"

This is the most widespread confusion since the announcement. The shared block is reapplied to hidden states that are updated at each iteration: this is recursive refinement, not redundancy. The cost is paid in per-token compute; the savings come from weight memory. If you read that the model "repeats its computations," you've missed the essence of the architecture — and you'll misjudge its trade-offs.

Mistake 2: mistaking "rivals 2T-3T" for a measured result

It's a marketing claim, not a benchmark: no numerical table has been published, and the demos are favorable by construction. The solution is not to reject the claim, but to suspend judgment on it: wait for third-party evaluations, and in the meantime judge the model on your own tasks, with your own metrics.

Mistake 3: judging a coding model on demo puzzles

A model can shine on stylized exercises and fail on your monorepo with its gnarly dependencies. Test with your CI, your linters, a dozen real tasks, and compare against the model you already use. And if the results disappoint, audit your prompts and the provided context first before condemning the model: as explained in Prompt debugging: when the AI doesn't understand what you want, the problem often lies in the framing, not the engine.


❓ Frequently Asked Questions

Is GLM-5.4 open weights?

The announcement doesn't specify, and it's a genuinely open question. The GLM family has a track record with self-hostable variants — GLM-5 (Reasoning), for instance, is among the self-host models in our agentic index. For 5.4, wait for official confirmation on z.ai before planning an internal deployment.

What's the difference between the internal loop and chain-of-thought?

Chain-of-thought spends compute generating visible reasoning tokens; the internal loop spends it in the forward pass, refining invisible representations. The two are complementary rather than competing — and GLM-5.4 visibly combines both, the architectural loop and the agentic loop.

What does the 1M token context change for code?

You can feed an entire repository, its documentation, and its bug history into a single context window, which changes the nature of the tasks you can tackle. But be careful: the Hybrid KV Cache keeps deployment costs under control, not attention quality over 1M — the latter remains to be independently verified.

Can you run GLM-5.4 locally?

At 750 billion parameters, no, not on consumer hardware. But the architecture has been validated on 1B, 4B, and 30B bases: if Z.ai releases compact loop variants, local deployment becomes very relevant again. In the meantime, our guide to installing a local LLM and our selection of the best local LLMs cover what's currently available.

Are there free alternatives for testing this type of model?

For testing LLMs in general, yes: ChatGPT free, Gemini, or Groq do the job nicely — see our selection of the best free LLMs. For testing a loop architecture specifically, no: no free equivalent had been announced as of November 24, 2026.


✅ Conclusion

GLM-5.4's inner loop doesn't yet prove it can rival the 2T-3T behemoths — but it is reshaping the cost/performance ratio of reasoning, and two independent labs are now betting on it. To find out whether it lives up to its promises against GPT-5.5 and Claude Opus 4.7, follow our monthly comparison of the best LLMs: the first independent benchmarks will make all the difference in this story.