GLM-5.4 Explained: Z.ai’s Loop Transformer, Layer Reuse, Benchmarks, Pricing and What Is Still Unverified
Z.ai’s newest flagship does not add parameters to get smarter. It runs part of itself twice. GLM-5.4, announced on 23 November 2026, takes 28 consecutive layers of a 78-layer GLM-5-family base and executes them as a two-pass loop, then claims “intelligence levels comparable to 2T-3T parameter models” at roughly 750B parameters. That is a direct bet against the “just scale the weights” playbook. It is also a bet you cannot yet check independently: there is no public API, no released weights and no standard benchmark table for the model itself. This post reads Z.ai’s own architecture diagram and the GLM-5 config files closely. From them we derive what the loop actually costs in compute, KV cache memory and latency, and we separate vendor claims from verified facts. You will leave knowing which layers loop, what the 30B ablation does and does not prove, what the GLM Coding Plan really costs, and what to test before you move work onto it.
What this covers: lineage from GLM-5 to GLM-5.4, the prelude/loop/coda layout, gate and KV-cache mechanics, compute arithmetic, the evidence behind the benchmark claims, access and pricing, failure modes, and a peer comparison.
Context and Background: From GLM-5 to GLM-5.4 in Ten Months
GLM-5.4 is the fifth release in a family that has moved fast. The open-weight GLM-5 appeared on Hugging Face on 11 February 2026 with a technical report (arXiv:2602.15763). The Mixture-of-Experts (MoE) model has 744B total parameters and about 40B active per token. It uses DeepSeek Sparse Attention (DSA) on top of Multi-head Latent Attention (MLA). GLM-5.1 followed in early April 2026 (its Hugging Face repository is dated 3 April).
GLM-5.2, published on Hugging Face on 16 June 2026 under an MIT license, was the bigger architectural step. It extended the context to a “solid” 1M tokens and introduced index sharing: one sparse-attention indexer serves every four layers. Z.ai’s model card cites that technique to the IndexCache paper (arXiv:2603.12201) and says it cuts per-token FLOPs by 2.9x at 1M context. We covered that release in depth in our GLM-5.2 architecture and benchmarks explainer.
GLM-5.3 arrived in mid-August 2026. Decrypt dated its report 14 August, and the weights appeared on Hugging Face on 25 August. Its model card is explicit: “GLM-5.3 uses the same base model as GLM-5.2 — every gain comes from post-training.” The headline results were agentic coding and cyber-offense gains. Examples include Terminal Bench 3.0 rising from 4.6 to 28.3 and CyberGym from 77.2 to 84.5 (both vendor-reported). It shipped under a custom “GLM-5.3 License”. That license is MIT-style, but Model-as-a-Service operators with more than US$10 billion in annual revenue must pass a Z.ai security review.
GLM-5.4 breaks that pattern. It is the first release in the line whose gains Z.ai attributes mainly to an architectural change applied after pre-training rather than to post-training alone. The release also follows GLM-5.3’s rollout order: Coding Plan subscribers first, with API and weights “after safety” work.
The underlying idea is old. The Universal Transformer (Dehghani et al., 2018) shared weights across depth. Recent recurrent-depth and looped language models, such as Geiping et al. 2025 and the Ouro looped LMs, showed gains at small scale. Our looped transformers explainer covers that literature, so this post will not re-derive it. The interesting question here is narrower: what does looping look like when you retrofit it into a 744B sparse-attention MoE that already serves 1M-token contexts in production?
GLM-5.4 Architecture: Which Layers Loop and What It Costs
GLM-5.4 is a ~750B-parameter MoE language model that runs layers 27–54 of its 78-layer GLM-5-family base twice per token. A 26-layer prelude runs once before the loop and a 24-layer coda runs once after it. Learned per-token gates blend each pass into the residual stream. The second pass reuses the first pass’s sparse KV and attention indices, so the extra memory cost is small.

