<link href="https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:ital,wght@0,300;0,400;0,500;0,600;0,700;1,300;1,400;1,500;1,600;1,700&family=DM+Mono:ital,wght@0,300;0,400;0,500;1,300;1,400;1,500&display=swap" rel="stylesheet"/>

GLM-5.4: The First Loop Transformer, Explained for Coders

By Mihir Pipermitwala · 11 min read

⚡ TL;DR

Z.ai shipped GLM-5.4 on Nov 23, 2026: a 750B model that runs 28 of its 78 layers twice. What a loop transformer is and who should try it now.

GLM-5.4: The First Loop Transformer, Explained for Coders

Z.ai shipped GLM-5.4 on November 23, 2026, and the launch thread on Hacker News collected 1,183 points the same day (Hacker News, November 2026). The headline claim is unusual: a 750B-parameter model that Z.ai calls the first loop transformer, because 28 of its 78 layers run twice per forward pass. The stated focus is “generalized coding”, and access starts with the GLM Coding Plan, not a public API. I went through the official post and its coverage to separate confirmed architecture from vendor framing, because “first loop transformer” deserves unpacking before you spend money on it.

TL;DR

  • GLM-5.4 runs 28 of its 78 layers twice per forward pass, adding roughly 36% effective depth with zero new parameters (AI Weekly, November 2026).
  • The published benchmark evidence is a 30B ablation, not the flagship: AIME25 improved from 19.17 to 30.42 with about 10% more training compute (Z.ai, November 2026).
  • Launch access is Z.ai-hosted only: GLM Coding Plan at Lite $12.6/month, Pro $56, Max $117.6; API gated behind safety evaluation, weights behind safety hardening (MarkTechPost, November 2026).
  • Z.ai has confirmed GLM-5.5 for December 2026 and clarified it has not been delayed (Reddit r/LocalLLaMA, November 2026).

Abstract glowing network of connected nodes, evoking neural layers that loop back through themselves

Contents

What Is a Loop Transformer?

A standard transformer is a stack of layers, each with its own weights, and each runs exactly once per forward pass. Depth costs you twice: every added layer needs parameters to store and a pass to compute. GLM-5.4 breaks that rule for part of the stack. Per the official post and its coverage, 28 of the model’s 78 layers execute twice, so one forward pass flows through 106 layer computations while the parameter count stays put (AI Weekly, November 2026).

Weight sharing across depth isn’t new on paper. Google’s Universal Transformer proposed recurrence over shared layers back in 2018, and it never stuck at frontier scale. What’s new here is shipping the pattern in a 750B flagship, which is the only sense in which “first loop transformer” holds up. Read it as “first at production scale”.

My mental model: recursion inside the forward pass. The first sweep through the looped block builds coarse context, and the second sweep revises that work with the same weights. Per Tim Kellogg’s analysis shared by AI Weekly, the looped block is the middle 28 layers of the GLM-5 base model, with per-token gates deciding how aggressively each pass writes (AI Weekly, November 2026).

Why Run Layers Twice?

Follow the economics. Adding depth the usual way roughly doubles the parameters of that section of the stack. Looping instead adds compute per token but no memory. A model with 78 layers’ worth of weights but 106 layers’ worth of compute can be cheaper to host than a true 106-layer model of the same width, because weights dominate serving memory. AI Weekly calls the trade roughly 36% more depth at zero added parameters, matching the arithmetic: 28 extra passes on a 78-layer base (AI Weekly, November 2026).

Z.ai’s own caveats deserve as much attention as the pitch. Looped models trained from scratch trail unshared ones at equal compute, so the team didn’t pre-train GLM-5.4 from zero. They continued training the existing GLM-5 base (MarkTechPost, November 2026). Three published changes make the loop trainable:

  1. Gated progressive updates. Per-token gates per iteration, so pass one makes small writes to build global context and pass two refines; harder tokens get more aggressive first-pass writes.
  2. Hybrid KV cache. The second loop reuses pass one’s sparse KV entries and keeps new KV only in a local sliding window.
  3. Sparse attention index reuse. Pass two reuses pass one’s indexer indices, adding zero indexing overhead with near-identical results.

