Search papers, labs, and topics across Lattice.
This paper introduces continuous depth batching (CDB), a novel scheduling method for looped language models that enables depth-adaptive inference by managing loop iterations and boundary stages separately. By implementing CDB, the authors achieve significant improvements in inference efficiency, realizing up to 99% of the theoretical maximum speed-up from adaptive depth, resulting in 1.5 to 1.9 times higher offline throughput and a 45 to 90% reduction in normalized latency. This advancement addresses the challenges posed by standard batching methods, making it feasible to leverage looped architectures effectively in practical applications.
Achieving up to 99% of the theoretical maximum speed-up in looped language models could revolutionize inference efficiency in AI applications.
A main promise of looped language models (LMs) is depth-adaptive inference. By iterating a block of shared layers a variable number of times, the model can use less compute for"easy"tokens and more for"hard"ones. However, this adaptivity breaks standard batching: tokens in the same batch now require a different number of loops, so there is no unified forward pass, making efficient inference difficult. Standard inference frameworks like vLLM schedule on the token level and cannot handle this because tokens need to be removed from the batch within the forward pass. Loop-level scheduling has been proposed as a solution, but never implemented end to end. The key challenge is that looped architectures also contain non-looped boundary stages (e.g., token embedding and LM head) that must be scheduled at different frequencies than the loop. We introduce continuous depth batching (CDB), which schedules at the granularity of individual loop iterations. CDB handles boundary stages and loop steps in separate priority queues, makes exit decisions one step ahead, and overlaps all scheduling work with GPU computation. On Ouro 1.4B and Huginn 3.5B, CDB can realize up to $99\%$ of the theoretical maximum speed-up from adaptive-depth, translating to $1.5$-$1.9\times$ higher offline throughput and $45$-$90\%$ lower normalized latency under dynamic serving load.