AI

Z.ai GLM-5.4 Loop Transformer: Architecture, 30B Ablations, and Production Trade-Offs

Z.ai released GLM-5.4 on November 23, 2026, adapting its 750B-scale GLM-5 base into a two-pass Loop Transformer with a 1M context window. While Z.ai claims intelligence comparable to 2T–3T parameter models, it has not yet published flagship benchmark tables or open weights—relying on 30B ablations and early third-party tests that show strong bug-hunting precision alongside heavy token consumption.

By 0xScorPionSon

10 min read

Z.ai GLM-5.4 Loop Transformer: Architecture, 30B Ablations, and Production Trade-Offs

Z.ai GLM-5.4 Loop Transformer architecture infographic

Executive Summary

On November 23, 2026, Z.ai released GLM-5.4, its first flagship model built on a Loop Transformer architecture, introducing multimodal inputs (text, image, video, and file), a 1M-token context window, and a 128K maximum output (Z.ai Blog; Z.ai Developer Docs). Rather than scaling total parameter count further, GLM-5.4 adapts the pre-trained 750B-scale GLM-5 base through continued training so that 28 middle layers execute twice per forward pass, trading additional compute per token for deeper iterative reasoning (Z.ai Blog; MarkTechPost).

From an empirical engineering standpoint, the release requires careful separation of vendor claims from verified evidence. Z.ai states that GLM-5.4 reaches intelligence levels comparable to 2T–3T parameter models, yet as of launch day it had published no flagship 750B benchmark table, no model card, no public API pricing, and no open weights (DataCamp; VentureBeat). The controlled quantitative evidence in Z.ai's technical post comes from an iso-parameter 30B ablation, supplemented by an unexplained win-rate chart without published methodology (VentureBeat). Meanwhile, early third-party testing highlights a sharp operational trade-off: GLM-5.4 excels as a patient code reviewer and security auditor, yet frequently falls into "marathon thinking" loops that inflate wall-clock runtime and token consumption by an order of magnitude (Z.ai Blog; DataCamp). Confidence in flagship 750B parity claims remains partial until Z.ai publishes full benchmark tables, API pricing, and open weights.

Loop Transformer Architecture & How It Works

Conventional dense and Mixture-of-Experts (MoE) Transformers pass each token's hidden state through every layer once per forward pass. In a Loop Transformer, a contiguous block of weight-shared layers executes for multiple iterations, refining intermediate representations before passing them downstream (Z.ai Blog). While weight-shared depth dates back to the 2018 Universal Transformer and recent recurrent-depth papers, Z.ai notes that looped models trained from scratch still trail unshared models under equal pre-training compute budgets (Z.ai Blog). To bypass that penalty, Z.ai converted the already pre-trained 750B GLM-5 base via continued training, validating scaling correctness progressively across 1B, 4B, 30B, and 750B bases (Z.ai Blog; MarkTechPost). Note that the GLM-5 line uses an MoE design, and Z.ai has not disclosed the active parameter count per token for GLM-5.4 (DataCamp).

Running 28 layers twice at 750B scale introduces activation instability and quadratic KV-cache memory pressure. Z.ai addresses both with three architectural mechanisms (Z.ai Developer Docs):

  • Gated Progressive Updates: Directly overwriting hidden states across loop iterations causes activation norms to blow up, pushing downstream layers out of their expected distribution. GLM-5.4 adds independent per-token gates for each pass to proportionally write candidate updates back into the residual stream. After training, these gates develop a division of labor: Pass 1 writes conservatively with small gate values to build global context and keep scales stable, while Pass 2 opens the gates for full refinement. The gates also adjust step size dynamically based on token difficulty, writing more aggressively on Pass 1 for harder tokens so complex predictions benefit from iterative refinement (Z.ai Blog).
  • Hybrid KV Cache (Global Sharing + Independent Sliding Window): Storing a full KV cache per loop iteration would multiply attention memory at 1M context. Instead, Pass 2 reuses the sparse KV selected during Pass 1 and retains its own newly generated KV only within a local sliding window. Because the two KV streams can overlap at the same positions, the model attends to both first-pass global context representations and second-pass local refinements at the memory cost of a single sliding window (Z.ai Blog; DataCamp).
  • Sparse Attention Index Reuse: Because the GLM-5 base uses sparse attention, Pass 2 directly reuses the attention indices generated by Pass 1's indexer, adding zero indexing overhead with near-identical empirical performance to recomputing indices on every pass (Z.ai Developer Docs).
