[KongchangAI]
· 4 min read· 2,292 words

GLM 5.4 Looped Transformer Hands-On: One-Sixth the Cost of Claude

GLM 5.4 Looped Transformer Hands-On: One-Sixth the Cost of Claude

GLM 5.4 uses looped layers plus fused kernels to bypass the memory wall and replaces blind scaling with verification loops.

The article centers on ZAI's launch of GLM 5.4, noted as the first "looped Transformer": 28 of the intermediate layers in a 750-billion-parameter base execute twice per forward pass, using fused CUDA kernels and sliding-window passing to avoid doubling memory, with measured speeds of 200 tokens/sec off-peak and 70-80 tokens/sec at peak. In external comparisons, the same coding suite cost $18 on GLM 5.4 versus about $100 on Claude; an ablation shows reasoning load shifting from visible chain-of-thought to hidden loops, with average chain length dropping 10%. The article also warns it can get stuck in overly long loops on tricky prompts and that open weights aren't yet downloadable. It then reviews Anthropic's three-agent enterprise PR pipeline and zero-retention Enterprise Frontier Protection, escalating autonomous agent attacks, the compiler motivation behind Amazon's ~$7.5B Decart AI acquisition, Nvidia's personnel reversal, and DeepMind's formal verification, concluding with the common pattern that "verified loops beat blind scaling."

Looped Layer Architecture: Avoiding the Historical Pitfalls of Weight Sharing

ZAI quietly launched GLM 5.4 today, covering its coding subscription, zcode, and web chat, yet released no public benchmark charts—API access and open weights remain stuck in security review. This "board the train first, buy the ticket later" approach is fairly bold, but what truly deserves a closer look is the architectural change. According to confirmation from Zixuan Li, weekly coding subscribers receive 50% more quota than with GLM 5.3, and the million-token-context endpoint is named GLM 5.41m, embedded directly into the coding environment.

ZAI calls it the first "looped Transformer": 28 of the intermediate layers in a 750-billion-parameter base execute twice per forward pass. History is not encouraging—when trained from scratch in 2018, Universal Transformers consistently lost to non-shared stacks under the same budget and simply could not scale. ZAI's trick is not to start from scratch but to take a pretrained base and continue training, converting the middle block into a two-step loop. That shortcut is far more reasonable from an engineering standpoint.

less time waiting on chatter.

Universal Transformer is an architecture proposed in 2018 that shares weights across layers along the depth dimension and iterates as needed, and can be seen as an early prototype of the looped Transformer. Its core idea: rather than stacking ever more independent layers, let the same set of layers repeatedly process the same batch of tokens, thereby increasing computational depth at a fixed parameter budget. However, the paper and subsequent reproductions showed that under the same training budget, a from-scratch Universal Transformer consistently lagged behind a conventional non-shared stack on tasks such as language modeling, and the more layers, the harder it was to optimize, with gradients easily destabilizing across repeated loops. This historical result led the community to long believe that looped/weight-shared layers were hard to scale—until the compromise of "continue training on a pretrained base and turn the middle block into a two-step loop" emerged, sidestepping the optimization difficulties of training from scratch.

The Real Fix for the Memory Wall: Fused CUDA Kernels and Sliding Windows

Looping twice sounds simple, but conventional wisdom says: passing tokens through 28 layers twice should double the memory cache, and a million-token context input would instantly blow up VRAM. ZAI's inference-system section provides the answer—they fused the core CUDA kernels so the extra loop doesn't clog memory bandwidth. Without fused kernels, shuttling state back and forth twice would generate a flood of fragmented reads on the HBM chips, and every token would pay the price.

This software-hardware co-design explains the measured performance: 200 tokens/sec during off-peak hours and 70 to 80 tokens/sec during peak hours. At the same time, GLM replaces the additional full cache with sliding-window passing, further reducing memory footprint. This kind of system-level work is rarely seen in release materials, yet it is the prerequisite for a looped model to run at all.

KV cache is the mechanism that stores the key-value vectors of historical tokens during autoregressive inference to avoid recomputing attention at every step; its memory footprint grows linearly with context length, making it the main bottleneck for long-context inference. The so-called "memory wall" refers to the situation where, as both model parameters and context length grow, the KV cache and intermediate activations exceed GPU VRAM capacity, forcing them to be swapped out to HBM or even host memory, with bandwidth becoming the bottleneck. Looped layers make the same batch of tokens pass through the intermediate layers multiple times; if the cache and activations are read and written separately at every step, the number of HBM reads and writes multiplies. Fusing CUDA kernels means merging the many small operators across multiple loops into a few large kernels, reducing kernel launch overhead and the back-and-forth movement of intermediate tensors, so that memory bandwidth pressure does not increase significantly even with two loops. Sliding-window passing retains only the attention state within the most recent window and passes it forward, trading locality for memory and further shrinking the cache size for long contexts.

