Prefilling-dLLM: Predictive Prefilling for Long-Context Inference in Diffusion Language Models
SourceFull paper
Article overview
Verdict
PREFILLING-DLLM is a convincing training-free method for accelerating long-context diffusion LLMs: it preserves quality better than the evaluated baselines and reaches up to 28× speedup at 32K context under the reported conditions. However, static selection, chunk-size sensitivity, and limited model and language coverage leave generalization unestablished.
Main idea
The method computes prefix KV once, partitions the prefix into chunks, selects the most query-relevant chunks and tokens, and reuses the compressed KV cache across all denoising steps. BOS tokens at chunk boundaries provide periodic attention anchors.
Mechanism
State: the Lp-token prefix is split into chunks of size C; the query and pseudo-response score chunks, and the denoised response has length Ld. Each chunk receives a BOS delimiter and is processed independently with the query and pseudo-response to build KV. Chunks are ranked by query self-information and pseudo-label scores; top-K chunks are retained. Within selected chunks, tokens are ranked by bidirectional chunk–query attention and top-B tokens are retained. During decoding, selected-chunk KV remains fixed while query and response KV are recomputed; confident tokens are iteratively unmasked. Split-S FlexAttention parallelizes attention over non-contiguous KV and merges partial results with log-sum-exp, avoiding contiguous cache gathering. Typical settings are C=1024, Dream top-K=4 with four pseudo-label tokens and one partial round, and B=512; UltraLLaDA uses top-K=2 without intra-chunk sparsity or top-K=8 with it, with B=512. Reproduction: (1) split the prefix and add BOS; (2) parallel-prefill chunks with query and pseudo-response; (3) select top-K chunks; (4) optionally select top-B tokens; (5) decode with fixed selected KV through Split-S. Exact pseudo-label construction and any full training protocol are absent because the method is training-free.
What this is useful for
The method is most useful for long prompts in diffusion LLMs when the same prefix is reused across many denoising steps and a fixed budget of roughly 4K tokens is acceptable. Its best fit is retrieval-like tasks and contexts up to 32K–128K when chunk size and top-K can be tuned per model.
Risks / not proven
Quality depends on chunk size, top-K, and top-B: single-chunk selection degrades sharply beyond 32K, and optimal settings vary by model and context length. Static selection is not corrected during decoding. Prefill still becomes more expensive with context length, and the reported results are limited to Dream-7B, UltraLLaDA, Fast-dLLM v2, and English benchmarks. Generalization to other architectures, scales, and languages is untested.
Full abstract
Diffusion large language models (dLLMs) re-encode the entire prefix at every denoising step, causing recomputation that scales quadratically with context length and becomes prohibitive for long-context scenarios. We propose Prefilling-dLLM, a training-free prefill-decode disaggregation framework for dLLMs that partitions the prefix into N chunks, caches their KV representations once, and selects the top-K most relevant chunks with intra-chunk token sparsity for decoding, showing that sparse prefilling can outperform dense attention while reducing per-step complexity from quadratic in the full sequence length to quadratic only in the decode length. On LongBench and InfiniteBench, Prefilling-dLLM achieves state-of-the-art quality among dLLM acceleration methods, and an attention kernel that parallelizes decoding over the non-contiguously cached chunk KV yields 9.1--28.0x speedup at 8K--32K contexts. We further show that beginning-of-sequence tokens prepended to each chunk act as periodic attention anchors that eliminate the lost-in-the-middle phenomenon. Code is available at https://github.com/menik1126/Prefilling-dLLM.