Mixture-of-Loops Transformer

Lianghui Zhu, Shijie Wang, Xinggang Wang, Jinze Bai, Bo Wang, Xiang Bai

arXiv:2611.34923 · 2026-11-26 공개 · arXiv · PDF

transformer token-efficiency pretraining inference-latency moe-models cross-entropy olmo mixture-of-loops

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? 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

한국어 요약

한 줄 요약

Mixture-of-Loops Transformer(MoLT)는 Transformer의 반복 구조를 효율적으로 활용해 성능과 토큰 효율성을 동시에 향상시킨다.

핵심 기여도

핵심 아이디어

기존 Looped Transformer는 공유된 레이어를 반복적으로 재사용해 표현력을 높이지만, 효율성 저하가 발생한다. MoLT는 반복 루프 간 연결 메커니즘을 재설계하여, KV 메모리를 기반으로 선택적 재사용을 수행한다. MoLT-R은 잔차 스트림을 유지하면서 반복 간 로컬 KV를 읽어 표현력을 확보하고, MoLT-KV는 임베딩에서 재시작하며 이전 루프의 메모리 KV를 활용해 효율성을 높인다. 이는 반복 간 종속성을 줄이고 병렬 디코딩을 가능하게 한다는 점에서 기존 접근과 차별화된다.

기술적 접근법

주요 결과

의의 및 한계

MoLT는 반복 Transformer의 표현력과 효율성을 균형 있게 향상시키는 새로운 메커니즘을 제시한다. 특히, U-MoLT는 메모리 구성과 예측 분리를 통해 불필요한 계산을 제거함으로써 대규모 모델의 훈련 및 추론 효율성을 동시에 개선한다. 그러나, 반복 구조의 복잡성은 모델 설계 및 디버깅에 추가적인 부담을 줄 수 있으며, 특정 도메인에서는 기존 모델 대비 성능 개선이 미미할 수 있다.

실용적 활용

MoLT는 대규모 언어 모델의 효율적인 사전 훈련과 추론에 적용 가능하며, 특히 토큰 수가 많고 병렬 처리가 필요한 산업용 NLP 시스템에서 유용할 수 있다. 또한, 메모리 효율적인 디코딩 기법은 실시간 응답이 필요한 챗봇 및 번역 시스템에도 활용 가능하다.