GLM-5.4 codes like a giant model, but you can't download it

This post is open for corrections. Highlight any line of text to challenge it or ask for a clearer explanation and leave a comment.

GLM-5.4 is Z.ai’s first loop transformer: it runs part of itself twice for each word it writes, so it thinks harder without getting bigger. Z.ai says that lets it code like a model three to four times its size. Outsiders can’t test the claim yet, because the model runs only inside Z.ai’s own apps and its weights are unreleased.

Key Takeaways

  • GLM-5.4 runs the same layers twice, so it thinks deeper without getting bigger.
  • Z.ai says that puts it level with models three to four times its size.
  • You can use it only through Z.ai’s chat, ZCode and the paid Coding Plan.
  • The open weights wait on “safety hardening”, with no date given.
  • Local-model fans like the coding, dislike the writing, and suspect a cyber nerf.

What is GLM-5.4’s loop transformer?

A normal transformer runs each of its layers once for every token it writes. A loop transformer runs a group of layers several times in a row, and each pass refines the work of the one before. The repeats make the model deeper, with more layers of work per token, but its parameter count, the number of stored weights, doesn’t grow, because each pass reuses the same layers.

The idea dates back to the 2018 Universal Transformer. However, looped models trained from scratch have always lagged behind normal models given the same training budget. Z.ai took a different route: it converted its already trained GLM-5 base into a loop through extra training.

The result has 78 physical layers in three parts:

  • Prelude: layers 1 to 26 run once.
  • Loop: layers 27 to 54, 28 in all, run twice.
  • Coda: layers 55 to 78 run once.

So each token passes through 106 layers of compute while the model stores weights for only 78.

Two columns of blocks: without the loop, layers 1 to 26, 27 to 54 and 55 to 78 each run once for 78 layers of compute; in GLM-5.4 the prelude, two loop passes over layers 27 to 54 and the coda add up to 106 layers of compute
The middle 28 layers run twice, so 78 stored layers do 106 layers of work

Z.ai’s own diagram adds the parts that keep the second pass cheap.

GLM-5.4 block diagram with a 26-layer prelude, layers 27 to 54 run in two loop passes joined by damp gates and a shared per-layer cache, then a 24-layer coda
The second loop pass reuses pass one's KV cache and top-k attention indices
Image: Z.ai

Three changes that keep the loop cheap

Looping a 750B model naively blows up both the math and the memory.

  • Gated updates: a per-token gate decides how much each pass writes back. The first pass writes small, safe updates; the second writes in full. Harder tokens get bigger first-pass writes.
  • Shared memory cache: the second pass reuses the first pass’s KV cache and keeps only a 128-token window of its own. At 1M tokens of context, an extra loop therefore costs one small window instead of a second full cache.
  • Reused attention indices: the second pass borrows the first pass’s sparse attention picks, so it adds zero indexing work. Z.ai found results nearly identical to recomputing them.

Why loops suit coding

Z.ai groups large software projects, cybersecurity, 3D modeling and robot control as “ultra-long-chain” reasoning. These tasks need many steps of logic held together, and more compute per token helps them more than more memorized facts do.

In the Hacker News launch thread, one commenter explained the hardware side. When a model writes text, moving each layer’s weights from memory to the chip is the main bottleneck. A loop reuses weights already on the chip, so it buys extra thinking without extra memory traffic. A skeptic in the same thread argued that the gains are mostly theory, while the practical cost is a fixed loop count, because anything else makes serving the model much harder.

How well does GLM-5.4 code?

Z.ai’s headline claim is “intelligence levels comparable to 2T-3T parameter models,” meaning models three to four times its size. Yet no SWE-bench, Terminal-Bench or any other leaderboard number for the 750B flagship came with the launch, so there is no public way to see where it ranks against rivals. Several commenters asked where the numbers were.

The only table comes from a 30B test model built like the flagship. Z.ai compared it with and without the loop, at identical parameter counts and about 10% more training compute:

BenchmarkBaselineWith loopOutput length
AIME2519.1730.42-2%
GPQA-Diamond47.5856.26-11.7%
AA-LCR40.3347.67-9.7%
MMLU-Pro71.6575.05-14.9%
IFBench50.2053.47-13.0%

Those gains were measured on the 30B model only. Z.ai also tested the design at 1B and 4B before it scaled up.

Bar chart of Z.ai’s 30B test model: with the loop, AIME25 rises from 19.17 to 30.42, GPQA-Diamond from 47.58 to 56.26, AA-LCR from 40.33 to 47.67, MMLU-Pro from 71.65 to 75.05 and IFBench from 50.20 to 53.47, while output length drops by 2% to 14.9%
On the 30B test model the loop raised all five scores and shortened the answers