Figure 1: GLM-5.4’s prelude–loop–coda layout, redrawn from Z.ai’s architecture diagram. Layers 27–54 run twice with shared weights; pass 2 reads pass 1’s KV latents and top-k indices.
Figure 1 is our simplified redraw of the diagram in Z.ai’s GLM-5.4 announcement. Token embeddings, plus projected features from a 24-layer Vision Transformer (ViT), enter a prelude of layers 1–26. The resulting hidden state x0 enters the loop block, layers 27–54. After pass 1, a “damp gate” produces x1. The same 28 layers then run again to produce h2, and a second gate produces x2. The coda, layers 55–78, runs once, followed by a final RMSNorm and the LM head. Per token, the model applies 26 + 28×2 + 24 = 106 layer applications instead of 78, or 1.36× the depth.
The base: what the config files tell us
Z.ai has not published a GLM-5.4 config.json, and a request to a zai-org/GLM-5.4 Hugging Face path returned no public repository at the time of writing. The blog says the model “loops 28 layers of the GLM-5 base model”. Its diagram matches the published GLM-5-family configs closely: 78 layers, an indexer in layers 1–2, and then an indexer in one of every four layers that the next three reuse. That pattern is exactly GLM-5.2/5.3’s index_topk_freq: 4. The diagram’s “k = 2048” equals index_topk: 2048 in every GLM-5-family config.
The shared configs specify the rest: hidden_size 6144, 64 attention heads, kv_lora_rank 512 with a 64-dimension RoPE key, q_lora_rank 2048, three dense layers then MoE layers, and 256 routed experts plus one shared expert with 8 routed experts active per token. Each expert has a 2048-wide intermediate layer, and the vocabulary is 154,880 tokens. Our working assumption, labelled as such, is that GLM-5.4’s text backbone keeps these dimensions. Z.ai has not confirmed which checkpoint is the base. The 1M context and the every-fourth-layer indexer point to the GLM-5.2/5.3 generation rather than the February GLM-5 checkpoint, but that is our inference.
One genuinely new element is vision. GLM-5.2 and GLM-5.3 were tagged text-generation on Hugging Face. GLM-5.4’s documentation lists video, image, text and file input, and its diagram shows “Projected 24-layer ViT Features” entering the embedding. Z.ai has not disclosed the size of the vision encoder.
Parameter versus compute arithmetic
Here is the arithmetic the announcement does not spell out. These are our estimates from the GLM-5 config, not Z.ai figures.
Each MoE layer’s attention block, counting the MLA down- and up-projections and the output projection, comes to roughly 165M parameters. Each expert is a SwiGLU feed-forward network of 3 × 6144 × 2048 ≈ 37.7M parameters. Nine experts are active per token (8 routed plus 1 shared), so an MoE layer touches about 165M + 340M ≈ 505M parameters per token. Summing across 3 dense and 75 MoE layers gives about 39B active, which matches GLM-5’s published ~40B active. The same sum over all 257 experts per layer gives about 743B in total, which matches the 744B headline.
Now loop layers 27–54. All 28 are MoE layers, because the dense ones are layers 1–3. A second pass therefore adds about 28 × 505M ≈ 14B parameter-applications per token. At roughly 2 FLOPs per active parameter, forward compute rises from about 80 GFLOPs to about 108 GFLOPs per token, an increase of ~35%. That excludes attention-score compute, which DSA caps at 2,048 selected positions per query. Stored parameters barely change: the two gates are small “Linear + σ” heads on an RMSNorm. So the “~750B” figure is plausibly 744B plus the vision encoder and gates, although Z.ai has not published the breakdown.
That is the trade in one sentence. GLM-5.4 buys roughly a third more per-token compute and about a third more sequential depth, without storing more weights. Z.ai’s claim is that this bought capability worth a 2–3× larger model. If true, it is a strong exchange rate. It is not yet verified.
The three retrofit changes
Gated progressive updates. Z.ai reports that overwriting hidden states when converting middle layers into a loop “causes activation norms to blow up across iterations”. The fix is a per-token gate for each pass. In the diagram it is written x1 = x0 + β1(h1 − x0), where β comes from a linear layer and a sigmoid over the normalised input. Z.ai says that after training, pass 1 writes conservatively with small β while pass 2 “opens the gates to write full updates”. On harder tokens, pass 1 writes more aggressively. Mechanically this is an interpolation, not a residual add, so the coda always sees a state on the same scale as the original layer-54 output it was pre-trained on.
Hybrid KV cache. A naive loop would keep a full KV cache per pass. GLM-5.4 instead lets pass 2 attend to two banks under one softmax. The first is the sparse prefix selected in pass 1 (KV latents plus top-k indices). The second is pass 2’s own KV, kept only inside a local sliding window that Z.ai’s diagram labels “128-tok window”. We quantify the cost in the next section.
Sparse attention index reuse. Pass 2 runs with no indexer at all; it reuses pass 1’s top-k indices. Z.ai reports that this “performs nearly identically” to recomputing indices. That result is plausible, because index sharing across layers was already validated in GLM-5.2.
Deeper Analysis: KV Cache, Latency and Serving Cost
Most launch coverage repeated “28 layers looped twice” and stopped. For anyone budgeting inference, the questions are memory, latency and throughput. All figures in this section are our own illustrative calculations from public GLM-5-family config values. They are not measurements.
KV cache memory: why the loop is nearly free on memory
MLA caches a compressed latent rather than full keys and values. In the GLM-5 configs that is kv_lora_rank 512 plus a 64-dimension RoPE key, or 576 values per token per layer. At 2 bytes per value (BF16), that is 1,152 bytes per token per layer. Production servers often store KV in FP8, which halves every number below.
| Scenario (1M-token context, BF16 latent, illustrative) | Layers holding KV | Approx. KV cache per sequence |
|---|---|---|
| 78-layer base, single pass | 78 | 1,048,576 × 78 × 1,152 B ≈ 94.2 GB |
| Naive loop: full second-pass cache for L27–54 | 78 + 28 | ≈ 128.0 GB (+36%) |
| GLM-5.4 hybrid: pass-2 KV only in a 128-token window | 78 + 28 × 128 tokens | ≈ 94.2 GB + ~4.1 MB |
The naive design would add about 33.8 GB per 1M-token sequence. The hybrid design adds 28 × 128 × 1,152 bytes ≈ 4.1 MB, which is a rounding error. This is the most important engineering decision in GLM-5.4. Long-context agentic coding is memory-bound on KV, so a design that multiplied cache by loop count would have cut concurrent long sessions per GPU by roughly a quarter. Z.ai’s wording, “an extra loop only costs one sliding window of KV cache rather than a full context cache”, matches this arithmetic. The sparse-attention indexer keeps its own small key cache as well; we omit it, because pass 2 adds nothing to it. For background on MLA compression, see our MLA vs GQA vs MQA KV-cache comparison.
There is a subtle consequence. Pass 2’s view of distant context is pass 1’s representation of that context, not a refined one. Only the most recent ~128 positions carry second-pass representations. In effect, the loop refines the current token’s computation using a fixed first-pass memory of everything else. That is a reasonable inductive bias for “think harder about the next token”. It is less obviously helpful for tasks that need the whole context re-interpreted, and Z.ai has not published long-context retrieval results for the 750B model.
Latency: depth is sequential
FLOPs can be parallelised across GPUs; depth cannot. Every decode step must traverse 106 layer applications in order rather than 78. In a tensor-parallel deployment, each layer adds a fixed synchronisation cost, so per-token latency grows with depth even when GPUs are not compute-saturated. As a first-order illustrative estimate, if a 78-layer step takes time t, a 106-layer step takes about 1.36t before kernel fusion.
Z.ai reports “up to 200 tokens/s during off-peak hours and … 70–80 tokens/s at peak load”, and credits fused kernels that cut intermediate memory reads and writes. As a reference point only, the GLM-5.3 model card rescaled its own ExploitGym timings using an Artificial Analysis throughput figure of 115 tokens/s for GLM-5.3. These numbers come from different systems, loads and measurement methods. They do not support a precise speed comparison, but they show the loop has not made GLM-5.4 obviously slow in Z.ai’s own deployment.
Pipeline parallelism gets awkward, too. If layers 27–54 straddle a pipeline-stage boundary, pass 2 must send activations backwards to an earlier stage. Serving stacks would likely keep the loop block within one stage or rely on tensor and expert parallelism instead. Our tensor vs expert vs data parallel serving guide covers the general trade-offs.
MoE routing on the second pass
The second pass uses the same router weights but a different input state, so a token may route to different experts in pass 2. At batch size 1, decoding is memory-bandwidth bound. Up to 9 additional experts per looped layer may then need fetching from high-bandwidth memory, which is the real cost of pass 2 in small-batch serving. At large batch sizes, most experts are touched anyway and the cost shifts to compute. Z.ai has not published routing-overlap statistics between passes. A high overlap would make the loop cheaper than our ~35% compute estimate in practice, because weights could be reused while still hot in cache.
Training: Converting a Pre-Trained Base Instead of Starting Over
GLM-5.4 was not trained as a looped model from scratch. Z.ai states the reason plainly: looped models trained from scratch “still lag behind unshared models under the same pre-training compute budget”. It therefore adapted an already pre-trained base “into a Loop Transformer through continued training”. That choice is the core of the economics. It reuses months of pre-training compute and spends a comparatively small increment on teaching an existing 28-layer block to tolerate being run twice.

