cd /news/artificial-intelligence/mixture-of-loops-transformer-passing… · home › topics › artificial-intelligence › article
[ARTICLE · art-176906] src=dev.to ↗ pub= topic=artificial-intelligence verified=true sentiment=↑ positive

Mixture-of-Loops Transformer: Passing KV Memory Between Loops Instead of Residuals

Researchers at Huazhong University of Science and Technology, ByteDance Seed and the University of Toronto published the Mixture-of-Loops Transformer (MoLT), a looped-transformer design that passes keys and values between loops instead of the residual stream. Their U-MoLT variant, which splits the stack into a looped encoder and a cross-attention-only decoder, reached 1.7x validation cross-entropy token efficiency over an OLMo3 baseline at 700M parameters and improved ten-task accuracy by 2.1 points on a 3B MoE, while a hybrid schedule decoded at roughly the same latency as a non-looped baseline. The authors note that some gains come with higher training FLOPs and that equal-compute comparisons remain future work.

recommendation

When adding loops to a transformer for extra depth, pass keys and values between loops rather than the residual stream and use hybrid loop schedules, which spend extra loops on prefill and decode cheaply.

more in playbook: Inference and self-hosting
by read5 min views7 publishedNov 26, 2026

Looped transformers get more depth out of a fixed parameter budget by running the same stack of layers several times. The catch is that every extra loop costs compute, and the usual way of connecting loops (passing the residual stream from one loop to the next) forces each token to be processed sequentially through all of them. At decode time that means N loops cost roughly N times as much per token.

The Mixture-of-Loops Transformer (MoLT), from Huazhong University of Science and Technology, ByteDance Seed and the University of Toronto, asks a narrow question: what should actually be passed between loops? Its answer is keys and values, not the residual stream. This post walks through the mechanism, the reported numbers, and the caveats you should check before getting excited.

In a standard looped model, loop 2 sees only the final hidden state of loop 1 at each position. MoLT replaces that with Mixture-of-Loops Attention (MoLA): a single softmax attends jointly over

Treating KV as a reusable memory source gives the paper three variants:

MoLT-R keeps the residual stream and adds direct reads of current-loop and preceding-loop local KV. It adds no parameters and is the most expressive variant, but it keeps the sequential cost: a fixed N-loop schedule means N times the layers per decode step.

MoLT-KV restarts each loop from the token embeddings and reads preceding-loop memory KV only from strictly earlier positions (j < t). That removes the dependence between loops at the same position. Combined with loop forcing, which supervises next-token prediction in every loop in parallel during training using the previous loop's prefix memory, the model can decode in a single traversal of the shared stack per token, even beyond the number of loops it saw in training.

U-MoLT splits the stack into a looped encoder that builds memory and a causal, cross-attention-only decoder that produces the prediction. Because the decoder only reads the encoder's output, intermediate-loop and non-final prompt decoder traversals can be skipped at inference without changing predictions. The authors' README lists a 6+6 layer configuration with sparse loop-KV reads at layers 0, 2 and 4 for the small model.

The reported results are on small to mid-sized models, but they target a real bottleneck: depth-by-reuse is attractive only if inference cost doesn't scale with loop count.

Pretraining. Over 400B tokens, U-MoLT beats an OLMo3 baseline at 700M and 1.5B dense and 3B MoE. At 700M it reaches 1.7x validation cross-entropy token efficiency, matching the baseline's final loss with about 41.8% fewer tokens, for roughly 1.5% more parameters. On the 3B MoE, ten-domain perplexity improves by 0.75 and ten-task accuracy by 2.1 points. In the README's table, average accuracy at 1.5B goes from 61.2 to 62.6.

Continued pretraining. Adapting Qwen3.5-0.8B-Base with 100B tokens lowers cross-entropy on all 11 evaluated domains, with 1.4x mean token efficiency over a matched continued-pretraining baseline. Retrofitting an existing checkpoint is the practical path for most teams, so this result is arguably the most useful one.

Latency. On a roughly 113M-parameter model, the README's latency table shows U-MoLT with the MoL-Hybrid-2 schedule at 996.6 ms versus 1,000.6 ms for non-looped OLMo3 (4,096-token prompt plus 64 decode steps). A naive fixed two-loop schedule takes about twice as long (1.97 s for Loop OLMo3). The pure "Mixture-of-Loops" schedule is far slower at prefill (about 47 s for U-MoLT at a 4,096-token prompt), which is why the hybrid schedules exist: they spend extra loops on the prompt, then decode cheaply.

Compute is not equal. An independent summary of the paper notes that some gains come with higher total training FLOPs, and that an exact equal-compute comparison against other looped architectures is future work. Token efficiency is not wall-clock or FLOP efficiency, so treat the 1.7x figure as "per token seen," not "per dollar."

Scale. The largest pretrained model is 3B (MoE). Whether the advantage holds at 7B+ and with modern data mixes is untested in the paper.

Prefill cost. The hybrid schedules keep decode flat, but prefill still runs extra loops. In the reported table the prefill overhead is small at S-size, yet you should measure it on your own hardware and prompt lengths, especially for long-context workloads.

Mixed results by task. The per-task table is not uniformly in MoLT's favor. At 700M, MoLT-R and U-MoLT improve most benchmarks, but OpenBookQA is flat for MoLT-R (36.2 versus 36.2) and U-MoLT is ahead on COPA while MoLT-R leads on others. Small benchmarks like COPA (100-ish questions in typical evaluations) are noisy, so look at averages and perplexity rather than single columns.

Release status. The GitHub repo currently ships a minimal U-MoLT implementation on BlaGPT. The fused MoLA Triton kernel, MoLT-R, MoLT-KV, MoL-Hybrid decoding and the full pretraining recipes are still on the TODO list, so reproduction of the headline results isn't possible yet.

If you want to experiment now, the repo exposes a small model you can run directly:

from bla_gpt.u_molt import UMoLT, UMoLTConfig

model = UMoLT(UMoLTConfig(vocab_size=128, hidden_size=64, num_heads=4,
                          num_kv_heads=2, num_encoder_layers=2,
                          num_decoder_layers=2, intermediate_size=128,
                          block_size=64, sequence_length=64))
full = model.forward_unrolled(inputs, num_loops=2)    # parallel over prefix
logits, state = model.forward_recurrent(inputs)       # one traversal per token

MoLT's contribution is less about looping itself and more about the interface between loops. Passing KV as memory lets you pick where to spend compute: parallel loops during training, and a mostly single-pass decode at inference. For anyone building small, efficient language models or retrofitting existing checkpoints, the continued-pretraining result and the latency table are the parts to scrutinize first.

My read: promising, but still a preprint with a partial code release, evaluated at modest scale. Wait for the kernels and the training recipes before planning around it, and when they land, compare against baselines matched on FLOPs, not just tokens.

── more in #artificial-intelligence 4 stories · sorted by recency
── more on @mixture-of-loops transformer 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain — perfect for shipping the agent you just read about.

$git push zahid main
→ Live at https://your-agent.zahid.host ✓
Get free account → Pricing
from €0/mo · no card required
LIVE [news/mixture-of-loops-tra…] indexed:0 read:5min 2026-11-26 · —