让大模型内部并行迭代优化,提速近4倍且准确率提升。
COrAL: Order-Agnostic Language Modeling for Efficient Iterative Refinement
- 将迭代优化嵌入模型架构,用无序块解码并行处理
- 在GSM8K上准确率提升4.6%,推理速度最高快3.9倍
- 适合需要高速推理的复杂任务,如逻辑推理
迭代优化已成为提升大语言模型在复杂任务上能力的有效范式。然而,现有方法通常在应用或提示层实现迭代优化,依赖自回归建模,其顺序生成方式导致高推理延迟。为此,我们提出上下文感知的无序语言建模(COrAL),将迭代优化直接融入大模型架构,同时保持计算高效。该方法在可控上下文窗口内建模多个标记依赖关系,使模型在生成过程中内部执行迭代优化。利用COrAL的无序特性,我们引入滑动块级无序解码,可在上下文窗口内并行进行多标记前向预测与反向重构,从而在不增加序列开销的前提下捕捉多样依赖。实证评估显示,COrAL在推理任务中同时提升性能与速度:在GSM8K上准确率提升4.6%,在LogiQA上提升4.0%,推理速度最高达基线的3.9倍。代码已公开于https://github.com/YuxiXie/COrAL。
原文摘要 · Abstract (English)
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.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。