GLM-5.4 Released: Analysis of the First Recurrent Transformer and Claude Code Configuration Guide

Zhipu releases GLM-5.4, its first recurrent Transformer, but benchmarks and API are not yet available
Zhipu AI launches GLM-5.4, its first recurrent Transformer model: a 26-layer Prelude plus a 28-layer weight-sharing recurrent segment run twice, then a 24-layer Coda—78 layers of weights completing 106 layer computations—with damp gates preventing numerical divergence across iterations. The model is converted from an existing pretrained base via continual training, not trained from scratch. The only official benchmark table comes from a 30-billion-parameter test model, with AIME 25 rising from 19.17 to 30.42 and output length dropping 10%–14%; for GLM-5.4 itself there are only verbal claims of matching 2T–3T parameter models and a win rate chart without methodological details. It is currently available only through the GLM Coding Plan, starting at $18 per month, with the annual Lite plan at $12.60, along with Claude Code setup instructions. The token-billed API and open weights remain at the announcement stage.
Zhipu AI (Z.ai) has officially launched GLM-5.4, its first model built on a recurrent Transformer architecture. However, the way key information—such as benchmarks and API availability—is presented in the official documentation and blog has sparked discussion about the model's actual capabilities.

What Exactly Changed in the Recurrent Transformer
According to the Zhipu AI blog, in a standard Transformer each layer runs only once per forward pass. A recurrent Transformer, by contrast, runs a group of weight-sharing layers through multiple iterations, refining the hidden state produced by the previous round. Weight sharing means the same set of parameters is reused.
Based on the architecture diagram in the blog, the bottom is a 26-layer Prelude module, above which sits Loop Pass 1 (layers 27–54, 28 layers). Loop Pass 2 on the right is marked as sharing weights, and above that is a 24-layer Coda module before the final output. Counting layers as shown, 78 layers of weights complete 106 layer computations.
Interestingly, this model was not trained from scratch. The blog states that the team used continual training to convert an existing pretrained base model into a recurrent Transformer. This approach raises a problem: when intermediate layers run twice and the result is directly overwritten, the model's internal values can diverge across iterations. Their solution is the two modules labeled "damp gate" in the diagram—the gate acts like an adjustment knob for each token, determining the proportion of the new result that gets written back.
The blog further explains that the two loop passes serve different roles: the first pass builds global context and writes conservatively, while the second pass reuses that state to refine the output, opening the gate fully for a complete update.
Weight Sharing vs. Loop Unrolling
Recurrent Transformers are often confused with "recurrent neural networks (RNNs)." The key difference: RNNs recurse along the sequence dimension, whereas a recurrent Transformer recurses along the depth dimension—the same set of layers is called repeatedly to refine the hidden state of the same token multiple times, while tokens within the sequence can still be processed in parallel. This aligns with the ideas behind the Universal Transformer (2018), but those implementations were mostly trained from scratch; GLM-5.4's distinctive feature is using continual training to convert an existing dense model into a recurrent structure.
Risks of Continual-Training Conversion
Starting from a converged pretrained model and modifying its structure runs into "distribution shift": layers that were originally called once are now called twice, and activation scales can accumulate and amplify with each round. If the second pass directly overwrites the first, values may diverge exponentially. The damp gate works like a scaling coefficient in residual gating, learning a write-back ratio per token so the first pass writes with a conservative coefficient and the second pass opens up—maintaining training stability without reinitializing weights.
Benchmark Data: Only a Small Test Model, No Scores for GLM-5.4 Itself
The only benchmark table in the blog is not for GLM-5.4. A note below the table states that the evaluation subject is a 30-billion-parameter test model (with thinking mode). In that table, the AIME 25 math score rises from 19.17 to 30.42, with the smallest gain being 3.3 points (IFBench). Meanwhile, average output length drops by 10% to 14%, mainly from shorter chains of thought.
This table shows the recurrence mechanism works on a small test model, but it does not give GLM-5.4's scores.
For GLM-5.4 itself, Zhipu AI provides two pieces of information. The first is a sentence in the blog: it reaches a level comparable to 2T–3T parameter models—T meaning trillion, while the base model described in the blog is 750B. No test names accompany this sentence. The second is the "GLM-5.4 Win Rate" chart on the documentation page: against GLM-5.3, win rate 51.1%, loss rate 23.1%, with the rest ties; against Kimi K3.1 Pro, win rate 41.8%, loss rate 31.3%. In the saved page text, the chart has no caption and does not specify task type, sample size, or judge.
Zhipu AI itself acknowledges one limitation: the model "tends to get stuck in overly long marathon thinking loops," though the same sentence adds that this extended reflection does consistently improve accuracy. For users, this means tasks may take a long time. On speed, the documentation says up to 200 tokens per second during off-peak hours and 70–80 under peak load. These are Zhipu AI's own figures for its own servers.