Whether a looped model beats a deeper unshared one at equal FLOPs stays open; the 30B ablation is the published evidence, promising at small scale, nothing more.

How Does the Loop Avoid Doubling Memory?

Attention layers cache key and value tensors for every token, and naively running layers twice would double that cache. The hybrid KV cache avoids it: pass two reuses pass one’s sparse KV entries and stores new KV only for a local sliding window, so the extra loop costs one window of cache rather than a full one (MarkTechPost, November 2026). Pass two also reuses pass one’s sparse attention index, which Z.ai says adds zero indexing overhead with near-identical results.

On serving speed, Z.ai published up to 200 tokens per second off-peak and 70 to 80 at peak, crediting fused kernels that cut memory traffic (Z.ai, November 2026). Treat those as vendor figures for a hosted deployment; nobody outside Z.ai has reproduced them yet.

For the other end of the GLM serving spectrum, I previously walked through NVIDIA serving GLM-5.3 at 607.8 tok/s across two DGX Stations with vLLM: Serving GLM-5.3 at 607.8 tok/s: vLLM Across Two DGX Stations. The loop changes compute per token; a 750B model still needs sharded hardware.

What Does the Evidence Actually Show?

Here’s the claim-by-claim status: architecture facts are official, performance claims are ablation-scale or vendor-only.

ClaimSource statusWhere it’s published
750B parameters; 78 layers; 28 looped twiceConfirmed in the official post and its coverageZ.ai, AI Weekly
Loop adapted from the GLM-5 base, not trained from scratchStated by Z.ai, with its own from-scratch caveatMarkTechPost
30B ablation: AIME25 19.17 to 30.42, GPQA-Diamond 47.58 to 56.26, MMLU-Pro 71.65 to 75.05Published ablation, after 200K long-context SFT with thinking onMarkTechPost
“Intelligence comparable to 2T-3T parameter models”Vendor claim; no flagship benchmark table yetZ.ai
Up to 200 tok/s off-peak, 70 to 80 tok/s at peakVendor-published, independently unverifiedMarkTechPost
Open weights after safety hardeningAnnounced, no date committedAI Weekly

Two details in the ablation cut against pure hype. Output lengths fell on most tasks (GPQA-Diamond down 11.7%, MMLU-Pro down 14.9%, per the published numbers; MarkTechPost, November 2026), which suggests the second pass does refinement, not padding. And the gains shrink as tasks get closer to instruction following (IFBench +3.3 versus AIME25 +11.3), so looping helps reasoning-heavy work most. That’s the profile you’d expect if the second pass is revision, at 30B anyway.

What Does It Mean for Coding Workflows?

Z.ai frames the focus as “generalized coding”: code becomes the universal tool for producing artifacts, not just repositories. The launch demos are a self-narrated music video, a 6-axis robotic arm modeled in FreeCAD, a complete game, and an interactive bird-watching scene with GLSL shaders (Z.ai, November 2026). Demos are demos. Your day job is still repo edits, reviews, and CI, and no flagship coding benchmark table shipped with the model, so treat generalized coding as a second axis to test, not a reason to switch on its own.

The more practical read: check whether GLM-5.4 handles your actual loop better. Multi-file edits, tool calls, and long agent sessions are where one-pass models tend to thrash, and a second pass over the same weights is a plausible fix for revision-heavy work if the gates behave as described.

One caution before wiring it into anything sensitive: a new model from a different vendor is exactly when governance kicks in if your team has a policy process. I covered the playbook in Goldman Sachs Pulled Claude Code: What Regulated Teams Do Next. And if your agents route through tool servers, keep that plumbing auditable; the options are compared in Self-Hosted MCP Gateways Compared: Which One Fits Your Stack.

Can You Self-Host GLM-5.4?

Not yet. At launch it’s Z.ai-hosted only: the GLM Coding Plan, Z.ai Chat, and the ZCode desktop app. The public API follows a safety evaluation, and open weights are planned after safety hardening with no committed date, so no quantized builds exist either (MarkTechPost, November 2026).

