arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2504.18583cs.LGcs.PF
收藏

PARD:通过低成本并行草稿模型适应加速大语言模型推理

PARD: Accelerating LLM Inference with Low-Cost PARallel Draft Model Adaptation

Advanced Micro Devices, Inc.(先进微器件公司);Tsinghua University(清华大学)

Zihao An, Huajun Bai, Ziqiong Liu, Dong Li, Emad Barsoum

AI总结:

PARD通过低成本并行草稿模型适应技术,显著提升大语言模型推理速度,实现3.67倍加速。

摘要:

大语言模型(LLMs)的自回归性质从根本上限制了推理速度,因为每次前向传递只能生成一个令牌,并且常常受到内存带宽的瓶颈限制。推测解码已经 emerged 作为一种有前途的解决方案,采用先草稿后验证的策略来加速令牌生成。虽然EAGLE系列实现了强大的加速,但其要求为每个目标模型训练一个单独的草稿头,这会引入显著的适应成本。在本工作中,我们提出了PARD(并行草稿),一种新的推测解码方法,具有目标无关性和并行令牌预测。具体来说,PARD使一个草稿模型可以应用于整个目标模型家族,而无需为每个变体单独训练,从而最小化适应成本。同时,PARD通过在草稿阶段的单次前向传递中预测多个未来令牌,显著加速了推理。为进一步减少PARD的训练适应成本,我们提出了一种基于前缀键值状态完整性条件的Drop-token(COD)机制,使自回归草稿模型能够以低成本适应为并行草稿模型。我们的实验表明,所提出的COD方法相比传统掩码预测训练提高了3倍的草稿模型训练效率。在vLLM推理框架上,PARD在LLaMA3.1-8B上实现了高达3.67倍的加速,达到264..tokens per second,比EAGLE-3快1.15倍。我们的代码可在https://github.com/AMD-AIG-AIMA/PARD上获得。

英文摘要:

The autoregressive nature of large language models (LLMs) fundamentally limits inference speed, as each forward pass generates only a single token and is often bottlenecked by memory bandwidth. Speculative decoding has emerged as a promising solution, adopting a draft-then-verify strategy to accelerate token generation. While the EAGLE series achieves strong acceleration, its requirement of training a separate draft head for each target model introduces substantial adaptation costs. In this work, we propose \textbf{PARD (PARallel Draft)}, a novel speculative decoding method featuring \textit{target-independence} and \textit{parallel token prediction}. Specifically, PARD enables a single draft model to be applied across an entire family of target models without requiring separate training for each variant, thereby minimizing adaptation costs. Meanwhile, PARD substantially accelerates inference by predicting multiple future tokens within a single forward pass of the draft phase. To further reduce the training adaptation cost of PARD, we propose a COnditional Drop-token (COD) mechanism based on the integrity of prefix key-value states, enabling autoregressive draft models to be adapted into parallel draft models at low-cost. Our experiments show that the proposed COD method improves draft model training efficiency by \textbf{3$\times$} compared with traditional masked prediction training. On the \texttt{vLLM} inference framework, PARD achieves up to \textbf{3.67$\times$} speedup on LLaMA3.1-8B, reaching \textbf{264.88} tokens per second, which is \textbf{1.15$\times$} faster than EAGLE-3. Our code is available at https://github.com/AMD-AIG-AIMA/PARD.

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

↑