Figure 2: How GLM-5.4 was built, as far as Z.ai has disclosed it. Data volumes, token counts and the post-training recipe for the 750B model are not published.
Figure 2 has two strands. The top row is the production path: a pre-trained base, conversion with gates, continued training, long-context supervised fine-tuning, and post-training. The bottom row is the validation ladder. Z.ai says it tested the loop “progressively across 1B, 4B, 30B, and 750B base models” before committing the flagship. It calls this “Scaling Correctness”: an architectural change must keep working as scale grows.
What Z.ai disclosed and what it did not
| Training item | Status (as of 27 Nov 2026) |
|---|---|
| Starting point | Disclosed: pre-trained GLM-5 base, converted via continued training |
| Loop span and count | Disclosed: 28 layers (L27–54 per diagram), 2 passes |
| Continued-training token count and data mix | Not disclosed |
| Total training compute for the 750B model | Not disclosed |
| Compute overhead in the 30B ablation | Disclosed: “only ~10% more total training compute” |
| SFT details | Partly disclosed: 30B ablation evaluated “after 200K long-context SFT” |
| RL / RLVR / preference tuning for 750B | Not disclosed |
| Vision encoder pre-training | Not disclosed |
The “200K long-context SFT” phrase is ambiguous. It may refer to 200K-token sequences or 200K examples, and Z.ai does not say which. We therefore report it verbatim. GLM-5.3 showed that Z.ai’s recent gains came heavily from scaled post-training. It would be surprising if GLM-5.4 did not reuse that RL pipeline, but no document confirms it.
Why conversion is a sensible bet
Mid-network layers in deep transformers are known to perform similar, incremental refinements. That observation motivated both layer-pruning and layer-repetition experiments in the open literature. A middle block is therefore the natural candidate to repeat: its input and output distributions are close enough that a gate can blend them. The prelude, which turns tokens into features, and the coda, which turns features into logits, stay single-pass. Z.ai’s gate statistics fit this picture. Pass 1 writes small updates, so the first iteration acts like a lightly perturbed copy of the original block. Pass 2 does the heavy lifting.
Capabilities and Benchmarks: What the Evidence Actually Shows
As of 27 November 2026, Z.ai has published no standard benchmark table for GLM-5.4 itself. There are no SWE-bench, Terminal Bench, GPQA or HLE scores for the 750B model. The quantitative evidence comprises a 30B ablation, a three-row win-rate chart and throughput figures. No independent evaluation exists yet. An Artificial Analysis model page for GLM-5.4 returned HTTP 404 when we checked, consistent with the absence of a public API to test against.