When weights land, expect the usual 750B-scale pain. GLM-5.3’s NVFP4 checkpoint ran about 464 GB across 50 shards (NVIDIA, November 2026, via my GLM-5.3 serving walkthrough), so a 750B GLM-5.4 will need serious multi-GPU hardware unless Z.ai ships something more compact. The serving playbook from that walkthrough transfers: pinned vLLM images, FP8 KV cache, prefix caching, tensor parallelism sized to your chassis. One open question nobody has answered publicly: whether mainstream inference engines handle a looped architecture at all, since weight-shared layer reuse isn’t a standard vLLM or llama.cpp path. Until weights exist, that stays speculation, so the honest answer to “glm-5.4 self host” is: wait.

GLM-5.4 vs Claude: Should You Switch Yet?

I can’t run that comparison honestly yet, and neither can anyone else. GLM-5.4 has no published flagship coding benchmark table, and independent head-to-heads don’t exist yet. What you can compare today is access and price: GLM-5.4 ships inside GLM Coding Plan tiers (Lite $12.6/month, Pro $56, Max $117.6, all subject to change) (Z.ai, November 2026), so if you already subscribe, testing costs nothing extra.

Timing matters too. Z.ai confirmed GLM-5.5 for December 2026 and clarified it hasn’t been delayed (Reddit r/LocalLLaMA, November 2026). Betting a workflow on 5.4 weeks before a successor lands is rarely urgent. Let independent evals arrive, and let 5.5 land, before moving anything critical.

FAQ

What is a loop transformer?

A transformer where some layers run more than once per forward pass using shared weights. GLM-5.4 loops 28 of its 78 layers twice, adding about 36% effective depth with no new parameters. The idea traces back to Google’s Universal Transformer in 2018; GLM-5.4 ships it at 750B scale.

How many layers does GLM-5.4 run twice?

28 of its 78 layers. The looped block is the middle section of the GLM-5 base model, with per-token gates so each pass contributes differently (Z.ai, November 2026). One forward pass therefore flows through 106 layer computations while the 750B parameter count stays unchanged.

Can you self-host GLM-5.4?

Not yet. Z.ai hosts it through the GLM Coding Plan, Z.ai Chat, and the ZCode desktop app; the public API follows a safety evaluation, and open weights are planned after safety hardening with no published date (Z.ai, November 2026). Self-hosting becomes possible once weights arrive.

How much does GLM-5.4 cost?

It’s included in GLM Coding Plan subscriptions: Lite at $12.6/month, Pro at $56, and Max at $117.6, all marked subject to change (Z.ai, November 2026). Pay-per-token API pricing isn’t published yet because the API is still gated behind Z.ai’s safety evaluation.

When is GLM-5.5 coming?

December 2026, according to Z.ai. After launch, community discussion assumed a delay, and Z.ai clarified that GLM-5.5 has not been delayed and remains on track for December (Reddit r/LocalLLaMA, November 2026). One month after GLM-5.4 is a fast follow-up cadence.

Verdict

  1. GLM Coding Plan subscribers: try it now. It’s already in your tier, the loop is a genuinely interesting architecture, and testing costs nothing extra.
  2. API-first teams: wait. The API sits behind safety evaluation with no date, and no flagship benchmark table exists yet; revisit when independent coding evals land.
  3. Self-hosters: wait for weights, prep the playbook. The GLM-5.3 serving recipe is your template, but a looped architecture on vLLM or llama.cpp is unproven until someone runs it.
  4. Evaluating vendors: hold your migration. GLM-5.5 lands in December per Z.ai, one month after this release. The loop idea is worth watching; your production stack can wait a few weeks.

The architecture is the real story. If weight-shared looping holds up at 750B, it changes what a parameter count means, and that’s worth more than any single benchmark win.

Mihir Pipermitwala

Written by Mihir Pipermitwala

Senior Full Stack Consultant & Mobile Engineering Specialist building user-focused applications in healthcare with Flutter, Dart and React Native. I write about what I actually build and test — every tutorial here comes from real project work.

More about Mihir →
Scroll down to load comments...
Related Blogs
GLM-5.4: The First Loop Transformer, Explained for Coders

GLM-5.4: The First Loop Transformer, Explained for Coders

