Mixture-of-Loops Transformer

Lianghui Zhu, Shijie Wang, Xinggang Wang, Jinze Bai, Bo Wang +1 more
11/25/2026
cs.LGcs.CL
transformer-attentionmoe

Official code: hustvl/MoLT (116 stars, Python, last commit 2026-11-25).

Abstract

Looped Transformers boost expressivity by reusing shared layers across loops, yet at the cost of efficiency. Pushing their expressivity-efficiency frontier requires rethinking the core mechanism connecting adjacent loops: What should be passed as a Transformer loops?

Show full abstract

We introduce Mixture-of-Loops Transformer (MoLT), whose Mixture-of-Loops Attention (MoLA) uses keys and values (KV) as memory for selective reuse across depths and loops. Under loop residual, MoLT-R retains the residual stream and reads local KV across loops for expressivity. Under loop KV, MoLT-KV instead restarts from embeddings and reads current-loop local KV with preceding-loop memory KV at earlier positions for efficiency. MoLT-KV eliminates same-position cross-loop dependence and, paired with loop forcing for parallel training, unlocks single-traversal Mixture-of-Loops (MoL) decoding beyond the training loop horizon. To balance efficiency and quality, we introduce U-shaped MoLT (U-MoLT), which separates memory construction from prediction readout and skips unused decoder traversals without changing predictions. In 400B-token pretraining, U-MoLT outperforms OLMo3 across 700M/1.5B dense and 3B MoE models, achieving 1.7x validation cross-entropy (CE) token efficiency at 700M while improving 3B MoE 10-domain perplexity by 0.75 and 10-task accuracy by 2.1 percentage points. In 100B-token continued pretraining of Qwen3.5-0.8B-Base, our U-MoLT adaptation lowers CE on all 11 domains over the matched baseline with 1.4x mean token efficiency. At inference, U-MoLT with MoL-Hybrid-2 matches non-looped OLMo3 latency at 996.6 vs. 1,000.6 ms on S-size (~113M) models. Code is available at https://github.com/hustvl/MoLT

View on arXivView PDF

Code Implementations(1)

hustvl/MoLTOfficial100%

Mixture-of-Loops Transformer

1166Python, CudaNov 25, 20266 days ago

Similar Papers

Cite this paper

@article{zhu2026mixtureofloops,
  title  = {Mixture-of-Loops Transformer},
  author = {Lianghui Zhu and Shijie Wang and Xinggang Wang and Jinze Bai and Bo Wang and Xiang Bai},
  year   = {2026},
  eprint = {2611.34923},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2611.34923v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2611.34923.svg)](https://codeofpaper.com/paper/2611.34923)

Discussion