Falcon通过优化生成策略,让大模型推理速度提升近3.5倍。
Falcon: Faster and Parallel Inference of Large Language Models through Enhanced Semi-Autoregressive Drafting and Custom-Designed Decoding Tree
- 采用耦合序列观察蒸馏增强词元间依赖,提升推测准确性。
- 自定义解码树支持单次前向传播生成多词元,接受率显著提高。
- 仅用两层Transformer架构,即可实现比现有方法更快的推理速度。
如何在最小化起草延迟的同时保持高推测准确率,以提升大语言模型的推理速度,仍是推测解码中的关键挑战。本文提出Falcon,一种创新的半自回归推测解码框架,旨在同时提升起草器的并行性与输出质量。Falcon引入耦合序列观察蒸馏技术,强化同一块内词元间的依赖关系,从而提高推测准确性,并提供了完整的理论分析以揭示其内在机制。此外,提出自定义解码树结构,使起草器可在一次前向传播中生成多个词元,并按需进行多次前向传播,大幅增加起草词元数量,显著提升整体接受率。在MT-Bench、HumanEval和GSM8K等基准数据集上的全面评估表明,Falcon在Vicuna和LLaMA2-Chat模型系列上实现了2.91x至3.51x的无损加速比,优于Eagle、Medusa、Lookahead、SPS和PLD等现有方法,且起草器架构仅相当于两个Transformer层。
原文摘要 · Abstract (English)
Striking an optimal balance between minimal drafting latency and high speculation accuracy to enhance the inference speed of Large Language Models remains a significant challenge in speculative decoding. In this paper, we introduce Falcon, an innovative semi-autoregressive speculative decoding framework fashioned to augment both the drafter's parallelism and output quality. Falcon incorporates the Coupled Sequential Glancing Distillation technique, which fortifies inter-token dependencies within the same block, leading to increased speculation accuracy. We offer a comprehensive theoretical analysis to illuminate the underlying mechanisms. Additionally, we introduce a Custom-Designed Decoding Tree, which permits the drafter to generate multiple tokens in a single forward pass and accommodates multiple forward passes as needed, thereby boosting the number of drafted tokens and significantly improving the overall acceptance rate. Comprehensive evaluations on benchmark datasets such as MT-Bench, HumanEval, and GSM8K demonstrate Falcon's superior acceleration capabilities. The framework achieves a lossless speedup ratio ranging from 2.91x to 3.51x when tested on the Vicuna and LLaMA2-Chat model series. These results outstrip existing speculative decoding methods for LLMs, including Eagle, Medusa, Lookahead, SPS, and PLD, while maintaining a compact drafter architecture equivalent to merely two Transformer layers.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。