Z.ai icon

Z.ai GLM-5.4

Current Version

Compare GLM-5.4 with GLM-5.3 and 5.3-Flash. Check Loop Transformer gains, 1.5x Coding Plan quota, Claude Code setup, and API wait status.

Content updated ·GLM-5.4 released yesterday

Categories:
Visit Site
Official Z.ai GLM-5.4 Loop Transformer architecture diagram showing Prelude, two-pass shared L27-54 loop with damp gates, hybrid KV cache, and Coda.

Official Z.ai GLM-5.4 Loop Transformer architecture diagram showing Prelude, two-pass shared L27-54 loop with damp gates, hybrid KV cache, and Coda.

View full-size image

Overview

GLM-5.4 is Z.ai's November 23, 2026 flagship model and its first production release built on a Loop Transformer architecture. Instead of expanding raw parameter count beyond the 750B GLM-5 base, GLM-5.4 runs a shared 28-layer block for two iterations per forward pass and brings native image, video, and file input to Z.ai's flagship coding tier.

At launch, GLM-5.4 is live across all GLM Coding Plan tiers (Individual Lite, Pro, Max, and Team seats), ZCode, and Z.ai Chat, delivering 1.5× the usable Coding Plan quota of GLM-5.3. Standalone pay-as-you-go Model API access and open-weight checkpoints are not live on day one; both remain gated behind Z.ai's safety assessment and hardening.

What Changed

Loop Transformer Architecture at 750B Scale

Rather than pre-training a looped network from scratch, Z.ai adapted its existing 750B GLM-5 base through continued training so layers L27–54 (28 layers) execute across two iterative passes between a 26-layer Prelude (L1–26) and 24-layer Coda (L55–78). To keep training stable and serving affordable at 1M context, Z.ai introduced three changes:

  • Gated Progressive Updates: Per-token damp gates (β₁, β₂) regulate how much each pass writes into the residual stream. Pass 1 writes conservatively to build global context and avoid activation blow-up; Pass 2 opens the gate for full refinement, scaling dynamically on harder tokens.
  • Hybrid KV Cache (Global Sharing + 128-Token Sliding Window): Pass 2 reuses Pass 1's sparse KV prefix (k = 2048) while keeping its own local 128-token sliding-window KV bank (Two-Bank Sparse MLA), avoiding a full second context cache.
  • Sparse Attention Index Reuse: Pass 2 directly reuses the attention indices selected by Pass 1's indexer, adding zero indexing overhead.

Combined with fused inference kernels, Z.ai reports throughput up to 200 tokens/s during off-peak hours and 70–80 tokens/s at peak load, with reasoning depth Z.ai compares to 2T–3T parameter models.

Native Multimodal Input for Generalized Coding

GLM-5.4 combines text embeddings with projected 24-layer ViT features, supporting video, image, text, and file inputs alongside a 1M-token context window and 128K maximum output tokens. Z.ai positions the release as the start of Generalized Coding—extending code-driven workflows beyond standard software engineering.

In its launch post, Z.ai showcases four official demonstrations: writing code to produce and edit a music video, generating a 6-axis robotic arm in FreeCAD, creating a complete game with physics and assets, and rendering an interactive 3D scene using custom GLSL shaders. Treat these as vendor demonstrations rather than independently verified benchmarks.

1.5× Coding Plan Quota via Lower Credit Multipliers

Inside the GLM Coding Plan, GLM-5.4 lowers every credit multiplier by roughly one-third compared with GLM-5.3 (4.6 input / 1.1 cached input / 16 output vs 6.9 / 1.7 / 24). Because subscription credit pools remain unchanged, subscribers immediately get 1.5× the usable weekly token volume when moving from GLM-5.3 to GLM-5.4 across supported tools including Claude Code, ZCode, Cline, Codex, OpenCode, and OpenClaw.

Preserved Thinking Default and Effort Mapping

Starting with GLM-5.4, Z.ai enables Preserved Thinking (thinking.clear_thinking: false) by default on all endpoints, whereas earlier models enabled it by default only on the Coding Plan endpoint and disabled it on the standard API. In supported Coding Plan clients such as Claude Code, explicit reasoning effort defaults to max, and legacy thinking.type values (disabled, false, none, off) are automatically mapped to lightweight low effort rather than rejecting the request.

Compared With Previous Version

GLM-5.4 replaces GLM-5.3-Flash as Z.ai's newest release and supersedes GLM-5.3 as the flagship coding model, but the three models still serve distinct roles in Z.ai's active lineup:

Dimension GLM-5.4 GLM-5.3 GLM-5.3-Flash
Release date 2026-11-23 2026-08-14 2026-08-26
Architecture 750B base + 2-pass Loop (28 layers) Post-trained 1M-context flagship 320B total / 18B active hybrid
Input modalities Video, Image, Text, File Text Video, Image, Text, File
Context / Max output 1M / 128K 1M / 128K 1M / 128K
Coding Plan multipliers (In / Cached / Out) 4.6 / 1.1 / 16 6.9 / 1.7 / 24 2.3 / 0.56 / 8
Relative Coding Plan quota 1.5× GLM-5.3 1× baseline 3× GLM-5.3 (2× GLM-5.4)
Standalone Model API (per 1M tokens) Pending safety assessment $1.40 in / $4.40 out $0.15 in / $0.50 out
Open weights Planned after safety hardening Available (custom license on Hugging Face) Available (MIT license)

Practical routing takeaway: Inside the GLM Coding Plan, GLM-5.4 strictly beats GLM-5.3 on both modality support and credit efficiency. However, GLM-5.3-Flash still stretches Coding Plan quota twice as far as GLM-5.4 and remains the only model in this trio with MIT-licensed open weights and low-cost pay-as-you-go API pricing, while GLM-5.3 already offers downloadable weights (under a custom license) and a published standalone API.

Performance Benchmarks and Evaluation Limits

Z.ai did not publish standardized flagship coding benchmarks (such as SWE-bench or Terminal-Bench 3.0) for the 750B GLM-5.4 checkpoint at launch. Instead, official documentation provides two vendor-reported evaluations:

1. Controlled 30B Iso-Parameter Loop Ablation

To isolate the architectural effect of looping under identical parameter counts (~10% more total training compute, evaluated on a 30B model sharing the 750B architecture after 200K long-context SFT with thinking enabled), Z.ai reported:

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

These results validate the Loop mechanism—showing accuracy gains alongside 10–14.9% shorter reasoning chains on several benchmarks—but they measure a 30B ablation model, not the production 750B GLM-5.4 checkpoint.

2. Vendor-Reported Pairwise Win Rates

Z.ai's GLM-5.4 documentation also publishes a pairwise win-rate chart:

  • GLM-5.4 vs GLM-5.3: 51.1% Win · 25.7% Tie · 23.1% Lose
  • GLM-5.4 vs Kimi K3.1 Pro: 41.8% Win · 26.9% Tie · 31.3% Lose
  • GLM-5.4 vs DeepSeek-V4.1-Flash-1017: 36.6% Win · 30.2% Tie · 33.2% Lose

Z.ai does not disclose the prompt distribution, sample size, or judge protocol on the chart, so teams should run their own repository acceptance tests before switching critical workflows.

Migration Guide

Existing GLM Coding Plan subscribers do not need to purchase a new tier to use GLM-5.4. Verify your tool uses the required dedicated endpoint:

  • Claude Code / Goose (Anthropic-compatible): https://api.z.ai/api/anthropic
  • Codex: https://api.z.ai/api/v1
  • Cline and other OpenAI-compatible tools: https://api.z.ai/api/coding/paas/v4

Switching in Claude Code

Add or update the model keys in ~/.claude/settings.json (on Windows: %USERPROFILE%\.claude\settings.json) without deleting your existing configuration. Append [1m] to enable the full 1M context window:

{
  "env": {
    "CLAUDE_CODE_AUTO_COMPACT_WINDOW": "1000000",
    "ANTHROPIC_DEFAULT_HAIKU_MODEL": "glm-5.4[1m]",
    "ANTHROPIC_DEFAULT_SONNET_MODEL": "glm-5.4[1m]",
    "ANTHROPIC_DEFAULT_OPUS_MODEL": "glm-5.4[1m]"
  }
}

Run claude, verify /status reports glm-5.4[1m], and use /effort to switch between low, high, and max (default). If Claude Code rejects the [1m] suffix, update Claude Code to its latest release.

Switching in Cline and Custom Multi-Turn Clients

  1. Select OpenAI Compatible, set Base URL to https://api.z.ai/api/coding/paas/v4, and set the custom model ID to glm-5.4.
  2. Enable Support Images (GLM-5.4 is natively multimodal) and set Context Window Size to 1000000.
  3. Because Preserved Thinking (thinking.clear_thinking: false) is enabled by default on all endpoints starting with GLM-5.4, custom agent harnesses must pass back complete, unmodified reasoning_content blocks in their exact original sequence; editing or reordering them degrades both reasoning quality and prompt-cache hit rates.

Availability, Coding Plan & Pricing

GLM-5.4 is available immediately on Z.ai Chat, ZCode, and all GLM Coding Plan subscriptions (checked November 24, 2026; USD list pricing):