External Hands-On: The $18 vs $100 Coding Cost Gap

ZAI skipped the benchmark charts, but Evan Berger did the comparison himself—building the exact same app on GLM 5.4 and Claude. By the end of the coding test suite, GLM 5.4 had cost $18, while Claude had accumulated roughly $100 on a comparable app. That price gap has a fairly direct impact on day-to-day budgets; although a single test suite is no substitute for a full set of benchmark charts, seeing $18 next to $100 is enough to make anyone want to verify it firsthand.

ZAI also shared a controlled ablation experiment: adding 10% compute to a 30-billion-parameter model. Math, science, and long-context scores all rose, but more interestingly, the average visible chain-of-thought length actually dropped by 10%—part of the reasoning load shifted from visible text into hidden loop passing. For long tasks billed by output tokens, with the model iterating its reasoning within shared layers before writing the diff, the time spent waiting for "chatter" drops significantly.

Chain-of-Thought refers to a model outputting intermediate reasoning steps before giving a final answer, which typically improves accuracy on multi-step tasks, but those steps are billed as output tokens and generate considerable cost and wait time on long tasks. A controlled ablation experiment is an experimental design that holds all other variables fixed and changes only one factor (here, adding 10% compute) to observe how each metric changes, used to determine which factor actually drives performance gains. The "average visible chain-of-thought length dropping 10%" means: the model moves part of its reasoning into hidden iteration inside the looped layers, producing less text externally, so for API users billed by output tokens, both the wait for "chatter" and the bill drop; however, it also means the reasoning process is harder to audit externally, ceding some interpretability.

Broad Coding Capability and the Visual Feedback Loop

ZAI's "broad coding" demos include: an interactive 3D birdwatching world (procedural geometry plus custom GLSL shaders), a FreeCAD six-axis robotic arm build, a complete fighting game, and even a self-narrated music short called "Hello World." These visual orchestration capabilities come from a single coding release—a remarkably wide span.

On external validation, NiceKate AI ran five high-difficulty visual tests across web apps, Godot, Blender, and Unity. Native visual capability helped noticeably when geometry in the 3D viewport was offset or clipped—the model read the rendered frame and fixed the code itself, rather than blindly using wrong coordinates. But the second paragraph of ZAI's own engineering blog buries a warning: GLM 5.4 can still get stuck in overly long loops on tricky prompts; extra thinking improves accuracy, but latency spikes when self-correction won't stop. Webdoze pitted GLM 5.4 against Kimi 3.1 on a full-stack project using 162 million tokens, showing that agent loops without a step cap can quickly devour quota. In addition, the open weights are not yet downloadable on Hugging Face, so teams requiring strict local deployment must currently go through the cloud.

Anthropic's Enterprise PR Suite: A Three-Agent Pipeline

Anthropic released its enterprise Pull Request suite in public beta on Tuesday. When agents write most of the code diffs, waiting for human review quickly becomes the slowest gear. The workflow chains three agents: the already-launched code review (scanning diffs through multiple lenses across the repo, adversarially verifying bugs to suppress false positives, with admins choosing quick/standard/deep tiers), PR Steward (automatically handling failed CI runs, conflicts, and review comments, posting a change summary and how to undo after each push, manipulable mid-course by @Claude in comments or halted with a stop command), and Claude Approvals (checking PRs against a plain-text policy file on the default branch, akin to smarter code owners, approving small diffs after combining code review with custom rules).

You feel that squeeze on every repo.

Data from Anthropic's internal engineering team from June to September shows: merged PR volume more than doubled, and rolled-back changes fell by over 40%. Teams are advised to run in observe-only mode first before handing over branch protection rights. Qualifying enterprises that test the three tools before January 15, 2027 can claim at least $10,000 in 30-day credits.

The false-positive problem in code review agents is the main obstacle to enterprise adoption of automated review: large models easily flag stylistic differences or harmless patterns as defects, and once reviewers are flooded with false positives they simply ignore the alerts. "Adversarial verification" here means having another agent specifically try to refute or reproduce a suspected bug, and only issues that can be independently reproduced are reported, thereby suppressing the false-positive rate. A "plain-text policy file" is an approach that writes merge rules (such as which directories require review and which changes can be auto-approved) into a version-controlled text file in the repo; the benefit is that the rules are auditable, reviewable, and reversible, rather than hidden in some admin backend configuration. Observe-only mode lets the agent output judgments without actually merging or blocking, so teams can first accumulate real judgment samples and evaluate false positives and misses before gradually handing over branch protection permissions.

Enterprise Frontier Protection: Zero Data Retention and Customer-Held Keys