“Generalized coding” demos

Z.ai calls the new skill set generalized coding: using code to solve problems outside normal software. Its four demos:

  • Hello World is a self-narrated music video the model produced in code.
  • A 6-axis robotic arm was modeled to engineering grade in FreeCAD.
  • A full game came with movement, physics, maps, combat and art.
  • A 3D bird-watching scene was built from pure math and custom GLSL shaders.
Z.ai’s robotic arm demo, modeled in FreeCAD by GLM-5.4 (video: Z.ai)

Still, one commenter called the label the newest buzzword for “our model does more than CRUD apps.” Z.ai also picked the demos itself.

Speed, context and known flaws

GLM-5.4 writes up to 200 tokens per second off-peak and 70 to 80 at peak load. It reads up to 1M tokens of context and writes up to 128K tokens per answer.

The model can get stuck in long “marathon thinking” loops, though Z.ai says the extra self-checking still raises accuracy. Early users were less kind: one said Chinese models now second-guess even simple tasks, which makes jobs take far longer.

Independent tests are thin. Simon Willison ran a pelican SVG test at three effort levels and found the results close to GLM-5.3’s. To get an API key, Willison had to switch to the Coding Plan. Other early users called it a decent step up from 5.3, while one reverted after workers kept dying mid-task.

GLM-5.4 open weights are on hold

Until the weights ship, GLM-5.4 runs in only three places, all of them Z.ai’s own:

  • Z.ai Chat, the web app.
  • ZCode, Z.ai’s coding app.
  • GLM Coding Plan, the paid subscription, where weekly plans get 1.5 times their GLM-5.3 quota.

The pay-per-token API is listed as “coming soon”. Z.ai will open it after a security assessment. OpenRouter doesn’t carry the model either. For the weights, Z.ai promises a release only “after completing necessary safety hardening,” with no date and no word on what that hardening changes.

GLM-5.4 with a solid arrow to a blue group it runs in now, Z.ai Chat, ZCode and the GLM Coding Plan, and a dashed arrow to an orange group not available yet: the pay-per-token API, OpenRouter and the open weights
Today GLM-5.4 runs only inside Z.ai's own products

The top comment on the release thread in Reddit’s r/LocalLLaMA forum rewrote that line to end in “nerf to cybersecurity skill.” Another reply objected:

I dont really like the cyber sec nerf, wasnt open weights supposed to be the backup for everyone that doesnt have access to frontier models and want to defend themselves against groups/ppl that do?

u/RedMatterGG

GLM-5.3 and DeepSeek v4.1 Flash ranked among the best open models for security work, with no abliteration needed. Without that edge, users argued, GLM has little to offer over faster and cheaper rivals. Another commenter read several Chinese labs hardening their models at once as a sign of a government order.

On the other hand, one reader noted that GLM-5.3 already circulates widely in abliterated form. So a light hardening pass would likely be undone within days. Z.ai hasn’t said whether it plans something stronger.

Z.ai has also teased a “significantly larger” next model, ready “soon.” As one user pointed out, 750B is no longer the flagship tier anyway.

Users say GLM-5.4 can code but cannot write

The second-biggest GLM thread of the launch week was a complaint. Its title says GLM-5.4 is “great at coding” but “absolutely garbage at writing.” The poster found the model pedantic and literal, full of stock phrases. Worse, the model spent half its chain of thought, the reasoning it writes before answering, checking whether a request was okay.

One reply pointed at how labs train these models:

Unfortunately, coding is super easy to do reinforcement learning on: you can compile the code, run it, verify its output etc.

u/Othun

Prose has no compiler, so it gets less of that training. Even so, another reply defended the trade: coding, science and engineering are the most useful targets first, and artistic use can come later. One user saw the opposite: GLM-5.4 wrote project docs with less private jargon than 5.3 did.

In practice, use GLM-5.4 for agentic coding and keep another model for docs and other prose.

Should you switch to GLM-5.4 now?

It depends on how you use GLM today, because the model is open to some users and closed to others.

Three color-coded columns under the question “Should you switch to GLM-5.4 now?”: a green Switch now column for Coding Plan subscribers and anyone wanting a cheap coding agent, an amber Wait column for API, OpenRouter, home and security users, and a red Not for this column for writing docs or prose, each holding white cards with the reason
Switch, wait or skip, depending on how you use GLM today

Anyone after a cheap near-frontier coding agent can start on the Coding Plan today. Home users should stay on GLM-5.2, which you can download and run yourself, until 5.4’s weights ship.

Loops are spreading fast: Thinking Machines shipped its own looped open model the same week.