Swordsman: Entropy-Driven Adaptive Block Partition for Efficient Diffusion Language Models
Abstract
Block-wise decoding effectively improves the inference speed and quality in diffusion language models (DLMs) by combining inter-block sequential denoising and intra-block parallel unmasking. However, existing block-wise decoding methods typically partition blocks in a rigid and fixed manner, which inevitably fragments complete semantic or syntactic constituents, leading to suboptimal performance. Inspired by the entropy reduction hypothesis (ERH), we recognize that constituent boundaries offer greater opportunities for uncertainty reduction, which motivates us to employ entropy analysis for identifying constituent boundaries. Therefore, we propose Swordsman, an entropy-driven adaptive block-wise decoding framework for DLMs. Swordsman adaptively partitions blocks by identifying entropy shifts between adjacent tokens to better align with semantic or syntactic constituent boundaries. In addition, Swordsman dynamically adjusts unmasking thresholds conditioned on the real-time unmasking status within a block, further improving both efficiency and stability. As a training-free framework, supported by KV Cache, Swordsman demonstrates state-of-the-art performance across extensive evaluations. Our code is now available.
Lay Summary
Diffusion language models generate text by gradually filling in missing words, which can make generation faster by producing multiple words in parallel. However, current methods often split text into fixed-size chunks, which may break natural phrases and reduce generation quality. This paper introduces Swordsman, a method that divides text more intelligently by detecting where the model’s uncertainty changes sharply. These points often match natural sentence boundaries. Swordsman keeps related words together and adjusts how cautiously each chunk is generated. It requires no model retraining. Experiments show that Swordsman improves both generation quality and speed on reasoning and code tasks, making diffusion language models more efficient and practical.