---
title: "GLM-5.4 Explained: Z.ai's Loop Transformer, Vision Coding Plan, and the Missing Benchmarks"
description: "Technical breakdown of Z.ai's GLM-5.4: how its 28-layer 2x Loop Transformer works, what changes in the GLM Coding Plan (1M context, native vision, +50% quota), why latency spikes on max effort, and why benchmarks and open weights are still missing."
author: Aleksei Aleinikov
date: 2026-11-24
lang: en
tags: [glm 5.4, glm-5.4, glm 5.4 loop transformer, z.ai coding plan, glm 5.4 claude code, glm 5.4 benchmarks, glm 5.4 vision, glm 5.4 pricing, glm 5.4 api, glm 5.4 open weights]
canonical: https://www.alekseialeinikov.com/en/blog/topics/ai/glm-5-4-explained-loop-transformer-coding-plan
source: alekseialeinikov.com
---

# GLM-5.4 Explained: Z.ai's Loop Transformer, Vision Coding Plan, and the Missing Benchmarks

Z.ai (formerly Zhipu AI) dropped **GLM-5.4** on November 23, 2026, in an unusual way: straight into the **GLM Coding Plan** model selector before publishing a formal model card, Hugging Face weights, or a frontier benchmark table.

Yet the architectural bet behind it is one of the most interesting shifts in flagship coding models right now: **GLM-5.4** is Z.ai's first flagship built as a **Loop Transformer** — trading raw inference speed for deeper multi-step reasoning, native vision, and a 50% quota boost inside coding agents.