flowchart LR
    A[Input Tokens / 1M Context] --> B[Lower Layers]
    B --> C[28 Shared Layers: Pass 1]
    C -->|Conservative Per-Token Gate + Sparse KV & Indices| D[Residual Stream]
    D -->|Reuses Sparse KV + Indices| E[28 Shared Layers: Pass 2]
    E -->|Full Gate Update + Local Sliding-Window KV| D
    D --> F[Upper Layers & 128K Output Head]

For developers integrating GLM-5.4 via the GLM Coding Plan in agent harnesses such as OpenCode, the model is configured under the zai-coding-plan provider (DataCamp):

{
  "$schema": "https://opencode.ai/config.json",
  "model": "zai-coding-plan/glm-5.4"
}

Benchmarks, Cost & Latency Analysis

Controlled 30B Iso-Parameter Ablations (Vendor-Reported)

Because Z.ai has not released flagship 750B evaluation tables—apart from a win-rate chart lacking methodology (VentureBeat)—its primary controlled evidence is a 30B iso-parameter comparison sharing the 750B base's architecture, evaluated after 200K long-context supervised fine-tuning (SFT) with thinking mode enabled and roughly 10% additional training compute (Z.ai Blog; MarkTechPost).

Benchmark (30B Ablation) Non-Looped Baseline + Loop (2 Passes) Score Gain Avg. Output Length Change Source
AIME25 19.17 30.42 +11.3 -635 tokens (-2.0%) MarkTechPost
GPQA-Diamond 47.58 56.26 +8.7 -2,473 tokens (-11.7%) MarkTechPost
AA-LCR 40.33 47.67 +7.3 -539 tokens (-9.7%) MarkTechPost
MMLU-Pro 71.65 75.05 +3.4 -863 tokens (-14.9%) MarkTechPost
IFBench 50.20 53.47 +3.3 -763 tokens (-13.0%) MarkTechPost

Two patterns stand out in the 30B study: multi-step math (AIME25 +11.3) and graduate science (GPQA-Diamond +8.7) benefit far more than general instruction following (IFBench +3.3), and explicit output token lengths fall by 10–14% across most tasks because part of the reasoning shifts from explicit chain-of-thought tokens into the loop's implicit depth (Z.ai Blog).

Third-Party Agentic Testing vs. Frontier Rivals

Independent early testing reveals a starkly different operational profile at 750B scale. On AICodeKing's KingBench 4 coding suite, GLM-5.4 ranked 7th overall and 1st among open-brand models (ahead of Qwen4 Max, DeepSeek-V4.1-Flash, Kimi K3.1 Pro, and Mistral Large 4), yet consumed dramatically more time and tokens than Google's Gemini 4 Neon (DataCamp; VentureBeat):

Metric (KingBench 4 Suite) GLM-5.4 Gemini 4 Neon Operational Implication Source
Overall / Open Rank 7th overall, 1st open Not disclosed Strong accuracy, trails top closed frontier DataCamp
Total Wall-Clock Runtime 431 minutes 109 minutes ~4.0x slower task completion VentureBeat
Reasoning Steps 1,128 steps 244 steps ~4.6x more agentic iterations VentureBeat
Total Tokens Consumed ~1.04 million ~70,000 ~15x token overhead at max effort DataCamp
Tool-Call Failure Rate 1.56% (11th of 17) Not disclosed Mid-pack initial tool-call reliability DataCamp
Failed Calls Recovered 66% on retry Not disclosed Persistent self-correction beats Claude/Codex DataCamp

That ~15x token gap against Gemini 4 Neon becomes a critical cost and latency factor if per-token API pricing resembles earlier GLM tiers. Note also that community reviewers on X questioned which reasoning effort level and harness configuration produced the KingBench 4 run, leaving cross-harness reproducibility unsettled (DataCamp).

