Z.ai has introduced GLM-5.4, a 750-billion-parameter model built to process some information through the same layers twice. The company says this approach can add computational depth without increasing the model’s parameter count, and is part of a wider effort to use code for tasks beyond conventional software development.
How the loop transformer works
In a standard language model, each layer is used once in a pass. GLM-5.4 instead sends information through a shared block of 28 layers twice. The second pass refines intermediate results from the first, letting the model do more computation with the same set of parameters.
Z.ai says it retrained the GLM-5 base model released in February to create the looped version. The company claims GLM-5.4 reaches performance comparable to models with 2 to 3 trillion parameters. That comparison is a company claim; the article reports no published benchmark scores for the 750B model itself.
Managing the extra computation
Repeating layers can cause intermediate activations to grow sharply. Z.ai says that simply replacing each pass’s intermediate state with the next could leave later layers with values outside the range they were trained on.
GLM-5.4 uses dedicated gates for each token and pass to regulate how much new output is fed back into the stream. According to Z.ai, the first pass builds context cautiously, while the second writes its changes back in full. The company says the first pass contributes more strongly for difficult tokens.
The model also shares its KV cache between passes. This cache stores information about previously processed tokens. The second pass keeps extra values only in a small local window, which Z.ai says helps keep memory overhead manageable compared with GLM-5.3, even at a 1-million-token context.
For compute, GLM-5.4 uses sparse attention to select relevant earlier tokens instead of scanning the full context each time. The second pass reuses the first pass’s selection. Z.ai says this produces nearly the same results as choosing tokens again for the second pass. It reports generation speeds of up to 200 tokens per second off-peak and 70 to 80 tokens per second under load.
What the smaller test showed
Z.ai tested looped models at 1, 4, 30, and 750 billion parameters. Its direct comparison used a 30B model with the same parameter count as the base version; the looped model received about 10 percent more training compute.
On that 30B test, the AIME25 math score increased from 19.2 to 30.4 points. GPQA-Diamond, an expert-level science test, rose from 47.6 to 56.3 points, while the AA-LCR long-context score moved from 40.3 to 47.7. Gains on MMLU-Pro and IFBench were smaller, at just over three points.
Responses from the looped test model were shorter: by 14.9 percent on MMLU-Pro, 11.7 percent on GPQA-Diamond, and 2 percent on AIME25. Z.ai says some reasoning shifts from visible output tokens into the loop’s additional computational depth. These results are for the 30B test, not GLM-5.4’s 750B flagship.
Broader ambitions, with open questions
Z.ai describes GLM-5.4 as the beginning of “Generalized Coding,” using code as a foundation for creating more than software. Examples shown by the company include a music video scored by the model, a six-axis robot arm designed in FreeCAD, a complete game, and an interactive 3D scene made with mathematical geometry and custom shaders.
The company also identifies a drawback: reasoning phases can become overly long, with the model getting stuck. Z.ai says extended double-checking can improve accuracy, but the longer process may be a trade-off for users.
GLM-5.4 is available through the GLM Coding Plan, the ZCode coding environment, and Z.ai Chat. An API is set to follow, while token pricing has not been announced. Z.ai plans to release the model weights after further safety testing and says a much larger model is expected soon.
For now, the main evidence for the loop architecture comes from the smaller 30B experiment. Z.ai has not published benchmark scores for the 750B model, and the article reports no independent evaluations. The design’s promise is clearer than the flagship’s measured performance.