![GLM-5.4 Loop Transformer 3D editorial cover showing a luminous dual-pass crystal ring and 1M context coding plan highlights.](https://www.alekseialeinikov.com/blog/glm-5-4-explained-cover.webp)

> [!NOTE]
> **Independent Technical Analysis:** Based on Z.ai's November 23, 2026 release notes and architectural disclosures ([Z.ai](https://z.ai/)), early technical breakdowns ([DataCamp](https://www.datacamp.com/), [MarkTechPost](https://www.marktechpost.com/)), and developer evaluations in Claude Code and Coding Plan harnesses; no private benchmark suite was run.

> [!KEY]
> **The short verdict:** Use **GLM-5.4** inside the **GLM Coding Plan** when you need deep debugging, screenshot-to-UI iteration (native vision), or complex script/CAD generation and can tolerate slower responses. Stay on **GLM-5.3** (or faster models) if you need pay-as-you-go API billing, self-hosted open weights, or snappy low-latency edits.

## What Is GLM-5.4's Loop Transformer Architecture?

For the past several generations, frontier labs bought reasoning depth by stacking more unique layers and scaling total parameter counts toward multi-trillion weights. That makes models expensive to store in GPU memory and slow to deploy.

**GLM-5.4** takes a different route — the same recurrent paradigm we analyzed in [Inkling 2 Mini and Looped Transformers](https://www.alekseialeinikov.com/en/blog/topics/ai/inkling-2-mini-looped-transformers-local-ai-guide), scaled up to Z.ai's flagship tier:

![Diagram comparing a standard dense transformer against GLM-5.4's 28-layer 2x Loop Transformer with gated progressive updates and hybrid KV caching.](https://www.alekseialeinikov.com/blog/glm-5-4-loop-architecture.webp "GLM-5.4 reuses 28 layers twice per forward pass using per-token gating and hybrid KV caching, simulating deeper reasoning without doubling stored weights.")

- **28 layers looped twice:** Built on the ~750B-scale GLM-5 base architecture, GLM-5.4 routes a 28-layer block through **two iterations** per forward pass using shared weights.
- **Gated progressive updates:** Simply feeding hidden states back into the same weights can cause activation values to explode or drift. Z.ai adds per-token gates that regulate how much of each second-pass update is written back into the residual stream.
- **Memory & KV optimizations:** Hybrid KV caching and reused sparse attention indices keep the **1M-token context window** (`glm-5.4[1m]`) and **128K output limit** practical without blowing up KV-cache memory linearly with loop depth.

The critical engineering distinction: **looping saves weight memory, not compute FLOPs.** Every token still pays the arithmetic cost of running those 28 layers twice. You get reasoning depth closer to much larger 2T–3T parameter models, at the cost of higher per-token latency.

In Z.ai's controlled iso-parameter **30B ablation study** (with thinking mode enabled and roughly **10% extra training compute**), adding the loop mechanism after long-context fine-tuning pushed **AIME25 from `19.17` to `30.42` (+11.3 points)** — showing that depth via recurrence pays off disproportionately on multi-step mathematical and algorithmic reasoning.

## What Actually Changes in the GLM Coding Plan

On launch day, Z.ai positioned GLM-5.4 around **"Generalized Coding"** — software engineering plus visual, game, video-script, and mechanical 3D/CAD generation (such as FreeCAD Python scripting for multi-axis robotic mechanisms and generative SVG layouts). Three practical changes matter immediately if you use coding harnesses like **Claude Code**, **Codex**, **OpenCode**, or **Cline**:

1. **Native vision arrives on the flagship tier:** Text-only [GLM-5.3](https://www.alekseialeinikov.com/en/blog/topics/ai/muse-spark-open-vs-glm-5-3-vs-kimi-k3) could not inspect UI screenshots, rendered layouts, or architecture diagrams directly. GLM-5.4 accepts image inputs natively inside the coding loop — closing the feedback cycle between code generation and visual inspection.
2. **+50% weekly token quota (1.5× multiplier):** Subscribers on Coding Plan weekly tiers (Lite, Pro, Max) receive 50% more available quota for GLM-5.4 relative to GLM-5.3.
3. **1M context window on demand (`glm-5.4[1m]`):** Long repositories and multi-file refactors can target `glm-5.4[1m]` directly without switching models mid-session, while keeping standard `glm-5.4` for tighter everyday loops.

### Effort Playbook in Claude Code: Avoiding "Marathon Thinking" Timeouts

Early developer tests highlight a sharp operational trade-off. Because the Loop Transformer performs two full passes and pairs them with deep reasoning chains, GLM-5.4 frequently enters **"marathon thinking loops"** on non-trivial tasks — running noticeably slower than fast non-looped coding models like [Gemini 4 Neon](https://www.alekseialeinikov.com/en/blog/topics/ai/gemini-4-neon-vs-claude-opus-5-5-hydrogen-carbon).

- **Use `high` / `max` effort for:** Root-cause debugging across multiple services, race conditions, legacy query refactoring, FreeCAD/SVG geometry scripts, and screenshot-driven UI audits.
- **Lower effort (or switch to a fast model) for:** Renaming symbols, writing unit-test boilerplate, small CSS tweaks, and quick PR copy edits. In [Claude Code](https://www.alekseialeinikov.com/en/blog/topics/ai/claude-code-modes-compared-why-plan-mode-died), leaving default max effort enabled on trivial prompts burns latency and risks client timeouts without improving output quality.

Two concrete workflows show the difference in practice:

- **Vision feedback loop (UI or CAD):** Drop a screenshot of a clipped mobile layout or a misaligned FreeCAD bracket directly into `glm-5.4` on high effort. Because vision is native, the model inspects the rendered defect itself and patches the exact CSS rule or geometry constraint without you translating coordinates into prose.
- **1M context vs. fast inner loop:** Switch to `glm-5.4[1m]` when you need to ingest a whole multi-service log dump or cross-repo migration plan in one prompt; drop back to standard `glm-5.4` with reduced effort as soon as you move to file-by-file test fixes.

## The Missing Benchmarks, API, and Open Weights

Unlike prior Z.ai launches, **GLM-5.4 shipped without three things engineers usually check first**:

1. **No official frontier benchmark table at launch:** As both DataCamp and [VentureBeat](https://venturebeat.com/) noted, Z.ai did not publish a model card or standard SWE-bench Verified / LiveCodeBench scorecards on day one — relying instead on win-rate charts without full methodology and internal **30B prototype ablations** (+3.3 to +11.3 points, including `19.17` to `30.42` on AIME25). Independent trackers like Artificial Analysis have not scored it yet because public APIs and weights are absent; in early community runs such as **KingBench 4**, GLM-5.4 placed around **7th** at max effort while emitting heavy "marathon thinking" token chains.
2. **No pay-as-you-go API yet:** If you integrate models via metered API endpoints, **GLM-5.3** ($1.40/M input, $4.40/M output) and **GLM-5.3-Flash** remain the active public pay-as-you-go options while GLM-5.4 undergoes safety hardening.
3. **No Hugging Face weights for self-hosting yet:** Previous GLM-5 releases made open weights a headline feature for teams running [local security and coding deployments](https://www.alekseialeinikov.com/en/blog/topics/security/local-llm-cybersecurity). For GLM-5.4, Z.ai held weights back pending security and safety evaluations, with no firm public release date announced at launch.

## When to Use GLM-5.4 vs. GLM-5.3 or Fast Models

Treat GLM-5.4 as a **high-depth specialist** inside Coding Plan subscriptions rather than a universal drop-in replacement for every prompt:

![Decision matrix comparing GLM-5.4 Coding Plan, GLM-5.3 API/Open Weights, and fast non-looped models across latency, vision, open weights, and best use cases.](https://www.alekseialeinikov.com/blog/glm-5-4-decision-matrix.webp "Choose GLM-5.4 for Coding Plan + vision debugging; stick with GLM-5.3 for metered APIs or open weights, and fast models for rapid edits.")

| Criterion | GLM-5.4 | GLM-5.3 | Fast Non-Looped Models |
|---|---|---|---|
| **Architecture** | 28-layer 2× Loop Transformer | Standard non-looped MoE | Standard / lightweight |
| **Access at launch** | GLM Coding Plan only | Public API + Open Weights | Public API / Local |
| **Quota / Pricing** | 1.5× (+50%) Coding Plan quota | $1.40 / $4.40 per 1M tokens | Low cost per token |
| **Vision support** | Native (screenshots, UI, CAD) | Text-only (Flash has vision) | Varies |
| **Context & output** | 1M context · 128K output | Standard flagship context | Fast TTFT |
| **Best suited for** | Hard debugging, UI vision, CAD/3D | Metered APIs, self-hosting | Boilerplate, prose, quick edits |

Community feedback also notes that GLM-5.4 feels heavily **"code-maxxed"**: its logic and code structure are unusually thorough, while general creative writing and casual prose can come across as rigid compared to general-purpose chat models.

## Bottom Line

**GLM-5.4** is a bold architectural milestone for Z.ai — proving that **Loop Transformers** can push flagship coding depth and earn a **+50% Coding Plan quota** bump without training a 3T-parameter monster. Just go in with eyes open: until Z.ai ships public benchmarks, metered APIs, and open weights, its sweet spot is strictly **deep, vision-enabled coding inside Coding Plan subscriptions** — with effort tuned down whenever speed matters more than marathon reasoning.
