用一个模型加速多个大模型推理,速度最高提升3.67倍。
PARD: Accelerating LLM Inference with Low-Cost PARallel Draft Model Adaptation
- 一个草稿模型通用所有目标模型,无需为每个模型单独训练。
- 单次前向传播预测多个未来词元,显著提升生成效率。
- 新训练方法降低90%成本,适合部署高性能推理系统的人看。
大型语言模型的自回归特性限制了推理速度,每次前向传播仅生成一个词元,且常受内存带宽瓶颈制约。推测解码通过先生成后验证的策略成为加速方案。尽管EAGLE系列表现优异,但需为每个目标模型单独训练草稿头,导致高昂适配成本。本文提出PARD(PARallel Draft),一种具有目标无关性和并行词元预测能力的新推测解码方法。该方法使单一草稿模型可适配整个目标模型家族,无需为每个变体单独训练,极大降低适配成本。同时,PARD通过单次前向传播预测多个未来词元,显著加速推理。为进一步降低训练成本,提出基于前缀键值状态完整性的条件丢弃(COD)机制,使自回归草稿模型以低代价转为并行草稿模型。实验表明,相比传统掩码预测训练,COD提升训练效率3倍。在vLLM框架下,PARD在LLaMA3.1-8B上实现最高3.67倍加速,达到264.88词元/秒,比EAGLE-3快1.15倍。代码已开源。
原文摘要 · Abstract (English)
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.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。