GLM-5.4: Z.ai's first loop transformer model, explained

Kira
Written by

Kira

Katelin Teen
Reviewed by

Katelin Teen

Last edited November 25, 2026

Expert Verified
Illustration of a developer at a laptop beside the Z.ai logo and a diagram of a model block running twice in a loop
TL;DR

GLM-5.4 is Z.ai's first Loop Transformer, released on November 23, 2026: a 750B-scale model that runs 28 of its layers twice to reason deeper without adding parameters. Today you can only use it through the GLM Coding Plan (from $18/month), ZCode and Z.ai Chat. The API is "coming soon" and the open weights come later.

My take: a promising coding model with two catches. Z.ai published win rates, not a benchmark table, and its long thinking can burn minutes on simple prompts. Use it for hard debugging; keep GLM-5.3-Flash for quick work.

If you need answers for customers rather than code, eesel is a ready AI helpdesk teammate trained on your help center and past tickets. With the eesel CLI, the coding agent you'd pair with GLM-5.4 can upload approved docs and test answers before go-live.

What is GLM-5.4?

GLM-5.4 is Z.ai's new flagship large language model, and the first one built on a looped architecture. I build AI agents for a living, so new "deeper thinking" claims usually make me reach for the fine print first. Here the fine print is unusually readable: Z.ai (the Beijing lab formerly known as Zhipu AI) explains the architecture in detail, then says plainly what it hasn't shipped yet.

The short version from the launch post: instead of stacking more parameters, GLM-5.4 takes the existing GLM-5 base model and runs a middle block of its layers a second time. Z.ai says this reaches intelligence comparable to 2T-3T parameter models, and it frames the release as the start of "Generalized Coding," where code becomes the way the model handles video, games, 3D scenes and CAD work, not only software.

Here are the specs Z.ai has published, all from the GLM-5.4 model docs:

SpecGLM-5.4
ReleasedNovember 23, 2026
ArchitectureLoop Transformer on the GLM-5 base (750B scale)
Loop28 layers, 2 iterations
Context window1M tokens
Max output128K tokens
InputVideo, image, text, file
OutputText
SpeedUp to 200 tokens/s off-peak, 70-80 tokens/s at peak
FeaturesThinking mode, function calling, structured JSON output, streaming, context caching
Where to use itGLM Coding Plan, ZCode, Z.ai Chat
API"Coming soon," after a security assessment
Open weightsPlanned, after "safety hardening"

One line in the launch post stood out to me, because labs rarely write it on release day. Z.ai admits the model "tends to get caught in overly long 'marathon thinking' loops," while arguing the extra self-correction pays off in accuracy. Keep that in mind. It's the single biggest thing early users talk about.

How does the Loop Transformer work?

In a normal transformer model, every layer runs once for each token. A Loop Transformer takes a group of layers that share the same weights and runs them more than once, so each pass refines what the previous pass worked out. You get a deeper network without a bigger one.

Diagram of GLM-5.4's layer stack: a prelude of layers 1-26, a loop block of layers 27-54 that runs twice, and a coda of layers 55-78 before the next token
Diagram of GLM-5.4's layer stack: a prelude of layers 1-26, a loop block of layers 27-54 that runs twice, and a coda of layers 55-78 before the next token

The idea dates back to the 2018 Universal Transformer, and Z.ai is upfront that looped models trained from scratch have trailed normal models at the same compute budget. Its twist is to start from an already trained base and convert it with continued training. That's also why GLM-5.4 arrived three months after GLM-5.3 rather than as a brand-new pretraining run.

Z.ai's own architecture diagram shows the layout in full: 26 "prelude" layers, the 28-layer loop block (layers 27 to 54) run twice, and a 24-layer "coda" on top.

GLM-5.4 architecture diagram showing the prelude, two loop passes over layers 27-54 with damp gates, a per-layer KV cache, and the coda, as taken from Z.ai
GLM-5.4 architecture diagram showing the prelude, two loop passes over layers 27-54 with damp gates, a per-layer KV cache, and the coda, as taken from Z.ai

