GLM-5.4: Z.ai's first Loop Transformer, and when you can call it

GLM-5.4 loops part of GLM-5 to reason deeper with the same weights, aimed at video, games, shaders and CAD. No API yet; here is when it lands on CompanyFabric.

GLM-5.4, Z.ai's first Loop Transformer, coming soon to CompanyFabric

Z.ai announced GLM-5.4 today. It's the first big model we've seen built as a Loop Transformer, and Z.ai is pitching it as the start of what it calls "Generalized Coding". You can't call it through an API yet, ours included. Z.ai says API access opens after a safety evaluation. GLM-5.4 will go live on CompanyFabric under z-ai/glm-5-4 the day Z.ai's API serves it.

Until then, here's what it is, what's new about it and what's still unknown.

The short version

GLM-5.4
Model id (when live)z-ai/glm-5-4
StatusAnnounced, API not public yet
ScaleAbout 750B parameters (Z.ai)
Context window1M tokens
Input typesText and images
PriceNot announced
Where it runs todayZ.ai Chat, the GLM Coding Plan, ZCode
Open weightsPromised for later, no date

What a Loop Transformer is

In an ordinary Transformer, every layer runs once for each token. A Loop Transformer reuses part of the network: a block of layers runs, then runs again on its own output, with the same weights both times. You get a deeper chain of reasoning without adding parameters.

The idea goes back to 2018's Universal Transformer. Looped models trained from scratch have tended to lose to ordinary ones at the same training budget. Z.ai didn't start from scratch. It took the already-trained GLM-5 base and taught 28 of its middle layers to run for two passes through continued training. Z.ai says the result, at around 750B parameters, reasons at the level of 2T–3T parameter models. That's Z.ai's claim, and nobody has measured it independently yet.

Running layers twice usually means paying twice at inference time. Z.ai describes three changes aimed at keeping that cost down:

  • Gated updates. Each pass blends its result into the previous one through a per-token gate instead of overwriting it. Overwriting made the activations blow up from pass to pass.
  • A shared KV cache. The passes share most of their attention cache, and the second pass only keeps a short sliding window of its own. An extra loop costs one window of memory, not a second full cache. That matters with a 1M-token context.
  • Reused sparse-attention indexes. The second pass reuses the attention pattern the first one computed instead of working it out again.

Z.ai also ran the same loop-versus-no-loop comparison on a 30B model at equal parameter count. It's the useful control experiment, because it separates the gain from looping from the gain from size.

What "Generalized Coding" means

The pitch is that a model good enough at code can solve problems that aren't software, by writing code that produces the result. Z.ai's examples are:

  • Video: code that renders animations and motion graphics.
  • Games: playable browser games from a description.
  • 3D and shaders: GLSL shaders and 3D scenes.
  • CAD: parametric models built through FreeCAD scripts.

Add vision input, and the model can look at a screenshot or a render and fix its own output. For anyone building design, media or CAD agents, that's the part to watch.

Speed and the known limitation

Z.ai reports 10–14% shorter thinking output, and quotes up to 200 tokens per second off-peak and 70–80 at peak on its own service. It also names a limitation: on some problems GLM-5.4 keeps reflecting and re-checking for far too long, which Z.ai calls "marathon thinking". Z.ai says that extra reflection does improve accuracy. For you it means latency and output-token spend that are hard to predict. Expect to set a reasoning budget once it's callable.

What we don't know yet

  • Price. Not published. GLM-5.3 is $1.40 in / $4.40 out per million tokens, but there's no promise GLM-5.4 matches it. We won't guess. The model page [blocked] will show the real rate once Z.ai publishes it.
  • API date. "After safety evaluation" is all Z.ai has said.
  • Weights and license. Z.ai says the weights will be released "responsibly", with no date and no license named yet.

What you can use today

GLM-5.3 [blocked], Z.ai's current flagship, is live on CompanyFabric with a 1M context, vision and tool calling. Build on it now. When GLM-5.4 opens, switching is a one-line change to the model string:

ts

Follow along on the GLM-5.4 page [blocked], see how it stacks up against GLM-5.3 [blocked], or browse every Z.ai model [blocked]. Z.ai's own write-up is on its blog.

  • GLM
  • Z.ai
  • New model
  • Coming soon
  • Coding

Every model in this post is behind one key and one balance. Free starter credits on signup.

Get API Key