COrAL:用于高效迭代优化的顺序无关语言建模
COrAL: Order-Agnostic Language Modeling for Efficient Iterative Refinement
AI总结:
提出COrAL,将迭代优化融入LLM架构,通过滑动块级顺序无关解码实现多token并行前向预测与后向重构,在提升推理任务准确率的同时显著加速推理。
摘要:
迭代优化已成为增强大型语言模型(LLM)在复杂任务上能力的有效范式。然而,现有方法通常在应用或提示层面实现迭代优化,并依赖于自回归(AR)建模。AR模型中顺序生成token会导致高推理延迟。为克服这些挑战,我们提出了上下文级顺序无关语言建模(COrAL),它将迭代优化直接融入LLM架构,同时保持计算效率。该方法在可管理的上下文窗口内建模多个token依赖关系,使模型能够在生成过程中内部执行迭代优化。利用COrAL的顺序无关特性,我们引入了滑动块级顺序无关解码,在上下文窗口内执行多token前向预测和后向重构。这允许模型在滑动块中并行迭代优化其输出,有效捕获多样依赖关系,而无需顺序生成的高推理成本。在推理任务上的实证评估表明,COrAL提升了性能和推理速度,分别在GSM8K上实现了4.6%的绝对准确率提升,在LogiQA上提升了4.0%,并且相比下一个token基线实现了高达3.9倍的推理加速。代码生成的初步结果显示,由于顺序无关输出中的不一致性,通过率有所下降,凸显了固有的质量与速度权衡。我们的代码已在https://github.com/YuxiXie/COrAL公开。
英文摘要:
Iterative refinement has emerged as an effective paradigm for enhancing the capabilities of large language models (LLMs) on complex tasks. However, existing approaches typically implement iterative refinement at the application or prompting level, relying on autoregressive (AR) modeling. The sequential token generation in AR models can lead to high inference latency. To overcome these challenges, we propose Context-Wise Order-Agnostic Language Modeling (COrAL), which incorporates iterative refinement directly into the LLM architecture while maintaining computational efficiency. Our approach models multiple token dependencies within manageable context windows, enabling the model to perform iterative refinement internally during the generation process. Leveraging the order-agnostic nature of COrAL, we introduce sliding blockwise order-agnostic decoding, which performs multi-token forward prediction and backward reconstruction within context windows. This allows the model to iteratively refine its outputs in parallel in the sliding block, effectively capturing diverse dependencies without the high inference cost of sequential generation. Empirical evaluations on reasoning tasks demonstrate that COrAL improves performance and inference speed, respectively, achieving absolute accuracy gains of $4.6\%$ on GSM8K and $4.0\%$ on LogiQA, along with inference speedups of up to $3.9\times$ over next-token baselines. Preliminary results on code generation indicate a drop in pass rates due to inconsistencies in order-agnostic outputs, highlighting the inherent quality--speed trade-off. Our code is publicly available at https://github.com/YuxiXie/COrAL.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。