Skip to main content
Back

Z.ai's GLM-5.4 Loops the Same Weights Twice to Beat Deeper Models

Z.ai's new flagship loops its transformer layers to deepen reasoning without adding parameters, adds vision, and expands coding to shaders, CAD, and games.

  • Z.ai released GLM-5.4, its first flagship built on a Loop Transformer architecture
  • Loops reuse layer blocks multiple times per token, adding reasoning depth without extra parameters
  • Native vision input added, plus coding support for video, games, 3D shaders, and CAD
  • Live for GLM Coding Plan users with 1M context and 50% more weekly quota than GLM-5.3
  • Reportedly around 700B parameters, though Z.ai has not officially confirmed the count
  • API opens after safety evaluation; weights to follow, GLM-5.5 at ~3T parameters expected in December

Z.ai has released GLM-5.4, its first flagship model built on a Loop Transformer. The architecture sends each token representation through a shared layer stack multiple times, increasing computational depth while keeping the learned parameter count fixed. The release also adds image input to the main coding model and targets visual programming work such as shaders, CAD, video pipelines, and games.

A launch report says all GLM Coding Plan subscribers can access the model through ZCode, Trae, WorkBuddy, and Qoder. Direct API access is scheduled to follow a safety evaluation. Z.ai also plans to release model weights, although it has provided no API launch date, pricing, repository, or license.

A Shared Stack Adds Depth

A conventional transformer processes each token representation through its layer sequence once. A Loop Transformer returns the hidden representation to a shared stack for additional passes before generating the next token. Two traversals of a 50-layer shared stack produce roughly 100 layer applications while retaining one set of learned weights. Each pass consumes additional floating-point operations, or FLOPs, and adds inference latency.

Z.ai’s architecture diagram labels a Prelude, two Loop Passes, and a Coda. Dynamic sparse attention, labeled DSA, selectively computes attention across the context. RMSNorm normalizes activations, while damp gates scale the residual update contributed by each recurrent pass. The schematic does not establish whether two passes are fixed in production, configurable at inference time, or simplified for presentation.

Diagram of the GLM-5.4 Loop Transformer architecture
GLM-5.4’s published architecture diagram shows shared loop stages between the Prelude and Coda.

Z.ai says it spent three months scaling the recurrence mechanism alongside the base model. Its internal comparison adds the loop to a baseline model and reports higher scores across AIME25, GPQA-Diamond, AA-LCR, MMLU-Pro, and IFBench. Those tests cover competition mathematics, graduate-level science, broad reasoning, and instruction following.

Internal benchmark comparison between the baseline model and the looped version
Z.ai’s internal chart compares the baseline with its loop-enabled variant across five benchmarks.

The chart also reports average output length, an important variable because longer responses consume more test-time compute and can affect benchmark results. The launch materials provide no confidence intervals, complete evaluation settings, or independent replication.

The Missing Numbers

Z.ai has published neither the total nor active parameter count for GLM-5.4. Claims of roughly 700 billion parameters have circulated through reviews and Chinese technology coverage, but the figure remains unverified. Separate reports citing a J.P. Morgan note project roughly 3 trillion parameters for a future GLM-5.5 and compare it with a reported 753 billion for GLM-5.3. Z.ai has confirmed neither estimate nor the reported roadmap.

Specification Published status
Context window 1 million tokens
Weekly Coding Plan quota 50% higher than the GLM-5.3 allocation
Total parameters Undisclosed
Active parameters per token Undisclosed
Production loop count Undisclosed
Mixture-of-Experts topology Unconfirmed by Z.ai

AIHubMix has indexed GLM-5.4 as a larger-scale Mixture-of-Experts model using hybrid attention and Loop Transformer components. Z.ai’s launch post does not confirm that description, leaving the model’s routing design and active parameter count unknown.

Vision Enters the Coding Loop

GLM-5.4 adds native image input to the main Coding Plan model, extending the text-only interface used by GLM-5.3. Developers can provide screenshots, interface mockups, diagrams, or rendered errors alongside a prompt. That enables screenshot-to-code workflows, mockup conversion, and visual debugging through one model endpoint. The announcement makes no claim that GLM-5.4 generates images directly.

Visual Code Needs Visual Checks

Z.ai groups shaders, parametric CAD scripts, video pipelines, and game logic under “generalized coding.” These workloads combine source generation with spatial constraints, rendering behavior, timing, or simulation state, which conventional code benchmarks rarely measure.

Generated artifacts still require domain-specific validation through compilers, renderers, game engines, or CAD systems. Z.ai has published demonstrations for these categories but no public evaluation set covering compilation rates, visual fidelity, geometric correctness, or runtime behavior. Its internal results therefore support a broad capability claim rather than a measured advantage in each domain.

Subscribers Get First Access

The staged rollout prioritizes Coding Plan subscribers while the direct API and weight release remain pending.

Surface Status Configuration
Claude Code Available through Coding Plan Set the model to glm-5.4[1m]
Other coding tools Available where supported Use glm-5.4
Z Code Available Add model ID GLM-5.4 manually if it is absent
Trae, WorkBuddy, and Qoder Launch integrations announced Select GLM-5.4 in the model menu
OpenCode Compatibility announced Route through a supported GLM Coding Plan connection
Z.ai Chat Available Select GLM-5.4 where the model picker exposes it
Direct API Pending safety evaluation No launch date or pay-as-you-go price
Model weights Planned No repository, release date, or license

Third-party aggregators have already created listings for the model. Those entries may rely on subscription routing or proxy access and do not establish the availability, pricing, or service terms of Z.ai’s direct API.

Evidence Stops at Internal Charts

The initial release includes architecture diagrams, demonstrations, and company-run benchmark comparisons. It provides no technical report, reproducible evaluation package, external comparison against Claude, GPT, or DeepSeek models, or serving data for latency and throughput.

Benchmarks Need Matched Budgets

  • Reasoning: Compare accuracy at matched output-token and inference-compute budgets.
  • Serving: Measure time to first token, generation speed, throughput, and memory use.
  • Long context: Test retrieval and reasoning across the full 1-million-token window.
  • Vision-to-code: Evaluate screenshot fidelity, responsive layouts, and visual debugging.
  • Artifact generation: Track compilation, rendering, geometric validity, and runtime behavior for shaders, CAD, and games.

Inference Compute Becomes a Scaling Lever

Looping transformer blocks has an established research history, although production deployments remain uncommon. A loop-scaling study reports that recurrent passes through a shallow middle stack can improve quality with a smaller FLOP increase than deeper alternatives. The same work finds diminishing gains as loop counts rise, making the choice of recurrent depth central to efficiency.

For model operators, recurrent depth creates a separate scaling control. Higher loop counts can increase computation per generated token while preserving weight memory, with lower throughput and higher latency as direct costs. An API could expose that setting to support per-request quality and latency targets, although Z.ai has announced no such control. Independent measurements of loop count, serving cost, and task quality will determine whether GLM-5.4 converts reused weights into a practical deployment advantage.