GLM-5.4 Released: How the First Recurrent Transformer Reshapes Coding Capabilities

Z.ai releases GLM-5.4, its first recurrent Transformer model, trading weight-shared iterations for better coding.
Z.ai launches GLM-5.4, its first recurrent Transformer, landing within a week of Thinking Machines Lab's Inkling 2 Mini and moving "weight sharing + multiple iterations" toward a reproducible engineering path. The architecture trades computation for parameters, extending effective depth without growing parameter count and making inference budget a key evaluation dimension alongside model size. GLM-5.4 remains closed-weight and requires a Coding Plan subscription for API access, though its endpoint is OpenAI-compatible for easy migration. Willison's pelican SVG test reveals lingering weaknesses in complex spatial structures, and a style shift toward mainstream closed-source models between 5.2 and 5.3.
Z.ai has launched GLM-5.4, its first model to adopt a recurrent Transformer architecture. The news was disclosed by Simon Willison in a blog post, who also noted that this is the second public application of a recurrent Transformer he has seen in the past week—the previous one being Thinking Machines Lab's Inkling 2 Mini. Cross-validation from two independent sources moves the "weight sharing + multiple iterations" design from an isolated experiment toward a reproducible engineering path.
According to Z.ai's official description, each layer of a standard Transformer runs only once in a single forward pass; a recurrent Transformer instead runs a set of weight-shared layers for multiple rounds, repeatedly refining the hidden state from the previous round. This significantly extends the network's effective depth without increasing the parameter count.
Recurrent Transformer: A "Depth Lever" Without Adding Parameters
The core trade-off of the recurrent architecture is straightforward: exchange computation for parameters. The same set of layers is called repeatedly, allowing the model to invest more compute in "thinking" during inference without piling on a larger parameter count. Thinking Machines Lab's explanation of Inkling 2 Mini echoes this—the middle layers run three times per token, enabling the model to complete more reasoning with fewer tokens, especially for agentic coding tasks that depend on reasoning quality.
Two teams independently pointing in the same direction suggests that the benefits of recurrent design on coding tasks are being validated. For developers, this means the evaluation criteria for a new class of models will change: parameter count is no longer the sole yardstick—"iteration count" and "inference budget" become equally important dimensions.

