TL;DR
Prefilling-dLLM introduces a training-free prefill-decode disaggregation framework designed to eliminate the prohibitive quadratic recomputation costs of long-context inference in Diffusion Large Language Models (dLLMs). By chunking the input prefix, caching Key-Value (KV) representations once, and utilizing predictive sparse attention, it achieves up to a 28× end-to-end speedup. Furthermore, it completely mitigates the notorious "lost-in-the-middle" phenomenon by using chunk-level boundary tokens as periodic attention anchors.
What Problem Does This Paper Address?
Diffusion Large Language Models (dLLMs) are gaining traction as an alternative to standard autoregressive (AR) models because they can generate multiple tokens in parallel via iterative denoising. However, they suffer from a massive efficiency bottleneck: they re-encode the entire prefix sequence at every single denoising step.
In autoregressive models, decoding only processes one new token at a time, making it memory-bound. In contrast, dLLM inference requires a full bidirectional forward pass over the combined prefix and response sequence at every iteration, making the entire process heavily compute-bound. As the context length grows, this quadratic computational cost becomes completely prohibitive for long-context applications.
Methods
The authors propose PREFILLING-DLLM, a training-free framework that computes the prefix KV cache exactly once in a dedicated prefill stage and reuses it across all decoding steps.
The core pipeline consists of:
- Chunk Prefill & Parallel Processing: The prefix is partitioned into $N$ non-overlapping chunks of size $C$. A special Beginning-of-Sequence (BOS) token is prepended to each chunk as a delimiter. Because the chunks are independent during prefill, they can be processed in parallel across multiple devices.
- Predictive Scoring: To determine which chunks are actually useful for the final answer, the framework scores them using two complementary metrics:
- Self-Information Score: The negative log-likelihood of the query given the chunk.
- Pseudo-Label Score: An initial fast denoising pass generates "pseudo-labels" (estimated response tokens), and chunks are scored based on how well they predict these labels.
- Two-Level Sparse Attention:
- Inter-chunk sparsity: Only the top-$K$ highest-scoring chunks are retained for decoding.
- Intra-chunk sparsity: Within each selected chunk, only the top-$B$ tokens with the highest query-to-chunk attention weights are kept, further compressing the cache.
- Split-S Parallelism: Because decoding involves a highly asymmetric attention pattern (a small number of decode tokens vs. a large cached prefix), standard attention kernels underutilize the GPU. The authors introduce Split-S, which breaks the selected prefix KV cache into $S$ independent compute shards processed in parallel across the batch dimension.
Datasets
The framework was evaluated on two prominent long-context benchmarks:
- LongBench: Includes tasks like single/multi-document QA, summarization, few-shot learning, and code completion, with context lengths ranging from 2K to 32K tokens.
- InfiniteBench: Pushes contexts beyond 100K tokens, featuring tasks like long-document retrieval, book-level QA, and mathematical reasoning.
Key Insights and Ideas
- Locality Bias in dLLMs: The authors observed that attention from response tokens to prefix tokens decays rapidly with distance, an effect that intensifies in later denoising steps. This means full attention over the entire prefix is largely redundant.
- BOS Tokens as Periodic Anchors: In AR models, BOS tokens act as "attention sinks," absorbing a massive, disproportionate amount of attention mass (often 20–60%). In dLLMs, however, the authors discovered that chunk-level BOS tokens act as stable, low-magnitude "attention anchors." They distribute attention mass uniformly across the context, effectively eliminating the "lost-in-the-middle" effect where models forget information placed in the center of a prompt.
Key Results
- Sublinear Scaling & Speedups: PREFILLING-DLLM compresses the context to a fixed budget regardless of input length. This yields accelerating speedups as context grows: 9.1× at 8K, 16.1× at 16K, and 28.0× at 32K contexts compared to vanilla baselines.
- State-of-the-Art Quality: On LongBench and InfiniteBench, the model achieves top-tier accuracy among dLLM acceleration methods. For example, on InfiniteBench's Passkey retrieval task, it achieved 95.42% accuracy, vastly outperforming the strongest baseline, Fast-dLLM v2, which scored 27.12%.
- Kernel Efficiency: The Split-S parallelization strategy for decoding achieved a 5.8× to 10.2× latency reduction over vanilla FlexAttention kernels.
Limitations and Future Work
- Static Chunk Selection: The top-$K$ chunks are selected once after the prefill stage and remain fixed. If the initial pseudo-labels are inaccurate, highly relevant chunks might be permanently discarded.
- Quality-Efficiency Trade-off: Smaller chunk sizes improve retrieval resolution and accuracy but underutilize GPU compute hardware.
- System Bottlenecks: Current attention utilities (like FlexAttention) lack paged memory management, meaning the prefix KV cache must still be reloaded at every decoding step.
- Generalization: The evaluations were restricted to Dream-7B and UltraLLaDA architectures on English-language benchmarks; testing on larger scales and multilingual settings remains future work.
Summary updated