Figure 3: The evidence behind GLM-5.4’s headline claim. Solid boxes exist; “not published” and “none yet” mark the gaps a buyer should care about.
Figure 3 sorts the evidence by provenance. The “comparable to 2T-3T parameter models” line has no stated method, benchmark set or named comparison model. Treat it as a positioning statement.
The 30B iso-parameter ablation (vendor-reported)
Z.ai trained a 30B model “with the exact same architecture as our 750B base”. It compared a looped version against an unlooped baseline at identical parameter count, with the looped run using ~10% more total training compute. Scores were taken after long-context SFT with thinking mode enabled. The numbers below were transcribed from Z.ai’s published table image.
| Benchmark (30B model) | Baseline | + Loop | Gain (points) | Avg. output length change |
|---|---|---|---|---|
| AIME 2025 | 19.17 | 30.42 | +11.3 | −635 tokens (−2%) |
| GPQA-Diamond | 47.58 | 56.26 | +8.7 | −2,473 tokens (−11.7%) |
| AA-LCR (long-context reasoning) | 40.33 | 47.67 | +7.3 | −539 tokens (−9.7%) |
| MMLU-Pro | 71.65 | 75.05 | +3.4 | −863 tokens (−14.9%) |
| IFBench (instruction following) | 50.20 | 53.47 | +3.3 | −763 tokens (−13.0%) |
Three readings follow. First, the gains rank by reasoning depth: math, then science, then long-context reasoning, with knowledge and instruction-following last. That ordering fits the claim that looping helps “longer reasoning chains”. Second, the looped model also wrote shorter answers. The blog’s “10–14%” summary holds for four of five rows; AIME output shrank only 2%. Third, these are scores for a 30B research model, not for GLM-5.4. Never quote “AIME 30.42” as a GLM-5.4 result.
Methodology caveats matter here. The comparison is iso-parameter but not iso-compute. The looped model received ~10% more training compute and also spends roughly a third more inference FLOPs per token, by our estimate for a similarly proportioned model. A stronger control would give the baseline the same extra continued training. The table reports single numbers with no seeds or variance, and AIME 2025 has only 30 problems, so one problem moves the score by about 3.3 points. The direction is credible; the magnitude needs confirmation.
Pairwise win rates (vendor-reported, method undisclosed)
The GLM-5.4 documentation page shows a “GLM-5.4 Win Rate” chart:
| Comparison | GLM-5.4 wins | Tie | GLM-5.4 loses |
|---|---|---|---|
| vs GLM-5.3 | 51.1% | 25.7% | 23.1% |
| vs Kimi K3.1 Pro | 41.8% | 26.9% | 31.3% |
| vs DeepSeek-V4.1-Flash-1017 | 36.6% | 30.2% | 33.2% |
Z.ai does not state the task set, the number of prompts, or whether judging used humans or a model. Read at face value, GLM-5.4 beats its predecessor clearly, beats Kimi K3.1 Pro modestly, and roughly matches DeepSeek-V4.1-Flash-1017: 36.6% wins against 33.2% losses is within the noise of any plausible sample size. None of this is independent.
Qualitative demos
Z.ai’s “Generalized Coding” demos include a self-narrated music video built through code, a six-axis robotic arm modelled in FreeCAD, a complete game, and a GLSL-shader 3D scene. Demos show capability ceilings under curated conditions, not reliability. For engineering teams, the FreeCAD example is the interesting one, because CAD scripting is a domain where earlier LLMs failed on geometric consistency. It still needs reproduction on your own parts.
Access, Deployment and Pricing