On the same day, Anthropic also launched Enterprise Frontier Protection (EFS) for cautious security teams, running in parallel with zero data retention. Stripe, Cisco, Wells Fargo, and Bridgewater tested the solution across more than a hundred customer environments. Conventional zero data retention only examines isolated prompts, while a clever attacker can fragment a single intrusion across multiple seemingly harmless queries. Anthropic mentioned a September campaign against 50 companies in which attackers used parallel sub-agents to cache stolen credentials.

Under EFS zero retention, neither Anthropic nor the cloud host keeps logs on vendor servers. Customers attach their own S3 or Google Cloud storage buckets and hold the keys themselves; cloud scanners inspect logs within the customer's custody, emit stripped security events without saving prompts, and completely block human review or training. Holding the storage keys yourself beats a vendor's verbal promise.

saving prompts, and block human review or training completely.

Escalating Autonomous Agent Attacks and a $750M Compiler Bet

Google's Threat Intelligence Group and Mandiant warn that autonomous agent attacks have just crossed a steep threshold. Frontline responders found hackers running open-source multi-agent attack kits such as Artex, Cairn, CyberStrike AI, and Pentagy against real targets. Three specific habits are worth developers tightening their local shell rules for: automated differential patch analysis after security updates are released, quickly turning fixed vulnerabilities into active exploits; large-scale credential theft for LLM hijacking, reselling enterprise cloud keys through underground "LLM mixer" proxy pools for model access while victims pay the API bills; and tampering with coding agent configurations to implant hidden backdoors.

TechCrunch reports that Amazon is in talks to acquire Decart AI for about $7.5 billion. Why is a startup known for interactive real-time video tools worth that price? Decart's Oasis 3 updates pixels in real time at playable frame rates, whereas ordinary video models grind offline for half a minute before returning canned clips. TechCrunch notes what Amazon really wants: Decart engineers' deep experience squeezing kernel optimizations and low-latency inference out of custom chips—AWS desperately needs killer compiler software to get developers to actually use Trainium. Real-time world generation simultaneously overlaps gaming, interactive interfaces, and robot simulation training grounds. If Decart can unlock cheaper, faster serving on Trainium clusters, AWS's margin recovery will come quickly. This is first and foremost a compiler bet.

Nvidia's Personnel Reversal and DeepMind's Quantum Verification

After Nvidia's board reinstated Jensen Huang as CEO, the market exploded on Monday: the Nasdaq 100 rose 7%, CoreWeave soared 22%, Tesla rose 11%, and AMD rose 7%. But according to Bloomberg, Reuters, and Axios, Nvidia executives were not briefed before the board vote, both Biden and Trump voted in favor, and Vice President Vance actively pressured the board to bring Huang back, arguing that Huang is indispensable to America's open-weights momentum.

executive officer. Workers cheered inside headquarters, while Huang promised staff he'll

Two compliance ropes sit right next to the welcome party: Nvidia's board has launched a search for a chief compliance officer reporting directly to governance; Senate Banking Committee Chairman Tim Scott confirmed that Huang will testify on December 3 regarding US chip exports. Lawmakers from both parties attacked the decision and demanded stricter export laws for advanced AI hardware. Meanwhile, Semaphore reports that the Commerce Department plans to add Megaspeed to the US Entity List to block unlicensed chip sales.

DeepMind demonstrated another engineering paradigm: a multi-agent team proposes shorter gate sequences, and a formal verifier immediately checks exact mathematical equivalence, with any invalid shortcut fabricated by a model coldly rejected by a formal proof. This "bold exploration plus zero-trust verification on the back end" model applies far beyond physics labs.

The Common Pattern: Verification Loops Beat Blind Scaling

Put GLM 5.4's looped layers, Claude's CI verification, and DeepMind's formal circuit proofs side by side, and the same pattern recurs: single-shot, unverified generation keeps hitting a ceiling on hard multi-step coding tasks; real gains appear only after wrapping the iterative model loop in a strict mechanical checker. Whether it's gated passing, GitHub automated CI verification, or formal proof, the verified loop beats blind scale every time.

Three quick habits for engineering teams: set a hard loop cap when testing GLM 5.4 on long coding tasks, so chatty refinement doesn't burn through the workflow; when trying GitHub auto-approval, first run observe-only mode on non-critical repos, and don't give natural-language policy rules silent merge rights before auditing a large number of real judgments; and per GTIG's warning, keep local coding assistant configurations and cloud keys away from production—a single tampered extension file should not hand over the whole team's billing account.

#GLM 5.4#looped Transformer#ZAI#Claude coding cost#Anthropic enterprise PR suite#Amazon Decart AI#fused CUDA kernels#DeepMind formal verification
Share:

Related articles