News for hackers. Stuff that matters.
Re:GLM-5.4: Toward Generalized Coding with Our First Loop Tr... by aurareturn on Monday November 23, 2026 @07:49AM (#50610897)
For those wondering what loop transformers are:

LLMs have layers of data, called weights. During inference, each layer gets computed once. Moving weights from HBM memory to the chip is a major bottleneck because to generate a token, you need to move an entire layer into the chip, compute once, move it out, move the next layer in. Hence, memory bandwidth has been the #1 bottleneck for inference.

A loop transformer optimizes this bottleneck. Instead of one layer being computed once, it will compute the same layer multiple times, increasing the model intelligence without relying memory bandwidth as much. Bandwidth is still important, but not as much anymore.

More intelligence is squeezed by using the GPU compute that is typically sitting idle during inference.

Re:GLM-5.4: Toward Generalized Coding with Our First Loop Tr... by loubbrad on Monday November 23, 2026 @08:01AM (#50611012)
If I understand you correctly, I think you are incorrect.

Looped transformers allow models to do more compute in the forward pass for the same total parameter budget (e.g., required VRAM to store the model). This doesn't inherently optimize the memory bandwidth bottleneck. A simple way to see this is that if we reuse a layer during the forward pass, we still need to fetch its weights from HBM again, which incurs additional memory bandwidth usage.

The main advantage is more computation for a fixed parameter count and model-weight VRAM footprint, not more computation for a fixed HBM bandwidth budget.

Re:GLM-5.4: Toward Generalized Coding with Our First Loop Tr... by ac29 on Monday November 23, 2026 @08:20AM (#50611192)
Yes, you are right - the layers that are looped are far too large to stay in on-chip caches and must be reread for every loop pass.

Looping saves you memory capacity needs, not memory throughput needs.

Re:GLM-5.4: Toward Generalized Coding with Our First Loop Tr... by wren6991 on Monday November 23, 2026 @09:18AM (#50611907)
It helps at high concurrency, but not at C=1
Re:GLM-5.4: Toward Generalized Coding with Our First Loop Tr... by jauntywundrkind on Monday November 23, 2026 @09:22AM (#50612004)
One other advantage, since your layers are reused, you have a bigger pool of jobs you can collate onto a single execution of the layer. https://chatgpt.com/share/6b044c5b-5a68-83ea-a1e5-3345439ba9...

However actually benefiting from this can be tricky! loop-sgland project has considerable effort put to finding out how much to loop any given input, it's own subproblem in making use of this: https://kschwethelm.github.io/continuous-depth-batching/ https://github.com/kschwethelm/loop-sglang

Re:GLM-5.4: Toward Generalized Coding with Our First Loop Tr... by big_toast on Monday November 23, 2026 @01:48PM (#50616943)
Does the difference between the size of l2 and hbm mean there generally won't be a reason to loop within l2?
Re:GLM-5.4: Toward Generalized Coding with Our First Loop Tr... by moffkalast on Monday November 23, 2026 @08:08AM (#50611075)
I would imagine most inference setups already use up the idle compute on a draft model, but maybe it really can be that unbalanced on some systems.
Re:GLM-5.4: Toward Generalized Coding with Our First Loop Tr... by aenis on Monday November 23, 2026 @08:24AM (#50611223)
Is there any easy way to explain why does intelligence increase with the same layer being replicated and computed multiple times? I know there is research that shows it as somewhat effective, but ...why?
Re:GLM-5.4: Toward Generalized Coding with Our First Loop Tr... by hgoel on Monday November 23, 2026 @08:30AM (#50611279)
My mental model of it is that the network can fit a function, e.g. (x+y)^2 as looping an (x+y) layer twice rather than two redundant (x+y) layers.
Re:GLM-5.4: Toward Generalized Coding with Our First Loop Tr... by throw310822 on Monday November 23, 2026 @08:36AM (#50611336)
Because understanding and reasoning are based on rules that can be applied again and again to the input data and their own results. For the most obvious example think about how the algorithm for addition applies the same rule again and again from right to left.
Re:GLM-5.4: Toward Generalized Coding with Our First Loop Tr... by pennomi on Monday November 23, 2026 @08:39AM (#50611368)
From my layman’s understanding, the first layers of a model “decode” the input words into some kind of internal state. The middle layers “reason” about that state. The end layers “translate” the result back into words.

By taking those internal reasoning “circuits” and running them multiple times, it loops over the thinking part of the model without popping back in and out of words, in essence giving it more efficient chain of thought.

This technique (as far as I’m aware) was first done years before the big labs tried it. Someone on huggingface essentially made a frankenmerge of a model with itself and found that repeating 3 or 4 layers increased the model’s intelligence sharply.

But someone with actual industry knowledge should correct me if I’m wrong.

Re:GLM-5.4: Toward Generalized Coding with Our First Loop Tr... by halJordan on Monday November 23, 2026 @01:07PM (#50616306)
[delayed]
Re:GLM-5.4: Toward Generalized Coding with Our First Loop Tr... by charm137 on Monday November 23, 2026 @10:39AM (#50613658)
I don't think it increases when compared to a truly deep nicely pre-trained model. But I think what these results show that there is a lot of redundancy / "empty space" left in the models (in retrospect, those giant models from just 1-2 years ago seem like a mistake alongside Chinchilla scaling and all the GWs of power and trillions of dollars the industry collectively decided to throw at compute).

For a model with the same layer depth, I believe the gradients during training have to travel back to a lower depth but still are able to squeeze enough out of the weights to be useful where, compared to deep models, rank collapse is a real issue for deep models unless one is careful about their architecture (someone can correct me here - if the loss function does not have a built-in "loop index", then the backprop has no way of knowing whether it's going through 32 layers or 4 layers 8 times). And with looping, you obviously get the lower VRAM footprint advantage.

Re:GLM-5.4: Toward Generalized Coding with Our First Loop Tr... by covoeus on Monday November 23, 2026 @08:37AM (#50611342)
Your explanation implies that each layer is recomputed in place more than once before moving onto the next:

Prelude -> A -> A -> A -> B -> B -> B -> C -> C -> C -> Coda

The loop actually loops over a block of layers as a group:

Prelude -> A -> B -> C -> A -> B -> C -> A -> B -> C -> Coda

Re:GLM-5.4: Toward Generalized Coding with Our First Loop Tr... by 8note on Monday November 23, 2026 @03:05PM (#50618359)
basically making a few tokens in a row in latent space?
Re:GLM-5.4: Toward Generalized Coding with Our First Loop Tr... by devttyeu on Monday November 23, 2026 @08:37AM (#50611349)
Not entirely true when you use WideEP where model weight traffic is quite low compared to rest.

Generally on most AI accelerators the forward passes per second converge on MemorySize/MemoryBandwidth because you want to allocate all of the memory to model and kv caches, and you want to use maximum memory to get maximum batch size such that you also maximize compute utilization (which, in Decode is, you're still typically memory bound). That's why before drafters were popular you typically saw ~20tok/s on most providers, and why now that MTP/DSpark are mainstream you're seeing 50-100tok/s

Re:GLM-5.4: Toward Generalized Coding with Our First Loop Tr... by lolokazaki123 on Monday November 23, 2026 @09:10AM (#50611726)
This blog post has better explanation for what looped transformer is https://drhb.github.io/blog/posts/looped-transformers/
Re:GLM-5.4: Toward Generalized Coding with Our First Loop Tr... by gpvos on Monday November 23, 2026 @10:55AM (#50613935)
HBM memory = High Bandwidth Memory memory, i.e., generally that of a GPU chip
Re:GLM-5.4: Toward Generalized Coding with Our First Loop Tr... by m3kw9 on Monday November 23, 2026 @11:53AM (#50615040)
wouldn't this cause divergence if it gets it wrong in direction even slightly. Like an airplane going off 0.1 degrees for an hour will be off it's dest by large amount of miles.
Re:GLM-5.4: Toward Generalized Coding with Our First Loop Tr... by zardo on Monday November 23, 2026 @03:14PM (#50618529)
Isn't also a possibility that the error stays constant across iterations, or even corrects?