Short answer: The GLM-5.4 loop transformer is Z.ai’s new flagship coding model, a 750B-scale model that runs a shared block of 28 layers twice per forward pass to reason deeper without adding parameters. It is live now for every GLM Coding Plan tier (from $18 a month) at about one third fewer plan credits per token than GLM-5.3, but the pay-as-you-go API is still marked “coming soon” and the open weights will only ship after what Z.ai calls safety hardening. The caveat: Z.ai published no full benchmark scoreboard for the flagship, and it admits the model can get stuck in long “marathon thinking” loops.
Key points
- GLM-5.4 loops 28 layers of the GLM-5 base model for two iterations. Z.ai claims intelligence comparable to 2T to 3T parameter models.
- Instead of training a looped model from scratch, Z.ai converted an already pre-trained base through continued training, which it says keeps the extra compute small.
- An extra loop costs one sliding window of KV cache, not a second full cache, so 1M token context stays affordable to serve.
- In a controlled 30B test with identical parameter counts and about 10% more training compute, the looped version used 10% to 14% fewer output tokens on benchmarks such as GPQA-Diamond and MMLU-Pro.
- On the GLM Coding Plan, GLM-5.4 costs 4.6 credits per input unit and 16 per output unit, against 6.9 and 24 for GLM-5.3.
- Throughput is up to 200 tokens per second off-peak and 70 to 80 tokens per second at peak load, per Z.ai.
What shipped
Z.ai (the company behind the GLM models, formerly Zhipu) published GLM-5.4 as its first flagship built on a Loop Transformer. In a standard transformer each layer runs once per token. In a looped model, a group of weight-shared layers runs several times, and each pass refines the hidden state left by the previous one. The idea goes back to the Universal Transformer research line, but looped models trained from scratch have usually lost to normal models at the same compute budget. Z.ai’s bet is to start from a strong pre-trained base and teach it to loop.
Three engineering changes make that work at 750B scale, according to the release:
- Gated progressive updates. Per-token gates control how much each pass writes back into the residual stream. The first pass writes conservatively, the second pass writes full updates, and harder tokens get bigger first-pass steps.
- Hybrid KV cache. The second loop reuses the sparse KV picked in the first pass and keeps only its own new KV inside a local sliding window.
- Sparse attention index reuse. The second loop reuses the first loop’s attention indices, adding zero indexing overhead.
Z.ai frames the release around “Generalized Coding”: using code as the route to video editing, games, CAD and 3D work. Its demos include a self-narrated music video, a six-axis robotic arm modeled in FreeCAD and a full game with physics and combat. Those are vendor demos, not independent tests.
Where you can use the GLM-5.4 loop transformer today
Right now GLM-5.4 lives inside the GLM Coding Plan, Z.ai’s subscription for agent tools such as Claude Code, Codex, OpenCode, Cline and Z.ai’s own ZCode. All three tiers (Lite, Pro and Max) include it alongside GLM-5.3 and GLM-5.3-Flash. Each tier has a 5-hour credit limit and a weekly limit: Lite gets 2,000 and 10,000, Pro 12,000 and 60,000, Max 28,000 and 140,000.
The useful number for builders is the credit multiplier. Because GLM-5.4 burns credits about one third slower than GLM-5.3, Z.ai estimates Lite users get roughly 72M to 146M GLM-5.4 tokens a week at a 95% cache hit rate, versus 48M to 97M on GLM-5.3. The low end assumes all peak-hour use; the high end assumes all off-peak use, which is billed at half rate. Peak hours are 14:00 to 18:00 Singapore time on weekdays.
For Claude Code, Z.ai’s switching guide points the Anthropic-compatible endpoint at https://api.z.ai/api/anthropic and maps the Haiku, Sonnet and Opus model slots to glm-5.4[1m] in ~/.claude/settings.json, with CLAUDE_CODE_AUTO_COMPACT_WINDOW set to 1,000,000 for the full 1M context. Default effort is max; type /effort to drop it. If you edit settings files by hand, keep the API key out of anything you commit, the same lesson as the Claude Code settings file leak.
What it means for builders
- Cheaper agent hours, if you already pay for the plan. Same subscription, more GLM-5.4 tokens than GLM-5.3. That makes it a reasonable default for long background agent runs, similar to how teams use Qwen4-Max or DeepSeek V4.1 Flash to keep frontier bills down.
- No API, no self-hosting yet. If your product calls models from a backend, you cannot ship on GLM-5.4 today. The plan’s terms limit it to officially supported tools, ban account sharing and offer no refunds, so do not wire a subscription key into production code.
- Expect slower answers on simple tasks. Z.ai itself flags marathon thinking, and Hacker News commenters report the same habit across Chinese coding models. Use lower effort for small edits and keep
maxfor hard refactors. - The open weights may differ. Z.ai says weights come after safety hardening. Some Hacker News commenters read that as a release with weaker cyber abilities than the hosted model, so do not assume local results will match the hosted model.
Our take: the architecture is the real story. If looping a pre-trained base gives bigger-model reasoning at near-flat serving cost, every open model lab will copy it, and that pushes coding agent prices down for everyone. But until Z.ai publishes flagship benchmark scores and opens the API, GLM-5.4 is a promising subscription upgrade, not a proven Opus or Astra replacement. We have not run GLM-5.4 ourselves yet.
If you route models through a third-party aggregator once the API arrives, check where the requests are actually served; recent inference provider prompt leaks showed why that matters.
What to watch
- Full GLM-5.4 benchmark results on coding suites such as Terminal Bench and SWE-style tests, ideally from independent runs.
- Pay-as-you-go API pricing per million tokens and whether it undercuts GLM-5.3.
- The open-weight release: license, size and how much it differs from the hosted model.
- Adaptive compute, which Z.ai says it is exploring so harder tokens get more loop iterations.
- Z.ai’s next, larger model, which the company says is coming soon.