Z.ai shipped GLM-5.4 on Nov 23, 2026: a 750B model that runs 28 of its 78 layers twice. What a loop transformer is and who should try it now.

AI MLAI TOOLSDEVELOPER TOOLS

December 03, 2026

Serving GLM-5.3 at 607.8 tok/s: vLLM Across Two DGX Stations

Serving GLM-5.3 at 607.8 tok/s: vLLM Across Two DGX Stations

NVIDIA served GLM-5.3 at 607.8 tok/s across two DGX Stations with vLLM tensor parallelism. What the setup actually does and what scales down for self-hosters.

LLMOPSAI MLSELF HOSTING

December 01, 2026

Unsloth Dynamic v3.1: Better Qwen3.8-27B Quants for Local Rigs

Unsloth Dynamic v3.1: Better Qwen3.8-27B Quants for Local Rigs

Unsloth shipped Dynamic v3.1 quants for Qwen3.8-27B in Nov 2026. Here are the GGUF sizes, RAM tiers, Ollama setup, and who should run it locally.

ON DEVICE LLMAI MLAI TOOLS

November 30, 2026

Why Is Gemini 4 Carbon Taking So Long? What We Know

Why Is Gemini 4 Carbon Taking So Long? What We Know

Gemini 4 Carbon was teased weeks ago and still hasn't shipped while Neon launched Nov 18. 4 confirmed facts, 3 honest inferences, and how to hedge.

AI MLAI TOOLSCOMPARISON

November 29, 2026

Related Recommended Services
Visual Studio Code for the Web

Visual Studio Code for the Web

Build with Visual Studio Code, anywhere, anytime, in your browser.

IDEVISUAL STUDIOVISUAL STUDIO CODEWEB
Renovate | Automated Dependency Updates

Renovate | Automated Dependency Updates

Renovate Bot keeps source code dependencies up-to-date using automated Pull Requests.

AUTOMATED DEPENDENCY UPDATESBUNDLERCOMPOSERGITHUBGO MODULES
Best XML Formatter and XML Beautifier

Best XML Formatter and XML Beautifier

Online XML Formatter will format xml data, helps to validate, and works as XML Converter. Save and Share XML.

XMLXML BEAUTIFIERXML CONVERTERXML FORMATXML FORMATTER
Kubecost | Kubernetes cost monitoring and management

Kubecost | Kubernetes cost monitoring and management

Kubecost started in early 2019 as an open-source tool to give developers visibility into Kubernetes spend. We maintain a deep commitment to building and supporting dedicated solutions for the open source community.

CLOUDKUBECOSTKUBERNETESOPEN SOURCESELF HOSTED
Related Recommended Stories
How GitHub reduced testing time for iOS apps with new runner features

How GitHub reduced testing time for iOS apps with new runner features

Learn how GitHub used macOS and Apple Silicon runners for GitHub Actions to build, test, and deploy our iOS app faster.

IOSGITHUBTESTINGRUNNER
5 ways to transform your workflow using GitHub Copilot and MCP

5 ways to transform your workflow using GitHub Copilot and MCP

Learn how to streamline your development workflow with five different MCP use cases.

AGENT MODECODING AGENTCOPILOTFIGMAGITHUB
One weird trick for powerful Git aliases

One weird trick for powerful Git aliases

Advanced Git Aliases

ALIASALIAS TEMPLATEATLASSIANBITBUCKETGIT
Awesome Python

Awesome Python

An opinionated list of awesome Python frameworks, libraries, software and resources

AWESOMEAWESOME PYTHONCOLLECTIONSGITHUBPYTHON
Related Recommended Tools
Find out what websites are built with - Wappalyzer

Find out what websites are built with - Wappalyzer

Find out the technology stack of any website. Create lists of websites and contacts by the technologies they use.

ADD ONSANALYTICSAPP STOREAPPLEBOOKING
Sourcetree | Free Git GUI for Mac and Windows

Sourcetree | Free Git GUI for Mac and Windows

A Git GUI that offers a visual representation of your repositories. Sourcetree is a free Git client for Windows and Mac.

GITGITHUBGITLABATLASSIANBITBUCKET
Related Recommended Videos