Open-Frontier Specification Comparison

Feature GLM-5.4 (Z.ai) GLM-5.3 (Z.ai) Kimi K3.1 Pro DeepSeek-V4.1-Flash Source
Architecture Loop Transformer (28 layers x 2) Standard MoE base MoE MoE + Engram memory MarkTechPost
Total Parameters ~750B scale (active undisclosed) Undisclosed 2.8T 552B + 196B Engram MarkTechPost
Context / Output 1M context / 128K output 1M context / 128K output 1,048,576 context Up to 1M context Z.ai Developer Docs; MarkTechPost
Input Modalities Text, image, video, file Text only Text, image Text, image Z.ai Developer Docs; MarkTechPost
Weights & License Planned after safety hardening Undisclosed on docs Kimi K3.1 Pro License (HF) MIT License (HF) MarkTechPost
Availability Coding Plan, ZCode, Chat; API soon API, Coding Plan Kimi API & apps HF weights, DeepSeek API MarkTechPost

Production Deployment, Effort Modes & Trade-Offs

Serving Throughput vs. "Marathon Thinking" Latency

Z.ai co-designed GLM-5.4 with fused GPU kernels to cut intermediate memory reads and writes amplified by looping, achieving up to 200 tokens/s off-peak and 70–80 tokens/s at peak load (Z.ai Blog). That means raw token emission speed is not the bottleneck. Instead, GLM-5.4's latency stems from "marathon thinking": the model enters prolonged internal reflection and self-correction loops, with some reviewers on Reddit's r/LocalLLaMA noting it can spend large portions of its chain of thought debating edge cases or policy checks (VentureBeat; DataCamp).

Crucially, Z.ai's Coding Plan maps client effort parameters onto three internal tiers, and omitting an effort parameter defaults to max (DataCamp):

  • Low (low, light, minimal, none, or thinking disabled): Best for rapid edits and simple queries where marathon loops add pure latency.
  • High (medium, high): The recommended default for security reviews, bug hunting, and multi-file architecture work; mid-level settings completed security evaluations where top settings timed out mid-reasoning (DataCamp).
  • Max (xhigh, max, ultra, or unset): High risk of hitting default agent timeouts; use only with extended timeout budgets.

Generalized Coding vs. Practical Engineering Fit

Z.ai pitches GLM-5.4 around Generalized Coding—applying code and vision to non-software domains—showcasing four vendor demos: a self-narrated music video ("Hello World"), a 6-axis robotic arm scripted in FreeCAD, a complete game with physics and assets, and an interactive 3D bird-watching scene using custom GLSL shaders (Z.ai Blog). However, these remain curated vendor demos without accompanying vision benchmarks (VentureBeat).

In independent practitioner reports, GLM-5.4's strongest real-world niche is pre-release code review and offensive security testing: tester Migel Tissera reported a successful multistep remote code execution chain against a private black-box lab, and another reviewer uses it in a pre-release "council of reviewers" where it caught bugs missed by Claude Fable 5.2 (VentureBeat; DataCamp). Conversely, testers do not recommend it as a primary front-end, 3D, or general-purpose chat model, and some note it still trails Opus 5.5 on general coding (VentureBeat; DataCamp).

Pricing, Quotas, and Self-Hosting Status

GLM-5.4 is currently live on Z.ai Chat, ZCode (macOS, Windows, and Linux Beta), and the GLM Coding Plan, which lists Lite at $12.60/month, Pro at $56/month, and Max at $117.60/month, with weekly quotas 1.5× higher than GLM-5.3 (MarkTechPost; Z.ai Developer Docs). Z.ai's Coding Plan documentation recommends capping client context windows at 512,000 tokens for coding stability even though the model supports 1M tokens (glm-5.4[1m] in Claude Code) (DataCamp). General API access (for comparison, GLM-5.3 is priced at $1.40/M input, $0.26/M cached input, and $4.40/M output) and open-weight downloads remain pending safety assessment and hardening, with no release dates announced (VentureBeat). As of November 23, 2026, GLM-5.4 was also absent from OpenRouter and unconfirmed on major cloud model catalogs (DataCamp).