Plan Monthly Discounted Billing 5-Hour / Weekly Credits Est. GLM-5.4 Weekly Tokens (95%–98% cache)
Individual Lite $18 $14.40/mo quarterly · $12.60/mo yearly 2,000 / 10,000 72M–156M
Individual Pro $80 $64/mo quarterly · $56/mo yearly 12,000 / 60,000 440M–941M
Individual Max $168 $134.40/mo quarterly · $117.60/mo yearly 28,000 / 140,000 1,014M–2,195M
Team Standard (min 2 seats) $88/seat $79.20/seat/mo yearly 15,000 / 66,000 479M–1,034M
Team Premium (min 2 seats) $188/seat $169.20/seat/mo yearly 35,000 / 155,000 1,124M–2,429M
  • Peak vs. Off-Peak Billing: Weekday calls from 14:00–18:00 UTC+8 (Mon–Fri) consume 1× standard credits; all calls outside peak hours consume 50% (0.5×) credits, which creates the upper end of the weekly token ranges above.
  • Credit Formula: (Input × 4.6 + Cached Input × 1.1 + Output × 16) / 10,000. Included MCP tools (Web Search, Web Reader, Zread) consume 1.2 credits per call; Vision Understanding MCP is billed under GLM-5.3-Flash rates.
  • Standalone API Status: Pay-as-you-go GLM-5.4 API access and per-token list prices are not yet published on docs.z.ai/guides/overview/pricing; Z.ai states the Model API will open after security assessment.

Known Limitations

  • Marathon Thinking Loops: Z.ai explicitly warns that GLM-5.4 can get caught in overly long "marathon thinking" loops of reflection and self-correction—raising latency and credit burn even when accuracy improves.
  • No Launch-Day Standalone API or Open Weights: Developers building custom production API backends or self-hosted deployments cannot adopt GLM-5.4 yet and must remain on GLM-5.3, GLM-5.3-Flash, or wait for Z.ai's safety review to clear.
  • Strict Coding Plan Tool Boundary: Coding Plan quotas only work inside officially supported tools through dedicated endpoints. On individual plans, hitting the 5-hour or weekly cap blocks further calls until reset without falling back to cash API balance (Team plans support optional on-demand overage).
  • Incomplete Public Flagship Benchmarks: Launch materials publish 30B loop ablations and an unrubricated pairwise win-rate chart rather than full 750B SWE-bench or third-party benchmark tables.

Who Should Upgrade and Who Should Wait

  • Upgrade to GLM-5.4 now if you already subscribe to a GLM Coding Plan and run complex repository refactors, multimodal UI/visual debugging, or multi-step CAD/3D/game coding workflows—you gain native vision and 1.5× more weekly quota than GLM-5.3 at no extra subscription cost.
  • Keep pairing with GLM-5.3-Flash for high-volume everyday iteration, quick edits, or budget-sensitive Lite accounts where 2× GLM-5.4's quota (3× GLM-5.3) and lower latency matter more than maximum reasoning depth.
  • Wait before migrating if you need direct pay-as-you-go Model API routing, predictable SLA latency unaffected by marathon-thinking spikes, or downloadable MIT open weights for private self-hosting.

FAQ

Should GLM Coding Plan users switch from GLM-5.3 to GLM-5.4?

For most Coding Plan workloads, yes. GLM-5.4 uses lower credit multipliers than GLM-5.3 (4.6 / 1.1 / 16 vs 6.9 / 1.7 / 24), yielding 1.5× the usable weekly token quota while adding native image, video, and file input. Watch for longer thinking times on hard prompts and route routine edits to GLM-5.3-Flash when preserving quota.

Is the standalone GLM-5.4 API or open-weight checkpoint available?

Not at launch. Z.ai's documentation states that the standalone Model API will open after security assessment and that model weights will be open-sourced responsibly after safety hardening. No exact release date or per-token API price has been published yet.

How do I enable the 1M context window for GLM-5.4 in Claude Code?

Set your model environment variables in ~/.claude/settings.json to glm-5.4[1m] and add "CLAUDE_CODE_AUTO_COMPACT_WINDOW": "1000000", pointing to https://api.z.ai/api/anthropic. If Claude Code reports the [1m] model is unrecognized, update Claude Code to the latest version.

Why does GLM-5.4 sometimes pause in long reasoning loops?

Z.ai notes that GLM-5.4's Loop Transformer and deep thinking mode can trigger extended "marathon thinking" self-correction cycles on difficult tasks. If latency or token burn becomes excessive on simpler prompts, lower reasoning effort with /effort (in Claude Code) or switch that step to GLM-5.3-Flash.

Sources

Last verified: 2026-11-24. Based on official Z.ai release documentation and live pricing pages; no independent hands-on benchmark testing was performed.

Release navigation

View full version history

More tools to compare

ChatGPT icon

ChatGPT

Claude icon

Claude

Gemini icon

Gemini

Grok icon

Grok

DeepSeek icon

DeepSeek

Qwen icon

Qwen

Top alternatives

Compare side-by-side →

Related categories

From the blog

View all →

Track Z.ai in ToolWorthy Weekly

Important tool updates, better alternatives, and selected AI signals in one weekly brief.

Weekly only. Unsubscribe anytime.