超越零散接受:通过最长稳定前缀实现DLMs的快速且一致推理
Beyond Scattered Acceptance: Fast and Coherent Inference for DLMs via Longest Stable Prefixes
AI总结:
通过最长稳定前缀调度器,提升DLMs推理速度3.4倍,同时保持输出质量。
摘要:
扩散语言模型(DLMs)承诺了高度并行的文本生成,但其实际推理速度常常受到次优解码调度器的限制。标准方法依赖于'零散接受'-在序列的不同位置提交高置信度的token。这种方法无意中会破坏键值(KV)缓存,破坏内存局部性,并迫使模型在不稳定token边界处进行昂贵的重复修复。为了解决这个问题,我们提出了最长稳定前缀(LSP)调度器,这是一种基于单体前缀吸收的无训练和模型无关的推理范式。在每个去噪步骤中,LSP通过一次前向传递评估token的稳定性,动态识别一个连续的左对齐稳定预测块,并在原子承诺前将其边界 snap 到自然语言或结构分隔符。这种前缀优先的拓扑结构带来了双重好处:系统上,它将碎片化的KV缓存更新转换为高效的连续追加;算法上,它在几何上缩小的活跃后缀上保留双向前瞻,大大减少了token翻转率和去噪器调用。在LLaDA-8B和Dream-7B上的广泛评估表明,LSP在严格的基准测试中,包括数学推理、代码生成、多语言(CJK)任务和创造性写作,将推理速度加快了多达3.4倍,同时匹配或略微提高输出质量。通过从根本上重构承诺拓扑,LSP弥合了DLMs理论并行性和实际硬件效率之间的差距。
英文摘要:
Diffusion Language Models (DLMs) promise highly parallel text generation, yet their practical inference speed is often bottlenecked by suboptimal decoding schedulers. Standard approaches rely on 'scattered acceptance'-committing high confidence tokens at disjoint positions throughout the sequence. This approach inadvertently fractures the Key-Value (KV) cache, destroys memory locality, and forces the model into costly, repeated repairs across unstable token boundaries. To resolve this, we present the Longest Stable Prefix (LSP) scheduler, a training-free and model-agnostic inference paradigm based on monolithic prefix absorption. In each denoising step, LSP evaluates token stability via a single forward pass, dynamically identifies a contiguous left-aligned block of stable predictions, and snaps its boundary to natural linguistic or structural delimiters before an atomic commitment. This prefix-first topology yields dual benefits: systemically, it converts fragmented KV cache updates into efficient, contiguous appends; algorithmically, it preserves bidirectional lookahead over a geometrically shrinking active suffix, drastically reducing token flip rates and denoiser calls. Extensive evaluations on LLaDA-8B and Dream-7B demonstrate that LSP accelerates inference by up to 3.4x across rigorous benchmarks including mathematical reasoning, code generation, multilingual (CJK) tasks, and creative writing while matching or slightly improving output quality. By fundamentally restructuring the commitment topology, LSP bridges the gap between the theoretical parallelism of DLMs and practical hardware efficiency.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。