Dynamic Boundary Masking: Training-Free Length-Adaptive Decoding for Masked Diffusion Language Models
Masaki Asada ⋅ Hiếu Phí ⋅ Makoto Miwa ⋅ Masahiro Hamasaki ⋅ Ken Fukuda
Abstract
Diffusion language models typically decode on a fixed-length canvas: the output budget is determined before generation, and a blockwise sampler continues to process subsequent blocks even after the response has terminated. Consequently, when the allocated canvas exceeds the realized response length, the sampler performs redundant computation on positions beyond the end of the response. We introduce Dynamic Boundary Masking (DBM), a training-free modification to the sampling procedure that detects an end-of-sequence boundary during denoising, clamps the remaining suffix to the model's padding terminal, and exits the block loop once the boundary precedes the next block. The method changes no model parameters and requires no auxiliary length predictor. A conservative variant acts only on a committed terminal token, whereas a predictive variant can terminate earlier based on the model's terminal probability. On LLaDA-8B-Instruct, across four reasoning and code benchmarks, DBM reduces the number of model evaluations by up to $83.5\%$ and achieves up to a $6.05\times$ wall-clock speed-up, while matching baseline task performance to within $0.2$ accuracy points.
Chat is not available.
Successful Page Load