Running layers twice usually means twice the memory and twice the compute, so the interesting engineering is in how Z.ai avoided that. The GLM-5.4 blog lists three changes:

  • Gated updates. Each pass writes its result back through a per-token gate. The first pass writes conservatively to keep things stable; the second opens the gate and refines. On harder tokens, the first pass writes more aggressively.
  • A hybrid KV cache. The second pass reuses the first pass's cache and only keeps its own small sliding window. So an extra loop costs one sliding window of memory, not a full second cache, which matters a lot at 1M tokens of context.
  • Reused attention indices. The base model uses sparse attention, and the second pass reuses the indices the first pass already picked, so the indexing adds no overhead.

The most useful evidence is a controlled test Z.ai ran on a 30B model with the same architecture. With identical parameter counts and about 10% more training compute, the looped version scored higher on every benchmark listed and wrote shorter answers.

Table of Z.ai's 30B iso-parameter ablation showing the looped model beating the baseline on AIME25, GPQA-Diamond, AA-LCR, MMLU-Pro and IFBench while using 2-15% fewer output tokens, as taken from Z.ai
Table of Z.ai's 30B iso-parameter ablation showing the looped model beating the baseline on AIME25, GPQA-Diamond, AA-LCR, MMLU-Pro and IFBench while using 2-15% fewer output tokens, as taken from Z.ai

The biggest gains were on math (+11.3 on AIME25) and science reasoning (+8.7 on GPQA-Diamond), and average output length dropped 10-14% on most tests. Z.ai's explanation is that some of the reasoning moves from visible thinking tokens into the extra depth of the loop. Fewer output tokens for the same answer is the part that should matter to anyone paying per token.

What do GLM-5.4's benchmarks actually show?

Less than you'd hope, and that's the most important fact for anyone deciding whether to switch. For GLM-5.3 in August, Z.ai published a full table across Terminal Bench, DeepSWE, CyberGym and more. For GLM-5.4 there is no such table. The headline numbers are pairwise win rates from Z.ai's own evaluations:

