Z.ai's GLM-5.4 Runs 28 Layers Twice to Match 3 Trillion-Parameter Models
Z.ai's new flagship reuses the same 28 layers twice to reason deeper without more parameters, and lands on You.com with 1M context and video input.
Takeaways
- Z.ai's GLM-5.4 is live on You.com Inference Router on Day 0 with Zero Data Retention.
- First Loop Transformer flagship: 28 layers of the 750B GLM-5 base run twice with shared weights.
- Z.ai claims intelligence comparable to 2T-3T parameter models, but published no benchmarks.
- 1M-token context, 128K max output, and native video, image, text and file input.
- Priced around $1.4/M input and $4.4/M output tokens on third-party routers; direct API pending safety review.
- Pitched as Generalized Coding: writing code for games, video, 3D and CAD, not just software.
Z.ai’s GLM-5.4 is now available through You.com’s Inference Router, which lists the model with day-zero access and zero data retention. It supports a 1 million-token context window, up to 128,000 output tokens, and native image, video, text, and file input. Its defining change is a Loop Transformer architecture that processes representations twice through the same 28 layers.
Z.ai says this design gives a model with roughly 750 billion parameters capabilities comparable to models with 2 trillion to 3 trillion parameters. The company has not published a model card, benchmark tables, active parameter count, detailed latency measurements, or open weights, so that comparison remains unverified.
Same weights, second pass
A conventional fixed-depth Transformer sends each token representation through every layer once during a forward pass. GLM-5.4 sends representations through 28 reused layers a second time, creating a deeper computational graph without adding another set of weights.
The architecture traces back to the 2018 Universal Transformer research, which explored repeatedly applying shared layers. Z.ai adapted an already pretrained GLM-5 base model through continued training instead of pretraining a looped model from the beginning.
Per-token gates determine how much the second iteration updates each internal representation. Tokens that need more refinement can receive larger changes, while tokens that are already stable can pass through with smaller updates.
A smaller cache bill
The 1 million-token context limit makes memory management central to deployment. During generation, a key-value cache stores attention data from earlier tokens so the model does not recompute the full sequence for every new token. A conventional full-context cache can consume substantial memory at this scale.
According to Z.ai’s technical guide, GLM-5.4 uses a hybrid cache that combines globally shared attention with an independent sliding window for the looped pass. The company says the additional iteration requires one sliding window of cache instead of another full-context cache. It has not disclosed the resulting memory footprint or the increase in serving cost over GLM-5.3.
The base model also uses sparse attention, which allows each token to attend to selected context positions instead of comparing against every position. Z.ai has not published enough implementation detail to assess how the attention pattern affects recall across the full context window.
On complex math and science evaluations, Z.ai reports that GLM-5.4 emits 10% to 14% fewer output tokens because more computation occurs in hidden states during the repeated layers. Fewer generated tokens can lower output charges and decoding time, although the extra pass may increase compute and latency elsewhere in the request. End-to-end measurements are not yet available.
Code as the control layer
Z.ai describes the model’s broader target as “Generalized Coding,” covering software development and code that controls visual or physical artifacts. The company highlights game creation, video editing, 3D modeling, and mechanical design among its intended workloads.
GLM-5.4 adds image, video, and file input to the text input supported by GLM-5.3. A screenshot, interface mockup, document, or short clip can therefore become part of a coding prompt. The model produces text, so image generation, video rendering, CAD operations, and other external actions still require downstream tools that can execute its code or function calls.
The specification, with gaps
| Attribute | GLM-5.4 |
|---|---|
| Architecture | Loop Transformer with 28 reused layers receiving a second pass |
| Reported scale | About 750 billion parameters; active parameter count undisclosed |
| Attention | Sparse attention; detailed pattern undisclosed |
| Context window | Up to 1 million tokens |
| Maximum output | 128,000 tokens |
| Inputs | Video, image, text, and files |
| Output | Text |
| API features | Thinking mode, streaming, function calling, context caching, and structured output |
| Missing disclosures | Model card, benchmark tables, active parameters, detailed latency data, and open-weight license |
Access now, API later
You.com currently offers GLM-5.4 through its Inference Router with zero data retention. Developers should confirm the route’s current model identifier, media limits, request schema, and retention-policy scope before integrating it into production systems.
Direct access from Z.ai is more limited. GLM-5.4 is available through the GLM Coding Plan, starting at $18 per month, and is also appearing in Z.ai Chat and ZCode. Those products provide interactive access and should not be treated as a substitute for a metered direct API.
Current third-party router listings place pricing near $1.40 per million input tokens and $4.40 per million output tokens. Router prices can change, so production estimates should use the provider’s live rates and account for caching, media processing, and long-context behavior where applicable.
Z.ai says direct API access will follow its safety evaluation, while open weights will follow additional safety hardening. The company has provided no release date, license terms, checkpoint format, or hardware requirements for either release.
Best fits and open risks
Promising workloads
- Repository-scale coding agents that need to inspect large codebases or multi-file specifications.
- Development tasks in which screenshots, documents, interface mockups, or video clips form part of the specification.
- Tool-driven pipelines that generate code for games, 3D scenes, CAD systems, or video-editing software.
- Output-sensitive workloads that can benefit from shorter generated reasoning traces after latency testing.
Validate before production
- Benchmark quality independently because the 2 trillion to 3 trillion-parameter comparison is vendor-reported and lacks supporting evaluation tables.
- Measure time to first token, generation speed, memory use, and total request cost at realistic context lengths.
- Test retrieval across the full context window, since a maximum token limit does not establish reliable recall at every position.
- Confirm supported file types, media sizes, video duration limits, and structured-output behavior.
- Verify the scope of zero data retention for prompts, outputs, logs, and any infrastructure providers involved in serving the model.
- Plan for downstream execution because the model returns text rather than generated images, videos, or 3D assets.
The trade-off to test
Looping gives model builders another way to spend inference compute: reuse a fixed set of weights to add effective depth. That approach can reduce weight storage and memory traffic relative to adding distinct layers, while the repeated pass can increase sequential computation and per-token latency.
Mixture-of-experts models pursue efficiency by activating only a subset of their parameters for each token. GLM-5.4 combines sparse attention with weight reuse, targeting memory and model depth through a different mechanism. Independent evaluations will need to measure capability, long-context recall, throughput, latency, and total serving cost before developers can judge whether the trade delivers the gains Z.ai claims.