DSB: Dynamic Sliding Block Scheduling for Diffusion LLMs
Abstract
Diffusion large language models (dLLMs) have emerged as a promising alternative for text generation, distinguished by their native support for parallel decoding. In practice, block inference is crucial for avoiding order misalignment in global bidirectional decoding and improving output quality. However, the widely-used fixed, predefined block (naive) schedule is agnostic to semantic difficulty, making it a suboptimal strategy for both quality and efficiency: it can force premature commitments to uncertain positions while delaying easy positions near block boundaries. In this work, we analyze the limitations of naive block scheduling and disclose the importance of dynamically adapting the schedule to semantic difficulty for reliable and efficient inference. Motivated by this, we propose Dynamic Sliding Block (DSB), a training-free block scheduling method that uses a sliding block with a dynamic size to overcome the rigidity of the naive block. To further improve efficiency, we introduce DSB Cache, a training-free KV-cache mechanism tailored to DSB. Extensive experiments across multiple models and benchmarks demonstrate that DSB, together with DSB Cache, consistently improves both generation quality and inference efficiency for dLLMs. Code is released at https://github.com/lizhuo-luo/DSB.
Lay Summary
Large language models are widely used to generate text, but many of them still produce words one after another, which can be slow. Diffusion language models offer a promising alternative because they can generate multiple parts of a sentence in parallel. However, to produce high-quality text, these models need a good strategy for deciding which parts of the sentence to generate and when. Existing methods usually divide the text into fixed blocks, but this can be inefficient because some words are easier to predict than others. We propose Dynamic Sliding Block, a method that lets the generation block move and change size during the writing process. This allows the model to spend more effort on uncertain parts while not unnecessarily delaying easier parts. We also design a caching method that reuses useful intermediate information to make generation faster. Our experiments show that these methods can improve both the quality and speed of diffusion language models across different tasks and models.