Z.ai's GLM-5.4 win rate chart: 51.1% wins vs GLM-5.3, 41.8% vs Kimi K3.1 Pro and 36.6% vs DeepSeek-V4.1-Flash-1017, as taken from the Z.ai docs
Z.ai's GLM-5.4 win rate chart: 51.1% wins vs GLM-5.3, 41.8% vs Kimi K3.1 Pro and 36.6% vs DeepSeek-V4.1-Flash-1017, as taken from the Z.ai docs
Matchup (Z.ai's evals)GLM-5.4 winsTieGLM-5.4 loses
vs GLM-5.351.1%25.7%23.1%
vs Kimi K3.1 Pro41.8%26.9%31.3%
vs DeepSeek-V4.1-Flash-101736.6%30.2%33.2%

Source: GLM-5.4 model docs.

Read fairly, that says GLM-5.4 is clearly better than GLM-5.3, ahead of Kimi K3.1 Pro, and roughly level with DeepSeek's Flash model on Z.ai's own tasks. Z.ai doesn't say which tasks, how many, or who judged them. It also isn't listed on Artificial Analysis yet: the GLM-5.4 page returns a 404 while the GLM-5.3 page loads fine, and with no public API, independent labs can't easily run it.

The one sizeable independent test I found so far came from Paweł Huryn, who ran GLM-5.4 on two real repos with 105 planted bugs and published the scores on X. His numbers put GLM-5.4 at 28 (up from GLM-5.3's 19) but well behind Gemini 4 Neon at 63, GPT-6.2 Astra at 62.7 and DeepSeek V4.1 Flash at 42.7:

"Making this model work on a @Zai_org infrastructure felt harder than proving the Riemann hypothesis: 73 times I got 529 'overloaded' error. 26 times I got 429 'rate limit' errors despite a $80/no subscription."

He stopped the run early and noted that partial results pointed the same way, so treat it as one tester's early read rather than a verdict. Still, it lines up with the win-rate chart: a real jump over GLM-5.3, not a new leader.

How can you access GLM-5.4 today?

Right now, only through Z.ai's own products. The model docs say "the Model API will be made available upon completion of the security assessment," and the open weights come later.

Board showing where GLM-5.4 is available: open now in the GLM Coding Plan, ZCode and Z.ai Chat; Model API coming soon after security review; open weights not yet, after safety hardening
Board showing where GLM-5.4 is available: open now in the GLM Coding Plan, ZCode and Z.ai Chat; Model API coming soon after security review; open weights not yet, after safety hardening

Your three options today:

  1. GLM Coding Plan. A subscription that plugs GLM models into Z.ai's ZCode IDE and 20+ third-party agent tools, including Claude Code, Codex, Cursor and OpenCode. GLM-5.4 is on every tier.
  2. ZCode. Z.ai's own agent-first coding environment, tuned for GLM models. One Redditor reported it working on ZCode's free Start Plan while their Coding Plan trial couldn't see the model yet.
  3. Z.ai Chat. The chat app is the quickest way to poke at it, though a chat window hides the coding-agent use Z.ai built it for.
The GLM Coding Plan page listing ZCode, Claude Code, Codex, Cursor, OpenCode and other supported agent tools above the Lite, Pro and Max plans, as taken from Z.ai
The GLM Coding Plan page listing ZCode, Claude Code, Codex, Cursor, OpenCode and other supported agent tools above the Lite, Pro and Max plans, as taken from Z.ai

If you're wiring it into Claude Code, the Coding Plan docs cover the tool setup. The thing I'd plan around is the API gap: if your product calls models over an API, GLM-5.4 isn't an option yet, and GLM-5.3 or GLM-5.3-Flash are still what you can actually ship.

How much does GLM-5.4 cost?

GLM-5.4 has no per-token API price yet; Z.ai's pricing page still tops out at GLM-5.3 ($1.40 input / $4.40 output per million tokens). The only way to pay for GLM-5.4 today is the Coding Plan, priced on the subscribe page:

PlanMonthlyYearly (per month)Weekly credits5-hour creditsNotes
Lite$18$12.6010,0002,000Small repos, daily use
Pro$80$5660,00012,0006x Lite usage, curated MCP tools, faster generation
Max$168$117.60140,00028,00014x Lite usage, dedicated resources at peak

Quarterly billing takes 20% off and yearly takes 30% off. There's also a Team plan with seat management.

The more interesting change is inside the plan. Usage is metered in credits, and Z.ai set GLM-5.4's credit rates a third lower than GLM-5.3's, which is where the "1.5x quota" in the launch messaging comes from:

ModelInput (per 10K tokens)Cached inputOutput
GLM-5.44.6 credits1.1 credits16 credits
GLM-5.36.9 credits1.7 credits24 credits
GLM-5.3-Flash1.15 credits (promo; 2.3 standard)0.284 (promo; 8 standard)

Source: GLM Coding Plan docs. Off-peak use bills at half the credit rate; peak hours are Monday to Friday, 14:00-18:00 Singapore time. The GLM-5.3-Flash promo runs November 24 to December 24.

Hand-drawn bar chart: GLM-5.3 costs 24 plan credits per 10K output tokens and GLM-5.4 costs 16, one third fewer credits for 1.5x quota, across the Lite $18, Pro $80 and Max $168 plans
Hand-drawn bar chart: GLM-5.3 costs 24 plan credits per 10K output tokens and GLM-5.4 costs 16, one third fewer credits for 1.5x quota, across the Lite $18, Pro $80 and Max $168 plans

In token terms, Z.ai estimates a Lite plan covers 72-146 million GLM-5.4 tokens a week at a 95% cache hit rate, against 48-97 million for GLM-5.3. The catch is that a cheaper rate doesn't help if the model thinks for ten minutes. Long reasoning runs spend output tokens, which are the expensive credits, so how you set the effort level matters more than the rate card.

To see where your own usage lands, plug in a typical week below. It uses the credit multipliers above and tells you the smallest plan that fits.

GLM-5.4 vs GLM-5.3: what changed?

GLM-5.3 shipped in August as a post-training upgrade on the same base as GLM-5.2. GLM-5.4 keeps that base and changes the architecture around it. Here's the side-by-side, from Z.ai's GLM-5.3 post, the GLM-5.4 docs and the pricing pages:

GLM-5.4GLM-5.3
ReleasedNovember 23, 2026August 14, 2026
What's newLoop Transformer (28 layers run twice)Post-training only, same base as GLM-5.2
InputVideo, image, text, fileText
Public benchmark tableNo (win rates only)Yes (Terminal Bench, DeepSWE, CyberGym and more)
APIComing soon$1.40 in / $4.40 out per 1M tokens
Open weightsPlannedOn Hugging Face
Coding Plan output rate16 credits per 10K tokens24 credits per 10K tokens
Win rate (Z.ai evals)Wins 51.1%, loses 23.1% vs GLM-5.3n/a

Two of those rows are easy to miss. GLM-5.4 adds image and video input on the flagship line (GLM-5.3 was text-only; vision lived in GLM-5.3-Flash). And GLM-5.3 is still the only one you can download or call over the API, which keeps it the default for anyone building a product rather than coding in an IDE.

Z.ai itself recommends keeping the smaller model around. Zixuan Li, who announced the release for Z.ai, posted this on launch day:

"Fair warning though: it loves going into a long 'thunderous thinking' mode. That extra reflection really pays off when you're debugging, digging into a big codebase, or writing full test suites. But it is overkill for quick one-liners. Use GLM-5.3-Flash for simpler stuff, and save 5.4 for the hard problems."

What are people saying about GLM-5.4?

Early reactions split cleanly: the architecture got applause, the day-to-day experience got complaints about thinking time. Sebastian Raschka counted five looped transformers in his architecture gallery after this release. On Hacker News, one commenter pointed out that GLM-5.4 is a pretrained model converted to a loop, and expects other labs to copy the trick.

The thinking time is the loudest theme. In r/ZaiGLM, one user reported 10 minutes for a simple "tell me about yourself" prompt on Max effort. The most practical reply:

Reddit

"Max prompt is way too high thinking for simple stuff. If you want quick answers, turn it to low or medium. High is probably more than enough for most coding tasks. For Max... it dives really deep trying to explore every possibility. Good for an obscure bug hunt... but way too thorough for most tasks."

Another developer in the same thread put a number on it:

Reddit

"Something GLM-5.3 would have taken 10 minutes takes 40 minutes on GLM-5.4."

The good reports cluster around exactly what Z.ai pitched: hard, visual, technical work. The same NullzeroJP had spent hours with GLM-5.3 on a river-generation system for a Unity game and finally cracked it by asking GLM-5.4 to draw the problem as an SVG, then read its own rendered image back to check the work. That's the "Generalized Coding" idea in practice, and the vision input is what made it possible.

Writing is the other side. A widely upvoted r/LocalLLaMA post called it "great at coding" but weak at prose:

Reddit

"It has the WORST writing of any recent Chinese model."

And the benchmark gap didn't go unnoticed on Hacker News either:

Hacker News

"Yeah the lack of benchmarks and the wording of the release seems to imply that it's a very incremental release that probably doesn't score mind-blowingly on benchmarks."

Is GLM-5.4 worth it?

For hard coding work inside an IDE, yes, if you're already on the Coding Plan or happy to pay $18 to try it. You get a model that beats GLM-5.3 on Z.ai's evals, reads images and video, and costs fewer plan credits per token. Set effort to medium or high by default and save Max for the bug hunts that justify it.

It's a harder sell if you need any of these:

  • An API. There isn't one yet. Use GLM-5.3-Flash or a peer model with a published price card, such as Qwen 4 Max. Our GLM-5.3-Flash alternatives list covers more.
  • Open weights to self-host. Not yet. If that's a hard requirement, our list of open-source AI agents covers what you can run today.
  • Fast replies. Long thinking is the design, not a bug. For quick edits, a lighter model is the better tool.
  • Independent proof. Until third-party benchmarks land, the case rests on Z.ai's win rates and a few early testers. If you're choosing a coding tool for a team, our roundup of AI coding assistants and the Claude Code pricing breakdown are better places to compare.

For writing and customer-facing text, the early reports say pick something else. That's a fair trade for a model built around code, and Z.ai never claimed otherwise.

Where a coding model stops and a support teammate starts

Here's what I've learned from three-plus years of putting AI on live support queues: a stronger model is the easy part to swap in. A model that writes a 6-axis robotic arm in FreeCAD still knows nothing about your refund policy, your help center or last week's outage. That's the job of the AI helpdesk agent around it: retrieval from your own docs (what RAG means in practice), access to the helpdesk, rules for when to hand off, and testing before it talks to a customer.

The testing part is where most builds stall. One CX lead at a direct-to-consumer brand handling about 7,000 tickets a month put the requirement better than I can:

"The AI will never be able to answer 100% of the questions... I need an AI who is only handling the tickets that it's confident to handle and all the other ones, leave them alone."

That's why eesel simulates a rollout against your historical tickets first, so you can see which questions it answers well and which it should pass to a person before it touches a live one. SE Ranking is a good example of what that looks like at scale: three products, one support team, and an eesel agent for each product on Zendesk, handling about 4,650 conversations in a month from roughly 16,800 pages of knowledge.

SamCart runs one agent on Freshdesk tickets and another on its website chat, answering from 280 help center articles.

None of that depends on which foundation model is underneath this month, which is the point. If you're weighing whether to build or buy, the model is maybe a tenth of the work.

GLM-5.4 also fits a workflow I like: coding agents as operators. The Coding Plan runs GLM-5.4 inside Claude Code, Codex and Cursor, and those same agents can drive the eesel CLI. From a terminal, an agent can upload approved knowledge like a refund-policy PDF or exported help articles, list what's connected, and run eesel chat test questions to check the answers before anything goes live. Connecting the helpdesk itself still needs a person with admin access to approve it in Zendesk or Freshdesk. Our guide to AI agent CLIs goes deeper on that pattern.

Try eesel

GLM-5.4 is a model you point at code. eesel is the teammate you hire for a job: an AI helpdesk teammate that joins your existing Zendesk, Freshdesk or Gorgias queue and answers from your help center and past tickets, and an AI blog writer that ships researched, publish-ready posts. You can test it on your own ticket history before it replies to a single customer, then manage it from the dashboard or the CLI.

eesel Skills page showing Simulation, Support Analytics, Blog Writer, and connected Zendesk and Slack integrations
eesel Skills page showing Simulation, Support Analytics, Blog Writer, and connected Zendesk and Slack integrations

There's a free plan to start, paid plans begin at $299 a month for 500 credits (see the pricing page), and you can try eesel without a sales call.

Frequently Asked Questions

What is GLM-5.4?

GLM-5.4 is Z.ai's newest flagship model and its first Loop Transformer: it runs 28 layers of the 750B-scale GLM-5 base twice to reason deeper without adding parameters. It has a 1M-token context window, accepts text, image, video and files, and was released on November 23, 2026.

How much does GLM-5.4 cost?

GLM-5.4 has no per-token API price yet. Today you pay through the GLM Coding Plan: Lite $18/month, Pro $80/month or Max $168/month, with 30% off yearly. GLM-5.4 uses a third fewer plan credits per token than GLM-5.3. For older GLM API prices, see our GLM-5.3-Flash pricing breakdown.

Is GLM-5.4 available through the API?

Not yet. Z.ai's GLM-5.4 docs say the Model API will open after a security assessment. Until then, GLM-5.4 works only in the GLM Coding Plan, ZCode and Z.ai Chat, so API-based products still run on GLM-5.3 or GLM-5.3-Flash.

Is GLM-5.4 open source?

Not at launch. Z.ai says it will release GLM-5.4 open weights "responsibly" after safety hardening, with no date given. GLM-5.3 and GLM-5.3-Flash weights are already on Hugging Face. If self-hosting matters, our list of open-source AI agents covers what runs today.

GLM-5.4 vs GLM-5.3: which is better?

On Z.ai's own evaluations GLM-5.4 wins 51.1% of matchups against GLM-5.3 and loses 23.1%, and it adds image and video input. GLM-5.3 still has a public benchmark table, an API ($1.40/$4.40 per million tokens) and open weights. Use GLM-5.4 for hard coding in an IDE, GLM-5.3 when you need the API. Our AI coding assistants roundup compares the wider field.

Why is GLM-5.4 so slow to answer?

GLM-5.4 reasons for a long time by design, and Z.ai's own launch post warns about "marathon thinking" loops. Early users report 10-minute answers on Max effort. Setting effort to low or medium fixes most of it; save Max for difficult bugs. Long reasoning also spends output tokens, the most expensive credits on the plan.

Can I use GLM-5.4 for customer support?

Not directly today, since there's no API, and even then a raw model isn't a support agent: it needs your knowledge, helpdesk access and testing. eesel gives you an AI helpdesk teammate that learns from your help center and past tickets and is simulated on your ticket history before it answers customers.

Share this article