扩散语言模型天生具有长度感知能力
Diffusion Language Models Are Natively Length-Aware
AI总结:
本文提出通过动态裁剪上下文窗口减少扩散语言模型生成步骤,从而提升效率并减少计算消耗,在多个基准测试中实现显著的性能提升。
摘要:
与自回归语言模型不同,后者在预测结束符(EoS)token后终止可变长度生成,而扩散语言模型(DLMs)则在固定最大长度的上下文窗口中进行预定次数的去噪步骤。然而,这一过程与所需响应长度无关,导致在推理和聊天任务中大多数较短响应产生计算浪费。为了解决这一问题,我们推测潜在提示表示包含足够的信息来估计所需输出长度。我们为这一现象提供了实证证据,并提出了一种零样本机制,在生成开始前动态裁剪上下文窗口,从而减少扩散步骤并实现显著的计算节省。我们在四个具有不同任务的基准测试上评估了我们的方法——GSM8K(推理)、HumanEval(代码生成)、IfEval(指令遵循)和LongFormQA(问答),揭示了在最小性能影响下的巨大效率提升。我们报告了所有任务中FLOPs的显著减少,没有统计上显著的性能下降,并在2个任务中实现了显著的性能提升。
英文摘要:
Unlike autoregressive language models, which terminate variable-length generation upon predicting an End-of-Sequence (EoS) token, Diffusion Language Models (DLMs) operate over a fixed maximum-length context window for a predetermined number of denoising steps. However, this process is independent of the required response length, resulting in computational waste for the majority of short responses common in reasoning and chat tasks. To address this problem, we conjecture that the latent prompt representation contains sufficient information to estimate the required output length. We provide empirical evidence for this phenomenon and propose a zero-shot mechanism to dynamically crop the context window before generation begins, leading to fewer diffusion steps and substantial computational savings. We evaluate our approach on four benchmarks with diverse tasks -- GSM8K (reasoning), HumanEval (code generation), IfEval (instruction following), and LongFormQA (question answering) -- revealing massive efficiency gains at minimal performance impact. We report significant reductions in FLOPs across all tasks, with no statistically significant performance degradation, and significant performance improvements in 2 out of 4 tasks.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。