Frequently Asked Questions

What is a Loop Transformer in GLM-5.4?

A Loop Transformer executes a shared block of layers multiple times per forward pass rather than stacking unique layers. GLM-5.4 adapts the 750B-scale GLM-5 base by running 28 middle layers twice, using per-token gates to stabilize hidden-state updates (Z.ai Blog).

How does GLM-5.4 avoid doubling KV-cache memory at 1M context?

Pass 2 reuses the sparse KV cache and attention indices selected during Pass 1, allocating new KV storage only within a local sliding window. This limits the extra memory footprint over GLM-5.3 to a single sliding window rather than a full 1M-token cache (Z.ai Blog).

Has Z.ai published official 750B benchmarks for GLM-5.4?

No. As of November 23, 2026, Z.ai had not published a model card or flagship 750B benchmark table. Its controlled evidence comes from a 30B iso-parameter ablation (showing +11.3 on AIME25 and +8.7 on GPQA-Diamond), supplemented by third-party runs like KingBench 4 (MarkTechPost; DataCamp).

Why does GLM-5.4 take so long on agentic coding tasks?

Although it streams at up to 200 tokens/s off-peak, GLM-5.4 frequently enters "marathon thinking" loops, generating far more reasoning steps (~1.04M tokens and 431 minutes on KingBench 4 vs. ~70,000 tokens and 109 minutes for Gemini 4 Neon). Leaving the effort parameter unset defaults to max, which can trigger timeouts (DataCamp).

Are GLM-5.4 open weights and public API pricing available?

Not yet. GLM-5.4 is currently hosted only through Z.ai's GLM Coding Plan, ZCode, and Z.ai Chat. Z.ai states that public API access and open weights will follow after security assessments and safety hardening, without a firm release date (VentureBeat).

Sources

More on AI

AI

OpenClaw ShellBench: 53,100 Agent Runs Expose a 62.5% Ceiling, Harness Spreads, and Safety Gaps

The OpenClaw Foundation launched ShellBench on November 24, 2026, testing 12 frontier models across five agent harnesses over 53,100 graded runs in messy, 188-file workspaces. Even the highest-scoring model, GPT-6 Astra at 62.5%, failed roughly four in ten everyday assignments when every rubric and safety requirement had to pass. Here is what the benchmark reveals about model-vs-harness impact, omission failures, and per-run token economics.

8 min read

AI

Google DeepMind Humanity's First Exam (HFE): 544-Prompt Consistency Benchmarks, Visual Failure Modes, and Production Trade-Offs

Google DeepMind launched Humanity's First Exam (HFE) on November 24, 2026, exposing a wide gap between what frontier models can solve once and what they solve reliably every time. Across 544 elementary prompts grouped into 136 four-variant families, top models hit 100% family pass@4 yet drop to 85.8%–92.4% on strict family pass^4. Here is what the technical report and Kaggle leaderboard reveal about visual perception failures, test-time compute limits, and production model selection.

10 min read

AI

China Telecom Xing4.1-Preview: 285B Apache 2.0 MoE Trained on 8,192 Ascend 910C Chips, Benchmarks, and Trade-Offs

China Telecom's Xingchen AGI Lab released Apache 2.0 open weights for Xing4.1-Preview on November 23, 2026—a 285B-total, ~17B-active MoE with a 1M-token context trained end-to-end on 8,192 Huawei Ascend 910C chips and MindSpore HyperParallel. Converted to PyTorch safetensors for vLLM and SGLang, it trails Hy4-flash and GLM-5.3-Flash on most agent benchmarks while offering an un-gated Apache 2.0 non-CUDA frontier training milestone.

7 min read

Tell us what is not working

A thirty-minute call, no deck and no obligation. You will leave with a straight answer about whether this is worth building - including if that answer is no.

Start a project

Direct line

hello@codebumble.net
Dhaka, Bangladesh  :   local timeCalls in English or Bangla