Figure 4: Where you can and cannot run GLM-5.4 today. Solid paths are live; dashed paths are announced without dates.
Figure 4 shows the current state. GLM-5.4 is live on three surfaces: the GLM Coding Plan (through supported tools such as Claude Code, OpenCode and Cline), Z.ai’s ZCode, and Z.ai Chat. The Model API “will be made available upon completion of the security assessment”. Weights are planned “after completing necessary safety hardening”. Neither has a date. Per TestingCatalog’s launch report, the model identifier in tools is glm-5.4, with glm-5.4[1m] in Claude Code for the 1M context.
Specifications (from Z.ai documentation)
| Item | Value | Source status |
|---|---|---|
| Release | 23 Nov 2026 | Official blog |
| Scale | “750B” base; total count not itemised | Official (rounded) |
| Architecture | MoE + DSA, L27–54 looped ×2 | Official diagram |
| Context length | 1M tokens | Official docs |
| Max output | 128K tokens | Official docs |
| Input / output | Video, image, text, file / text | Official docs |
| Features | Thinking mode, streaming, function calling, context caching, JSON structured output | Official docs |
| Throughput | Up to 200 tok/s off-peak; 70–80 tok/s peak | Vendor-reported |
| License | Not announced (GLM-5.3 used a custom MIT-style license) | Unknown |
GLM Coding Plan pricing
Z.ai’s own documentation confirms only that plans start at US$18 per month. Third-party price trackers, including aipricing.guru (data updated 27 November 2026) and eesel.ai, list the tiers as Lite $18, Pro $80 and Max $168 per month. Z.ai renders its subscription page client-side, so we could not machine-read the prices directly. Confirm them at checkout.
The plan meters usage in credits. Per Z.ai’s devpack documentation, Lite gets 2,000 credits per 5 hours and 10,000 per week; Pro gets 12,000 and 60,000; Max gets 28,000 and 140,000. Peak hours are Monday–Friday, 14:00–18:00 Singapore time (UTC+8). Off-peak usage costs 50% of the standard credit rate, and a usage notice says weekends bill at off-peak rates all day.
The documented credit formula is (input × multiplier + cached input × multiplier + output × multiplier) / 10,000. For GLM-5.3 the multipliers are 6.9, 1.7 and 24. At the time of our check, the devpack page did not list GLM-5.4 multipliers. eesel.ai reports 4.6, 1.1 and 16, and those figures are consistent with Z.ai’s statement that weekly-quota users get “1.5× that of GLM-5.3” (6.9/4.6 = 24/16 = 1.5). Treat them as third-party-reported until Z.ai’s page lists them.
Worked example (illustrative, using the third-party GLM-5.4 rates). Take an agentic coding turn with 2M input tokens, of which 95% hit the cache, plus 50K output tokens. The cost is (100,000 × 4.6 + 1,900,000 × 1.1 + 50,000 × 16) / 10,000 = 335 credits at peak, or about 168 off-peak. A Lite plan’s 2,000-credit 5-hour window covers about six such turns at peak. The same traffic on the GLM-5.3 pay-as-you-go API would cost about $0.85, using GLM-5.3’s listed $1.40 input, $0.26 cached and $4.40 output per million tokens. GLM-5.4 has no API price yet. For cross-vendor context, see our LLM API pricing comparison for November 2026.
Self-hosting outlook
You cannot self-host GLM-5.4 today. If the weights ship at GLM-5.3’s scale, FP8 storage would need roughly 750 GB for weights alone. That points to a single 8-GPU node with at least 141 GB per GPU, or multi-node serving, before KV cache. This is our estimate. Serving engines will also need loop-aware kernels to reuse the pass-1 KV and indices. vLLM and SGLang support GLM-5.3, but neither has announced GLM-5.4 support, because there is nothing to load yet. As a precedent only, GLM-5.3 launched on the Coding Plan around 13–14 August and its weights appeared on Hugging Face on 25 August.
Trade-offs, Gotchas, and What Goes Wrong
“Marathon thinking.” Z.ai’s own blog names the main limitation. GLM-5.4 “tends to get caught in overly long ‘marathon thinking’ loops”, although the extra reflection improves accuracy. This sits awkwardly beside the ablation’s shorter outputs. The likely reconciliation is that the 30B ablation measured averages on fixed benchmarks, while the flagship shows a long tail of runaway reasoning on hard or open-ended agent tasks. In a credit-metered plan, runaway output is expensive, because output is the costliest credit category (16 vs 1.1 for cached input, per the reported rates). Cap reasoning effort where your tool allows it, and set max-output limits on agent loops.
Fixed loop count. Every token gets exactly two passes. Easy tokens waste the second pass and hard tokens may need a third. Z.ai lists adaptive compute, giving harder tokens more iterations, as future work. Until then, the ~35% extra compute is paid uniformly.
Stale long-range representations. Pass 2 sees distant context only through pass-1 KV. Tasks that require re-reading a large codebase in light of a late discovery may benefit less than token-level reasoning does. This is our inference from the design, and Z.ai has published no data on it for the 750B model.
Unverifiable claims. There is no benchmark table, no independent evaluation and no API for third parties to test. “Comparable to 2T-3T” has no stated method. The win-rate chart has no stated task set. Procurement decisions should wait for reproducible numbers, or rest on your own evaluation inside the Coding Plan.
Data residency and licensing unknowns. Coding Plan traffic is processed on Z.ai infrastructure. The weight license is unannounced. GLM-5.3’s license added a security-review clause for very large MaaS providers, and GLM-5.4’s license could differ again.
Tooling drift. Loop-aware inference requires engine changes. Expect early community quantisations to break or mis-handle the shared-KV path when weights land. Verify outputs against Z.ai’s hosted model before trusting a local build.
How GLM-5.4 Compares
Only sourced facts appear below. Where something is unpublished, we say so rather than estimate.
| Model | Architecture (published) | Open weights | Pay-as-you-go API | Best fit today |
|---|---|---|---|---|
| GLM-5.4 | ~750B MoE+DSA, 28-layer loop ×2, 1M ctx, multimodal input | Planned, no date | Not yet | Coding Plan users doing long, reasoning-heavy agent work |
| GLM-5.3 | 744B/~40B-active MoE+DSA, 1M ctx, text | Yes (GLM-5.3 License) | $1.40 / $4.40 per M tokens | Production API, self-hosting, audited pipelines |
| GLM-5.2 | Same base as 5.3, 1M ctx, text | Yes (MIT) | $1.40 / $4.40 per M tokens | Permissive-license deployments |
| Kimi K3.1 Pro | Not covered here | — | — | Z.ai win rate: GLM-5.4 wins 41.8%, loses 31.3% |
| DeepSeek-V4.1-Flash-1017 | See our DeepSeek-V4.1-Flash explainer | — | — | Z.ai win rate: roughly even (36.6% vs 33.2%) |
Decision matrix by use case:
| Use case | Pick | Why |
|---|---|---|
| Daily agentic coding inside Claude Code or OpenCode, already on the Coding Plan | GLM-5.4 | 1.5× quota versus GLM-5.3 on weekly plans, and reported reasoning gains |
| Production API with SLAs and cost forecasting | GLM-5.3 | Published prices; GLM-5.4 has no API |
| On-prem or air-gapped deployment | GLM-5.3 or GLM-5.2 | Weights available; GLM-5.4’s are not |
| Screenshot-, video- or CAD-driven coding | Trial GLM-5.4 | Only GLM-5 line member with documented image and video input |
| Regulated work needing independent benchmarks | Wait | No third-party GLM-5.4 numbers exist |
For cross-family context, our open-weight LLM benchmark leaderboard for November 2026 ranks the released models. GLM-5.4 cannot be placed there until its weights ship.
Practical Recommendations
Treat GLM-5.4 as a promising architecture result with a thin public evidence base. The design is coherent. The KV-cache arithmetic shows the loop is almost free on memory, and the ablation’s direction matches what looped-model research predicts. What is missing is any absolute score for the flagship and any independent replication. That shapes how to adopt it.
If you are already on the GLM Coding Plan, switching is low-risk and possibly cheaper per task, given the 1.5× quota. Run a short A/B test on your own repositories against GLM-5.3. Measure task success, wall-clock time and credits consumed, not impressions. Watch especially for marathon-thinking runs, which will dominate your credit burn if they are common in your workload.
If you need an API, licensing clarity or self-hosting, stay on GLM-5.3 for now. Prepare your serving stack by tracking vLLM and SGLang issues for loop-aware DSA kernels. When weights land, validate any local build against Z.ai’s hosted outputs before trusting quantised variants.
If you are an architect evaluating the idea rather than the product, the transferable lesson is the retrofit recipe. Loop a middle block, gate the writes, share long-range KV across passes, keep only a local window per extra pass, and reuse sparse-attention indices. That recipe could apply to other MoE+MLA models.
Checklist:
- Confirm current Coding Plan prices and GLM-5.4 credit multipliers on Z.ai’s own pages.
- A/B GLM-5.4 against GLM-5.3 on 20–50 real tasks; log credits, success and latency.
- Set max-output and reasoning-effort caps in agent tools to contain marathon thinking.
- Schedule heavy jobs off-peak (outside 14:00–18:00 SGT on weekdays) for half-rate credits.
- Do not cite the 30B ablation scores as GLM-5.4 scores.
- Re-check for an API, a license and independent benchmarks before any production commitment.
Frequently Asked Questions
What is GLM-5.4?
GLM-5.4 is Z.ai’s flagship large language model, announced on 23 November 2026. It is the first in the GLM line built as a Loop Transformer. It converts a pre-trained GLM-5-family MoE base of about 750B parameters so that 28 of its 78 layers run twice per token, adding computational depth without adding stored weights. It supports a 1M-token context, 128K output tokens, and text, image, video and file input. At launch it is available only through the GLM Coding Plan, ZCode and Z.ai Chat.
How does the GLM-5.4 Loop Transformer work?
The model runs a 26-layer prelude once, then executes layers 27–54 twice with shared weights, then runs a 24-layer coda once. After each pass, a learned per-token gate blends the new hidden state into the residual stream to keep activation scales stable. The second pass reuses the first pass’s sparse-attention indices and long-range KV cache. It keeps its own new keys and values only inside a short 128-token sliding window, so memory overhead stays small.
Is GLM-5.4 open source?
Not yet. Z.ai says it plans “to open-source the model weights responsibly after completing necessary safety hardening” but gives no date. No license has been announced. Its predecessor GLM-5.3 shipped weights under a custom MIT-style license with a security-review clause for very large Model-as-a-Service operators, while GLM-5.2 used a plain MIT license. GLM-5.3’s weights reached Hugging Face roughly two weeks after its Coding Plan launch, but that is a precedent, not a commitment for GLM-5.4.
How much does GLM-5.4 cost?
There is no per-token API price yet, because the API awaits a security assessment. Access today is via the GLM Coding Plan. Z.ai confirms plans start at US$18 per month, and third-party trackers list Lite at $18, Pro at $80 and Max at $168 monthly. Usage is metered in credits, with off-peak usage billed at half rate. Weekly-quota subscribers get 1.5× more GLM-5.4 usage than GLM-5.3. Verify current prices on Z.ai’s subscription page before buying.
Are there independent GLM-5.4 benchmarks?
No, as of 27 November 2026. Z.ai has published a 30B-scale ablation and a pairwise win-rate chart against GLM-5.3, Kimi K3.1 Pro and DeepSeek-V4.1-Flash-1017. It has not published standard benchmark scores for the 750B model, and no third-party leaderboard lists it. Independent testing is hard until the API or weights are available, because outside evaluators cannot yet send it a controlled prompt set. The claim that GLM-5.4 matches 2T–3T-parameter models is vendor-reported, with no disclosed method or benchmark set.
Does looping make GLM-5.4 slower or more expensive to serve?
It adds compute and depth but little memory. Based on public GLM-5 config values, our estimate is that the second pass adds about 35% more forward FLOPs per token and 36% more sequential layer applications. Thanks to the hybrid KV design, it adds only a few megabytes of KV cache per 1M-token sequence. Z.ai reports up to 200 tokens per second off-peak and 70–80 at peak, helped by fused kernels. The realised serving cost on Z.ai’s infrastructure is not published.
Further Reading
- GLM-5.2 explained: architecture and benchmarks, the previous model in this series, with the 1M context and index sharing.
- Looped transformers explained: recurrent depth, weight sharing and adaptive computation, the general theory GLM-5.4 builds on.
- Open-weight LLM benchmark leaderboard, November 2026, where GLM-5.3 and peers are ranked.
- Native Sparse Attention and DeepSeek Sparse Attention for long-context LLMs, background on the DSA indexer GLM-5.4 reuses.
- KV cache optimisation for LLM inference, for the memory arithmetic behind long-context serving.
- Z.ai, GLM-5.4: Toward Generalized Coding with Our First Loop Transformer (primary source, 23 Nov 2026).
- Z.ai, GLM-5.4 model documentation and GLM Coding Plan overview.
- GLM-5 Team, GLM-5: from Vibe Coding to Agentic Engineering (technical report), and the GLM-5.3 model card.
- Dehghani et al., Universal Transformers (2018).
By Riju — about
