Reproduce “GLM-5.4: Toward Generalized Coding with Our First Loop Transformer” on OpenResearch
Turn your favorite coding agents into research agents that review literature, develop hypotheses, and run experiments.
Universal app for Apple silicon and Intel. Requires macOS 11 or later.
About this paper
Z.ai
GLM-5.4 is Z.ai's first flagship model built on a Loop Transformer, which runs a weight-shared block of layers for multiple iterations to add reasoning depth without adding parameters. Rather than pre-training a looped model from scratch, Z.ai adapted the pre-trained GLM-5 base through continued training, looping 28 layers for two iterations at 750B scale. The post frames the model as the start of "Generalized Coding", where code generation extends to video, CAD, games, and 3D.
Key insights
- Learned gates split the work: the first pass builds global context with small writes, and the second pass opens the gates to refine the output.
- Gates adapt to token difficulty, writing more aggressively in the first pass on harder tokens.
- Looping shifts part of the reasoning from explicit output tokens into the implicit depth of the network.
- The architecture was validated progressively at 1B, 4B, 30B, and 750B scale before committing the flagship model to it.
Summary by alphaXiv.
Tip: change arxiv.org to autoarxiv.org in any arXiv abstract link to open the paper here.