FlashLoop: Fast and Memory-Efficient Looped Transformers via Lazy Updates
Abstract
Looped Transformers have attracted substantial attention as a parameter-efficient approach to increasing computational depth through repeated application of shared Transformer blocks. However, their practical advantages over conventional Transformers remain under debate: each additional loop incurs another Transformer pass and requires caching another set of KV states, causing inference FLOPs and KV-cache memory to grow continuously with loop depth. This overhead becomes particularly severe at large loop counts and long context lengths, preventing the parameter efficiency of Looped Transformers from translating into practical inference efficiency. In this paper, we find that much of the additional computation and storage introduced by looping is redundant. As recurrence proceeds, state changes become increasingly concentrated on a small subset of tokens; attention-output differences are dominated by a sparse and stable subset of key columns; and KV residuals between adjacent loops become progressively more amenable to low-bit quantization. Building on these observations, we introduce FlashLoop, a training-free inference framework that reduces cross-loop redundancy through token-sparse updates, sparse attention, and KV-residual quantization. Across five Ouro and Huginn variants, FlashLoop largely preserves model accuracy while achieving – end-to-end speedup and – KV-cache memory reduction. At a 32K context length, FlashLoop reduces KV-cache memory by while delivering approximately speedup, substantially improving the practicality of scaling Looped Transformers to greater computational depths.
Then back it, or bet against it.
Related papers
Open the market on this paper to see 7 more related papers.