arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2610.17868cs.CL
收藏

Prefilling-dLLM v2:面向长上下文扩散语言模型的学习式分块路由

Prefilling-dLLM v2: Learned Chunk Routing for Long-Context Diffusion Language Models

University of Hong Kong(香港大学);Zhejiang University(浙江大学)

Qi Han, Jing Xiong, Ziyuan Zhang, Ngai Wong

AI总结:

本文提出Prefilling-dLLM v2,通过学习式分块路由优化长上下文扩散语言模型,在RULER任务上优于NSA等稀疏方法,128K长度下解码速度较全密集注意力快172倍。

摘要:

扩散语言模型在每一步去噪过程中都会对整个上下文应用双向注意力,因此更长的上下文会大幅提升每一步的计算成本。仅在推理阶段进行稀疏化会使预训练权重保持不变,导致模型从未在其运行时采用的稀疏模式下进行训练。我们提出了Prefilling-dLLM v2,该模型通过继续训练扩散语言模型,使其利用自身的掩码令牌进行路由。每个分块的末尾会附加一个掩码,学习到的角色偏移将其标记为路由槽。每四层中,有一层的查询保留双向局部窗口和从该掩码中得分最高的K个分块;其余层则使用双向滑动窗口。我们从Dream-v0-Base-7B模型出发,通过YaRN扩展至16K上下文长度,在相同布局、键预算和密集初始化条件下,使用相同的Fast-dLLM解码器,将Prefilling-dLLM v2与双向NSA、DSA和SWA进行对比。在将YaRN因子缩放至评估长度后,Prefilling-dLLM v2在从16K到128K的所有三项RULER任务上均优于其他稀疏方法。其在128K长度下的平均准确率比次优稀疏模型NSA高出7.4个百分点,而DSA和SWA的准确率接近零。在相同长度下,其解码速度比全密集注意力快172倍。

英文摘要:

Diffusion language models apply bidirectional attention over the whole context at every denoising step, so a longer context makes each step substantially more expensive. Sparsifying only at inference leaves the pretrained weights unchanged, so the model is never trained under the sparse pattern it runs with. We propose Prefilling-dLLM v2, which continues training a diffusion language model so that it routes with its native mask token. One mask is appended at the end of each chunk, and a learned role offset marks it as a routing slot. On every fourth layer, a query keeps a bidirectional local window and the top-K chunks scored from that mask; the other layers use a bidirectional sliding window. Starting from Dream-v0-Base-7B extended to 16K with YaRN, we compare Prefilling-dLLM v2 with bidirectional NSA, DSA, and SWA under the same layout, key budget, and dense initialization, using the same Fast-dLLM decoder. With the YaRN factor scaled to the evaluation length, Prefilling-dLLM v2 leads the other sparse methods on all three RULER tasks from 16K to 128K. Its mean accuracy at 128K is 7.4 points above NSA, the next sparse model, while DSA and SWA remain near zero. At the same length, decoding is 172x faster than with full dense attention.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