Weight Sharing is the key mechanism that enables the recurrent Transformer to "avoid adding parameters." In a standard Transformer, each layer has its own independent parameter matrix; the recurrent architecture lets multiple iteration steps reuse the weights of the same set of layers, so the total parameter count equals that of just one set of layers, while the forward computation graph unfolds into multiple rounds. This is similar in spirit to the recurrence of RNNs, with the difference that the recurrent Transformer retains the Transformer's attention structure and the recurrence occurs at the layer level rather than the time-step level. One direct constraint introduced by weight sharing is that each iteration round must be able to distinguish "which round this is," otherwise the model cannot decide whether to continue refining or stop; implementations therefore typically need to introduce round encoding or state markers.
Inference Budget refers to the amount of computation a model is allowed to consume when generating each token or completing a task. Under the recurrent architecture, the inference budget can be adjusted by controlling the number of iteration rounds: more rounds mean greater effective depth and longer "thinking" time. This aligns with the "test-time compute" approach of reasoning models such as OpenAI's o series, but the implementation path differs—the latter mainly relies on generating longer chains of thought, while the former directly increases the depth of forward propagation inside the network. The concept of inference budget means the same model can slide between low cost and high precision, allocating compute according to task difficulty at deployment time.
Access Experience: Coding Plan and OpenAI-Compatible API
GLM-5.4 is not yet open-weight. Willison tested it via the Z.ai API, but there is a caveat: 5.4 is temporarily unavailable through the regular API and requires a subscription to its Coding Plan.
A practical finding is that the Coding Plan and the regular API share the same OpenAI-compatible Responses API (endpoint at https://api.z.ai/api/v1), and the Coding Plan's API key can directly call the new model on that endpoint. For developers who already have an OpenAI-compatible toolchain, the migration cost is therefore very low.
Willison wrote an llm-glm plugin for this purpose, then discovered that Tommy Hughes's llm-zai already existed. He released his own version purely because llm-zai did not yet support the new model, and explicitly stated he would consider retiring his plugin once the other catches up. This "fill the gap first, then step aside" approach also reflects that community toolchains often lag behind model releases in supporting new models.
The OpenAI-compatible Responses API means that the API provided by Z.ai follows OpenAI's interface specification in request and response formats, so developers can call it directly with existing OpenAI SDKs or compatible tools by simply replacing the base URL and API key. The "Responses API" here corresponds to OpenAI's newer responsive interface style, which differs slightly from the traditional Chat Completions endpoint, but the core JSON structure, message roles, and streaming return mechanism remain compatible. For developers, this compatibility greatly reduces migration costs: existing toolchains, prompt templates, and evaluation scripts built on OpenAI interface wrappers usually need no changes to point at the Z.ai endpoint. However, compatibility does not mean complete identity—model-specific parameters (such as reasoning intensity levels) still need to be passed via extension fields, and actual integration should follow the official documentation.
Pelican Test: Style Discontinuity Between 5.2 and 5.3
Willison used his signature "pelican riding a bicycle" SVG test to examine GLM-5.4's performance at low, high, and max reasoning intensity levels. The conclusion was blunt: the max-level result was "honestly not good"—the pelican is barely recognizable, and the connecting rod at the front of the bicycle frame is oddly positioned, looking like it simply cannot steer.
Looking at the longer timeline is more interesting. The pelicans generated by GLM-5.1 and GLM-5.2 differ greatly from other models and carry a distinctive style of their own; while the outputs of 5.3 and 5.4 feel closer to those of OpenAI and Anthropic models. Willison produced a comparison chart of four generations of GLM pelicans, noting that the style shift between 5.2 and 5.3 is quite abrupt.
This style convergence is itself a signal: the model's "aesthetics" and structural habits in code generation may be moving toward mainstream closed-source models. For users who rely on models to produce front-end code or charts, this means more predictable output, but also the loss of the previous distinctiveness.
The "pelican riding a bicycle" SVG test is an informal model capability probe proposed by Simon Willison: asking a model to generate an SVG image of "a pelican riding a bicycle." It is widely cited because the task simultaneously examines multiple capabilities—understanding of spatial relationships in an unconventional combination (how the pelican holds the handlebars, how its feet reach the pedals), common sense about bicycle mechanical structure (the connections between frame, fork, and chain), and the programming ability to translate that understanding into precise SVG path code. If any link is weak, the output exhibits typical failure modes such as misplaced limbs, a broken frame, or an inability to steer. Since SVG is plain-text code, the test results are reproducible and comparable, and do not depend on image generation models, making it a convenient window into the "structural intuition" of code generation models. It should be noted that this is only a qualitative observation and cannot replace standardized benchmarks.
A Few Judgments
The recurrent Transformer went from a paper concept to productization in two labs in a very short window. GLM-5.4's choice to feature this architecture in coding scenarios forms a closed loop with its Coding Plan subscription model—trading extra compute at inference time for code quality, then packaging that capability as a paid entry point for developers.
The question of open weights remains unresolved. The GLM series has previously accumulated considerable attention in the open-source community; if 5.4 is offered only through a subscription API for a long time, it will weaken its appeal in local deployment and secondary development scenarios. Willison's testing also suggests that the current version still has clear shortcomings in complex spatial structures (such as bicycle frames), indicating that the depth gains from recurrence are not a panacea.
What is truly worth tracking is: when both Inkling 2 Mini and GLM-5.4 tout "running middle layers multiple times" as a selling point, will the industry form a new evaluation paradigm to measure "reasoning compute per token" rather than simply model scale?
One-line Summary
Z.ai releases GLM-5.4, its first recurrent Transformer model, trading weight-shared multiple iterations for improved coding capabilities.
Paragraph Summary
Z.ai has launched GLM-5.4, its first model to adopt a recurrent Transformer architecture, landing within a week of Thinking Machines Lab's Inkling 2 Mini and moving "weight sharing + multiple iterations" from experiment to a reproducible engineering path. The recurrent architecture trades computation for parameters, extending effective depth without increasing parameter count and making inference budget an evaluation dimension as important as parameter count. GLM-5.4 is not yet open-weight and requires a Coding Plan subscription for API access, but its endpoint shares an OpenAI-compatible interface with the regular API, keeping migration costs low. Willison's pelican SVG test shows that 5.4 still has shortcomings in complex spatial structures, and that the style of 5.3 and 5.4 clearly converges toward mainstream closed-source models, forming a discontinuity with the distinctive style of 5.1 and 5.2.
Related articles

Prompt Engineering for Beginners: From Writing Prompts to Engineering Thinking
Starting from the essence and four functions of prompts, this article systematically explains the six-step process, four success criteria, learning value, and practical limitations of prompt engineering to help you build a complete understanding.

Anthropic Launches Nasdaq IPO: AI Giant's Listing and Risk Disclosures
Anthropic officially launches its Nasdaq IPO under ticker ANT, with market valuation expected to potentially exceed SpaceX's record. The prospectus devotes nearly 100 pages to AI risks, while first-half revenue grew over 14x but net losses widened sharply, reigniting the AI bubble debate.

Rust cURL Clone Uses 4,832 unsafe Blocks—Is the Memory Safety Myth Broken?
A Rust cURL clone uses 4,832 unsafe keywords, challenging Rust's memory safety narrative. We analyze what unsafe really means, compare Fil-C, and examine rewrite motives.