GLM-5.4 reuses layers instead of adding them, letting a 750B model perform like one 2-3x its size. Here's how the loop transformer works.
What is GLM-5.4? #
GLM-5.4 is a flagship model from Z.AI built at roughly 750 billion parameters, but it performs closer to a model in the 2 to 3 trillion parameter range. The trick is architectural: instead of stacking more unique layers, GLM-5.4 reuses a block of layers multiple times during a single forward pass. Z.AI calls this a loop transformer design, and it’s the headline feature of the release alongside a 1 million token context window, vision support, and generation speeds reported up to 200 tokens per second (with peaks closer to 70 to 80 under heavier load).
TL;DR #
- GLM-5.4 uses a loop transformer architecture that runs a middle block of layers twice, effectively deepening the network without adding new parameters.
- The model is built around 750 billion parameters but is designed to perform at a level comparable to models sized at 2 to 3 trillion parameters.
- A controlled 30B-parameter test comparing the same architecture with and without the loop showed gains across every benchmark, with the largest jump (roughly 8 to 11 points) on math and scientific reasoning.
- The looped version also produced shorter answers , cutting output length by up to about 15% while improving accuracy, suggesting the gains come from deeper internal processing rather than longer chain-of-thought rambling.
- Hands-on demos show strong agentic coding and 3D generation , including a Blender hair-transplant time-lapse simulation built from a single Python script and a winter diorama scene generated from one detailed text prompt.
- The model has a 1 million token context window and supports tool use, which it used to write and execute Blender scripts directly rather than just describing a scene.
› Build a shift-handoff app for 900 nurses.
already included:✓ HIPAA✓ access control✓ audit log✓ self-hosted
How does the loop transformer architecture work? #
A standard large language model is a tall stack of layers. Text passes through each layer exactly once, from input to output. If you want a deeper, more capable model, the usual move is to add more layers, which means more parameters, more memory, and more compute per token.
GLM-5.4 breaks that pattern. Rather than adding new layers, it takes an existing block of layers and runs the text through that same block more than once, reusing the same weights each time. Each additional pass refines what the previous pass already processed, similar to rereading a difficult paragraph with the first reading still fresh in your head.
In GLM-5.4’s specific configuration, the architecture runs text through 26 opening layers, then a middle block of 28 layers that gets processed twice, followed by 24 closing layers before producing an answer. The middle block is where the “looping” happens. Z.AI reportedly added gating mechanisms to prevent the numeric values from compounding and destabilizing across passes, and the second pass reuses the attention and memory choices established during the first pass. That reuse is what keeps the loop from making the model significantly slower or more expensive to run, since there’s no new set of weights to load or compute from scratch.
The practical result: a model that is “not bigger, just thinking deeper.” The parameter count stays fixed at the smaller footprint, but the effective depth of reasoning increases because the same weights get a second (or repeated) pass at refining the representation before the final layers produce output.
What do the benchmark gains actually show? #
Z.AI reportedly tested this architecture in a controlled way using a smaller 30 billion parameter version of the same design, comparing performance with the loop enabled versus disabled, while holding the parameter count constant. That controlled comparison is useful because it isolates the effect of the looping mechanism itself, rather than just comparing two differently-sized models.
Every benchmark category improved when the loop was turned on. The biggest gains showed up in math and scientific reasoning, with improvements of roughly 8 to 11 points, the kind of task that benefits most from multi-step, careful reasoning. General knowledge and instruction-following tasks improved too, though by smaller margins, which makes sense since those tasks lean more on retrieval and formatting than on deep multi-step inference.
The more notable detail is token efficiency. The looped model produced answers that were up to about 15% shorter on average, while still scoring higher. That’s a meaningful signal: the model isn’t compensating for lower raw capability by generating longer chains of reasoning out loud. It’s getting more computation done internally, within the loop itself, and then expressing a more compact, more accurate answer.
What can GLM-5.4 actually do in practice? #
Several hands-on demos point to strength in agentic coding and procedural 3D generation, areas where a model needs to both understand a complex scene description and translate it into working code.
Remy AI Engineer Certification
Your seat is open. Leave certified.
Build and deploy an app for enterprises with AI in one live afternoon. No coding.
One demonstrated example involved a hair-transplant time-lapse simulation built entirely in Blender from a single Python script, generated from one plain-English prompt describing the scene, timeline, and render settings. The model used tool access to write and run the script itself rather than just returning a text description, and it handled follow-up edits (changing hair color, density, and timeline) based on further natural-language instructions. Separate test renders took only seconds each, while the full simulation took about an hour to generate.
Another demo, created independently by a user and shared with permission, involved a winter village diorama: a floating alpine hamlet scene with falling snow, glowing windows, a frozen pond, orbit and zoom camera controls, a guided tour feature, and a sound toggle, generated from a single detailed prompt. Notably, several interactive features (the guided tour, the sound toggle) weren’t explicitly requested and appear to have been added by the model on its own initiative.
A third test, a rotating kebab scene, showed the model adding ambient details unprompted, like a brick wall, wall lamp, gas pipe, and a stylized flame effect, all generated from one file with no external libraries. Z.AI has framed this generalized coding capability broadly, citing use cases that include modeling robotic arms in CAD software, building complete small games, and constructing interactive 3D scenes from raw math and shader code.
Is GLM-5.4 good at creative and reasoning tasks beyond code? #
Beyond coding and 3D generation, GLM-5.4 has also been tested on more subjective creative writing tasks, including a character-driven moral dilemma prompt built around a lighthouse keeper torn between loyalty to a distant spouse and the pull of a magical, “inviting” visitor. The test was designed to check whether the model could maintain character consistency, write with emotional nuance, and avoid defaulting to a flat, moralizing answer.
The model’s response reportedly treated the dilemma with restraint, framing the tempting option as a reflection of the character’s own internal longing rather than resolving the dilemma. The ending leaned on grounded, practical details rather than a tidy moral lesson. While this kind of evaluation is necessarily subjective, it suggests the model’s capabilities extend past pure code generation into longer-form narrative reasoning, which matters for anyone building writing assistants, game dialogue systems, or interactive fiction tools on top of it.
Is GLM-5.4 worth building with? #
For developers evaluating GLM-5.4, the architecture itself is the main reason to pay attention. A model that reaches larger-model performance levels without a proportional parameter increase has real implications for inference cost and deployment, assuming the loop doesn’t introduce significant latency, which early reports suggest it largely avoids thanks to the gating and attention-reuse design. The 1 million token context window and demonstrated tool-use for coding and procedural generation make it a candidate for agentic workflows involving long documents, codebases, or multi-step generation tasks. As with any freshly released model, independent benchmark verification and open-weight testing (once available) will matter more than any single demo.
Frequently Asked Questions #
What makes GLM-5.4 different from a typical large language model?
Instead of adding more unique layers to increase capability, GLM-5.4 reuses a block of layers multiple times in a single pass, effectively deepening the network’s reasoning without increasing its parameter count.
How many parameters does GLM-5.4 have?
GLM-5.4 is built at roughly 750 billion parameters, but its loop transformer design is intended to make it perform at a level comparable to models in the 2 to 3 trillion parameter range.
Adjuster✕ Export PHI
#4471
12,480 users online
Does the loop transformer design slow the model down?
Z.AI added gating mechanisms to stabilize values across passes, and the second pass reuses attention and memory decisions from the first pass, which keeps the extra computation from meaningfully increasing cost or latency.
What context window does GLM-5.4 support?
GLM-5.4 supports a 1 million token context window, alongside vision capabilities and reported generation speeds up to 200 tokens per second.
What kinds of tasks has GLM-5.4 been tested on?
Demonstrated use cases include generating and executing Blender Python scripts for procedural 3D animation, building interactive 3D scenes from shader and math code, agentic coding tasks, and creative writing involving character consistency and moral complexity.