News for hackers. Stuff that matters.
Re:GLM-5.4: Toward Generalized Coding with Our First Loop Tr... by abixb on Monday November 23, 2026 @08:26AM (#50611245)
For those who are in computing but not in AI, looped transformers are like chain-of-thought but for every token during every forward pass (based on the number of loops as spec'd in the model architecture), correct?

Does this mean we're opening up a whole new space of efficiency and performance gains even while keeping model sizes (chinchilla-optimal models) constant?

This is mind-blowing, though. Reality (the universe) just keeps on giving to our newfound tech tree branch of artificial neural networks.

Re:GLM-5.4: Toward Generalized Coding with Our First Loop Tr... by datadrivenangel on Monday November 23, 2026 @09:31AM (#50612260)
That sounds like speculative execution for regular computing
Re:GLM-5.4: Toward Generalized Coding with Our First Loop Tr... by muddi900 on Monday November 23, 2026 @12:03PM (#50615223)
I can't believe I did not make that connection. This is a very good abstract model to think about this.
Re:GLM-5.4: Toward Generalized Coding with Our First Loop Tr... by HarHarVeryFunny on Monday November 23, 2026 @01:51PM (#50617002)
I don't see any similarity.

Speculative execution goes hand in hand with branch prediction, and refers to speculatively executing the instructions that you think (based on branch prediction) will follow a branch before you get there, with the goal of keeping the execution pipeline full. If the branch prediction proves to be incorrect then you need to throw away those speculatively executed results and instead execute the instructions on the path that the branch actually took.

With a looped transformer, there is no speculation. You are basically choosing to put some layers in a loop rather than have them duplicated. For example if you previously had 6 layers A B C A B C then you could put (A B C) in a loop and execute the loop twice instead. There is no speculation here - you are always going to execute A B C A B C in either case. The benefit of using a loop is that by avoiding the duplication of layers you are avoiding duplication of parameters and so keeping the model smaller.

Re:GLM-5.4: Toward Generalized Coding with Our First Loop Tr... by noddybear on Monday November 23, 2026 @09:37AM (#50612423)
A normal transformer has N layers, all of which are run forward for each token. A looped transformer is a bit different. Instead of N layers, it has K. These K layers are then looped, such that the output (not a token) of the first run of these K are fed back into the start of the K layer block. This looping happens until a fixed-point is achieved (i.e another loop results in a noop). At that point, a token is sampled. This means that tokens get different amounts of compute, depending on how challenging they are.
Re:GLM-5.4: Toward Generalized Coding with Our First Loop Tr... by gmueckl on Monday November 23, 2026 @09:57AM (#50612844)
This is confusing to me: this is asserting that those K layers form a system of equations that can be solved using am iterative strategy until guaranteed convergence for each and every possible input sequence. Unless I am.missing a few fundamental mathematical properties aboutbnonlinear systems of equations, I don't understand how this can be true ober the entire input domain.
Re:GLM-5.4: Toward Generalized Coding with Our First Loop Tr... by HarHarVeryFunny on Monday November 23, 2026 @10:46AM (#50613794)
As always with neural net training, you are just minimizing output (in this case prediction) errors over the training set, and hoping that this generalizes.

I don't know how they train these looped transformers - whether they take the lopping into account or not. For training recurrent (i.e. looped) neural networks in general, the historic approach has been to unroll them over some fixed number of timesteps (BPTT = back-propagation through time).

Re:GLM-5.4: Toward Generalized Coding with Our First Loop Tr... by __MatrixMan__ on Monday November 23, 2026 @10:01AM (#50612939)
If the layers are looped, what does it mean that they have an output?

I remember fixed points. An automorphism A on a set S has a fixed point s ∈ S if A(s) = s. If a noop corresponds to a fixed point, then are the elements of the set vectors and the output is a diff from the previous layers? Like, we're looping until we notice a cycle?

Re:GLM-5.4: Toward Generalized Coding with Our First Loop Tr... by HarHarVeryFunny on Monday November 23, 2026 @10:24AM (#50613378)
You could choose to loop a fixed number of times, or alternatively dynamically determine when to stop thereby achieving variable compute (more loops/compute/thought only when needed).

There has been concern that looping internally rather than emitting a token every N (transformer depth) layers reduces visibility and monitor-ability, so OpenAI have talked about severely limiting it to avoid this concern, and Zhipu are (at least initially) doing the same here - limiting it to a fixed two loops/iterations.

Re:GLM-5.4: Toward Generalized Coding with Our First Loop Tr... by AlotOfReading on Monday November 23, 2026 @10:15AM (#50613203)
That's remarkably similar to naive iteration in datalog. I wonder if there's an optimization equivalent to semi naive iteration.
Re:GLM-5.4: Toward Generalized Coding with Our First Loop Tr... by eab- on Monday November 23, 2026 @10:22AM (#50613330)
> This looping happens until a fixed-point is achieved (i.e another loop results in a noop).

This is not true; in the article it is made abundantly clear that it runs 2x of 28 of its layers.

Re:GLM-5.4: Toward Generalized Coding with Our First Loop Tr... by drakythe on Monday November 23, 2026 @10:28AM (#50613460)
The 2x is arbitrary and in this particular case, is the fixed-point. I've seen models that do 3x loops for 3/4s of their layers. I suspect we'll see see loop counts increase as this becomes a more popular technique and may reach a point where one of the big labs is confident in their model's ability to loop "indefinitely" without becoming bogged down, reaching some logically measured point.
Re:GLM-5.4: Toward Generalized Coding with Our First Loop Tr... by smallmancontrov on Monday November 23, 2026 @12:52PM (#50616082)
"Fixed point" in the context of iterative algorithms usually means "repeat a variable number of times until the output doesn't change." This is in stark contrast to the idea of repeating a fixed number of times. The looped models appear to repeat a fixed number of times.
Re:GLM-5.4: Toward Generalized Coding with Our First Loop Tr... by dasyud on Monday November 23, 2026 @01:17PM (#50616467)
I think the point here is that a few fixed number of iterations is enough to approximate the fixed point for most tokens. It's kind of like how iterative algorithms like Newton-Raphson are used in practice in modern optimizers (Muon). Trying to get to the exact fixed point might end up adding noise.
Re:GLM-5.4: Toward Generalized Coding with Our First Loop Tr... by sorokod on Monday November 23, 2026 @02:01PM (#50617224)
What guarantees an existence of a fixed point?
Re:GLM-5.4: Toward Generalized Coding with Our First Loop Tr... by Footprint0521 on Monday November 23, 2026 @09:52AM (#50612744)
This sounds like AI 2027 losing COT and control of models, but irl and in real time

But also I’m excited for the performance gains anyways

Re:GLM-5.4: Toward Generalized Coding with Our First Loop Tr... by mlmonkey on Monday November 23, 2026 @11:14AM (#50614288)
So many questions...

What does a Looped Transformer (LT) do for the loop during training? The output of a layer is typically garbage until it has done some iterations of training.

How is the output fed back into the input? Via a smoothing function ( e.g. gamma * Input + (1 - gamma)*Looped_Output as gamma goes from 1.0 to 0.5 ) ?

Do you loop back each layer? Or a block of layers??

Re:GLM-5.4: Toward Generalized Coding with Our First Loop Tr... by HarHarVeryFunny on Monday November 23, 2026 @11:48AM (#50614934)
> What does a Looped Transformer (LT) do for the loop during training? The output of a layer is typically garbage until it has done some iterations of training.

The same is true for any deep neural net - so you need to make sure that errors/gradients flow back to the lowest levels, which is what "residual connections" do.

> How is the output fed back into the input?

They show that on their architecture diagram (the "Damp Gates") - they appear to be blending (learning to?) the old and the new, similar to what an LSTM does.

> Do you loop back each layer? Or a block of layers??

In this case it's a block. Perhaps the idea is that it takes more than one layer to implement a useful group of transformations (e.g. it takes two layers to implement an "induction head", which is one of a Transformers emergent mechanisms).

We don't need to guess too much since they show us the architecture!

Re:GLM-5.4: Toward Generalized Coding with Our First Loop Tr... by nagaiaida on Monday November 23, 2026 @01:43PM (#50616850)
repeating a chunk of middle layers is relatively common in model merging; presumably it's pretrained unlooped first and then the section to loop is identified and trained further while looping