Model architecture
What happens when GLM-5.4 thinks twice?
November 23, 2026
A bat and a ball cost $1.10 together. The bat costs a dollar more than the ball. How much does the ball cost?
Ten cents comes to mind before I’ve finished reading. Then I add it up. If the ball costs ten cents, the bat costs $1.10. Together they cost $1.20, a dime over. Five cents for the ball and $1.05 for the bat satisfies both clues.
What interests me is the moment between thinking “ten cents” and giving my answer. I get to do a little more work before I speak. GLM-5.4 does extra work before it answers, too. Inside the model, that second pass starts with numbers. It hasn’t picked a word yet.
What happens before the next word
A language model predicts the next token, often a word or part of one. Inside a transformer, layers of computation pass numbers to one another. Those numbers carry information about the text so far. Each layer uses a set of learned numbers, called weights, to update them.
Z.ai took an already trained GLM-5 and continued training it to use 28 of its middle layers twice. On the first pass, those layers gather context. The updated numbers go back through the same layers for a second pass, then on to the rest of the model. Every token gets both passes. Z.ai’s GLM-5.4 post
The two passes share weights, but each has its own gate. Think of the gate value as a fraction. It determines how much of a proposed change the model keeps for a token. Z.ai found that the first pass generally kept a small fraction while building context. The second used that context and kept more of its update. For a harder token the first gate could open wider. The pass count stayed at two.
Does running it twice double its size?
GLM-5.4 is roughly a 750-billion-parameter model. To reach 1.5 trillion parameters, it would need another 750 billion learned numbers to store. The second pass reads the weights for those 28 layers again. The gates have learned settings of their own, and both sets are already there when the model starts answering. What the second pass costs you is more computation per token.
Z.ai compares GLM-5.4’s performance with models in the two-to-three-trillion-parameter range. I find its smaller experiment easier to interpret. The team compared two 30-billion-parameter models. The looped version used about 10% more computation during training. Its largest gains came on maths, scientific reasoning, and tasks with long inputs. With thinking mode on, it also produced 10–14% fewer output tokens on average on most benchmarks, mostly because it used fewer tokens to work through the problem. Z.ai’s GLM-5.4 post
A hundred passes is a thought experiment for GLM-5.4. Jonas Geiping and colleagues did train a different model, with 3.5 billion parameters, to run its block a variable number of times. Extra passes improved its scores on some reasoning tests. To find out what a hundred passes buys you, you’d have to run the test at that depth and count the correct answers. Geiping et al., Scaling up Test-Time Compute with Latent Reasoning
The riddle gave me the total and the difference. Checking the arithmetic helped me use both clues. If you wanted to know what the shop paid for the ball, we’d need another fact. We could go over the same two clues all afternoon.