What Are AIME 25 and IFBench
AIME 25 refers to the 2025 American Invitational Mathematics Examination problem set—15 fill-in-the-blank competition math problems with answers that are integers from 0–999. Because scoring is objective and difficulty is high, it has become a common benchmark for measuring model reasoning in recent years. The jump from 19.17 to 30.42 may look modest, but an AIME single-question accuracy around 30 typically corresponds to an entirely different capability tier. IFBench, meanwhile, tests instruction following: given dozens of verifiable fine-grained constraints (format, word count, banned words, etc.), the model must satisfy all of them in its answer, and the score is the constraint satisfaction rate. Together, the two cover the dimensions of "can reason" and "can follow instructions," which are exactly where the recurrence mechanism claims its gains.
Interpretation Limits of the Win Rate Chart
"Win Rate" usually refers to the proportion of pairwise comparisons in which a model's answer is preferred, commonly by having a judge model or human annotator choose between two options without knowing the source. 51.1% vs. 23.1% means about a quarter of comparisons were losses and the rest ties—the net win rate is not high; 41.8% vs. 31.3% is closer. Without task distribution, sample size, and judge information, such numbers can only be treated as directional signals and cannot be compared horizontally with public leaderboards.
What It Can Do: Official Demos and "Generalized Programming"
The blog positions the model as "generalized programming," saying it can write code to generate and edit video, build complete games, and handle 3D modeling and mechanical design. It then shows four demos: a music video called Hello World, a six-axis robotic arm modeled in FreeCAD, a complete game, and an interactive 3D birdwatching experience based on pure mathematical geometry and custom shaders.
All these clips are provided by Zhipu AI itself, and the page shows no prompts, number of attempts, or time spent per item. In other words, they are cherry-picked success cases from the vendor.
How to Get It: Coding Plan and Claude Code Configuration
Currently GLM-5.4 is available only through the GLM Coding Plan. The documentation says it starts at $18 per month, with up to 10,000 credits per month. When choosing annual billing, the subscription page shows the Lite plan at $12.60 per month, with 18 noted alongside. The Lite plan gets 10,000 credits per week. Credits are calculated as tokens multiplied by a rate: for GLM-5.4 the input rate is 4.6 and the output rate is 16; for GLM-5.3 they are 6.9 and 24. The new model consumes fewer credits per token, consistent with the model page's statement that GLM-5.4's available quota is higher relative to GLM-5.3.

The Claude Code integration process comes from Zhipu AI's own guide. The first step guide contains three steps: install Claude Code, create an API key under the plan, and complete configuration. The last step provides a helper tool that can be run in the terminal, but that guide maps Claude Code to GLM-5.3-flash by default, so a second guide explains how to switch.
Claude Code's endpoint is api.z.ai/api/anthropic. Open settings.json in the .claude folder and add four values under ENV: three of them set the default haiku, sonnet, and opus models to GLM-5.4, with an "m" appended after the brackets to enable million-token context; the fourth sets the auto compact window to the same scale. The guide warns not to replace the whole file if other fields already exist. To check, run claude and type /status; the model line should show GLM-5.4. In Zhipu AI's own coding app Z Code, a website screenshot shows GLM-5.4 already checked in the dropdown menu.

Credit Rates and the "Cheaper" Calculation
Billing by tokens multiplied by a rate means actual cost depends on the input-output ratio: GLM-5.4's output rate is 16 and input rate 4.6, versus 24 and 6.9 for GLM-5.3—about two-thirds of the latter. But credit consumption is also affected by output length—the vendor admits the model tends to get stuck in long thinking loops, so if average output tokens increase by more than 50%, the savings from lower rates may be offset. Actual cost per task needs to be estimated together with output length, not just the rate.
How Environment Variable Mapping Works
Claude Code uses ANTHROPIC_BASE_URL and model alias environment variables to determine where requests go and which model to use. Pointing all three aliases—haiku, sonnet, opus—to GLM-5.4 means all internal tiered requests land on the same model; the "m" suffix after the brackets is Zhipu's agreed switch for million-token context, which requires server-side support to take effect, otherwise requests may error. Setting the auto compact window to the same scale lets the client automatically compress history when approaching the context limit, avoiding rejected overly long requests.
Three Things Not Yet in Place
As of the page state on November 24, three items are absent. First, the token-billed model API: the blog says "coming soon," and the documentation says "available after safety evaluation is complete," with no dates given. Second, open-sourcing the weights: the blog says it plans to open-source responsibly after necessary safety hardening, again with no timeline. Third, Zhipu AI's own GLM-5.4 benchmark tests—on its pages only the 30-billion-parameter test table and the win rate chart can be found.
The blog concludes by saying that the next significantly larger model will carry forward everything learned here and "will be ready soon." These promises will be the first to go stale; before subscribing, it is best to read the documentation page again.
Key Takeaways
GLM-5.4 is Zhipu AI's first recurrent Transformer, with 28 layers run twice and a gating mechanism ensuring stability on the second pass. The only benchmark table comes from a 30-billion-parameter test model, the win rate chart lacks methodological details, and the 2T–3T comparison is a vendor claim. Currently it exists in the GLM Coding Plan, starting at $18 per month; in Claude Code, the final step is writing four values into a settings file. Both the model API and open weights remain "announced but unreleased." It should be noted that the above analysis is based on official page information and did not involve actual testing of the model.
Related articles

ChatGPT Plus Self-Service Recharge in China: Full Process and Risk Analysis
Analyzing the Bilibili tutorial's ChatGPT Plus website recharge process in China, the real risks of Session credential handover, security differences between credit card and mobile recharge, and an account protection checklist for beginners.

DSH + GPT 'Armor-Breaking' in Practice: Compliantly Unlocking AI Creation and Development Limits
A Bilibili creator demonstrates using the DeepSeek Harness desktop client with the Purge plugin to lower AI review thresholds, then driving GPT for image generation and coding tasks.

Prompt Engineering for Beginners: From Writing Instructions to Designing AI Workflows
From the four roles of prompts and the six-step prompt engineering process to AI's real capabilities, a systematic overview of prompt engineering fundamentals from a Bilibili tutorial.