Prefilling-dLLM: Predictive Prefilling for Long-Context Inference in Diffusion Language Models

Jing Xiong, Qi Han, Shansan Gong, Yunta Hsieh, Boyuan Zheng, Chengyue Wu, Chaofan Tao, Chenyang Zhao, Ngai WongarXiv 2026

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.

Figure 3: Overview of PREFILLING-DLLM. (I) Prefill: The prefix is partitioned into N chunks, each independently prefilled with intra-chunk attention to produce per-chunk KV caches and predictive and token scores. Chunks are ranked by a predictive score combining a self-information score and a pseudo-label score. After top-K chunk selection and optional top-B token retention, the retained per-chunk KV entries are assembled directly into the reusable prefix KV cache. (II) Sparse Attention: During decoding, only the selected prefix KV entries participate in cross-attention with the response tokens. (III) Decoding: Iterative denoising progressively unmasks the response over T steps, reusing the cached KV without recomputation.

The core pipeline consists of:

  1. 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.
  2. Predictive Scoring: To determine which chunks are actually useful for the final answer, the framework scores them using two complementary metrics:
  3. Self-Information Score: The negative log-likelihood of the query given the chunk.
  4. 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.
  5. Two-Level Sparse Attention:
  6. Inter-chunk sparsity: Only the top-$K$ highest-scoring chunks are retained for decoding.
  7. 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.
  8. 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.
Figure 2: Attention weight decay as a function of dis- tance from response tokens to prefix tokens, measured at different denoising steps. Attention decays rapidly with distance, exhibiting strong locality bias. This decay becomes more pronounced in later denoising steps as token predictions stabilize.

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.
Figure 5: Attention kernel benchmark (bf16, GQA 32/8 heads, single A100). (a) Prefilling: FlashInfer achieves the lowest latency; Flash Attention is 1.0–1.2× slower; FlexAttention adds 1.4–1.5× overhead; xFormers is 1.6– 1.8× slower. Labels show relative slowdown vs. Flash- Infer. (b) Decoding (PD separation, Ld=32, S=4 splits): After top-K selection, Split-S partitions the re- sulting cached KV sequence into S compute shards and processes them in parallel via the batch dimension.

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

BibTeX
@misc{xiong2026prefilling,
  author = {Jing Xiong and Qi Han and Shansan Gong and Yunta Hsieh and Boyuan Zheng and Chengyue Wu and Chaofan Tao and Chenyang Zhao and Ngai Wong},
  title = {{Prefilling-dLLM: Predictive Prefilling for Long-Context Inference in Diffusion Language Models}},
  year = {2026},
  eprint = {2606.10537},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2606.10537},
}
Figure