Software

Z.ai's Loop Transformer runs 28 layers twice to match trillion-parameter rivals at 750B

Z.ai introduced GLM-5.4 on Monday with a Loop Transformer design that repeats the same layers during inference, claiming its 750-billion-parameter model achieves reasoning performance comparable to systems with 2 to 3 trillion parameters.

3 min read
Z.ai ran the same 28 layers twice — and claims its 750B model can rival a 3-trillion-parameter one

Z.ai unveiled GLM-5.4 this week alongside a Loop Transformer architecture that cycles through identical layers multiple times during inference, adding computational depth without expanding the model's parameter count.

According to the company, "The company claims its 750-billion-parameter model can match the reasoning performance of models with 2 trillion to 3 trillion parameters," though comprehensive benchmark data supporting this assertion has not yet been made public.

The model, developed by extending GLM-5 through additional training, processes a shared block of 28 layers twice during inference. Z.ai engineered the approach specifically for complex coding tasks and agentic applications.

Depth without more parameters

Z.ai opted to adapt an already-trained model after initial experiments revealed that looped Transformers built from the ground up underperformed standard architectures when given equivalent pretraining resources.

Running layers repeatedly at this magnitude introduced challenges with activation stability and attention caching. To address these issues, Z.ai implemented per-token gates that control changes to the residual stream and constrain activation norms from expanding across multiple passes.

GLM-5.4 reuses the key-value cache from the initial pass and employs a distinct sliding window for the second iteration, sidestepping the memory overhead of storing the full attention history when processing contexts up to one million tokens long. The system also recycles sparse attention indices between passes, which Z.ai reports had minimal performance consequences in its experiments.

"Z.ai developed fused inference kernels to reduce intermediate memory reads and writes during repeated layer execution."

What the 30B benchmarks show

Z.ai evaluated the architecture across scales of 1 billion, 4 billion, 30 billion, and 750 billion parameters, with detailed results emerging from the 30-billion-parameter variant.

Testing demonstrated that the looped model surpassed a conventional Transformer of equivalent size on mathematical reasoning, scientific tasks, and extended-context problems, despite consuming roughly 10% more training compute.

The model also produced 10% to 14% shorter responses on benchmarks such as MMLU-Pro and GPQA-Diamond. Z.ai attributes this brevity to reasoning occurring within the repeated layers rather than being expressed through additional generated output.

From code to robot arms

Z.ai describes its methodology as Generalized Coding. Demonstrations of GLM-5.4 span game development with physics and combat mechanics, 3D scene generation using GLSL shaders, and six-axis robotic arm design in FreeCAD.

In a post on X, Z.ai head Zixuan Li highlighted enhancements over GLM-5.3 in test authoring, code review, feature implementation, debugging, and shell-based operations, though the company has not disclosed the specific evaluations behind these claims.

Throughput has fluctuated since the model went live. Z.ai reports speeds reaching 200 tokens per second during low-traffic periods, declining to 70 to 80 tokens per second when demand peaks.

One developer initially observed speeds of 150 to 170 tokens per second, with subsequent reports dropping to 40 to 50 tokens per second and service disruptions later in the day. Independent measurements comparing inference speed and pricing remain unavailable.

"Z.ai also acknowledges that GLM-5.4 can spend excessive time reasoning through tasks." The company is investigating adaptive computation to confine additional iterations to tokens requiring them.

GLM-5.4 is accessible via the GLM Coding Plan, ZCode, and Z.ai Chat, featuring vision capabilities and a one-million-token context window.

Source: The New Stack · Reporting supplemented by The Silicon Ledger staff.