arXivDaily arXiv每日学术速递 周一至周五更新
感恩节,周五至周末无更新,大家顺遂。周一再来吧
arXiv 2502.04557cs.LGcs.ITmath.IT
收藏

通过顺序近似验证加速投机解码

Speeding up Speculative Decoding via Sequential Approximate Verification

Department of Electrical and Computer Engineering, University of Arizona, Tucson, US(电气与计算机工程系,亚利桑那大学,图森,美国)

Meiyu Zhong, Noel Teku, Ravi Tandon

AI总结:

SPRINTER通过训练低复杂度验证器进行顺序近似验证,减少对目标LLM的调用,在保持生成质量的同时进一步降低投机解码的延迟。

摘要:

投机解码(Speculative Decoding, SD)是一种近期提出的技术,用于使用大型语言模型(LLMs)实现更快的推理。SD通过使用较小的草稿LLM自回归生成一系列令牌,并使用较大的目标LLM进行并行验证以确保统计一致性。然而,定期对目标LLM进行并行调用以进行验证,阻碍了SD实现更低的延迟。我们提出了SPRINTER,它利用一个低复杂度的验证器,该验证器经过训练以预测从草稿LLM生成的令牌是否会被目标LLM接受。通过执行顺序近似验证,SPRINTER不需要目标LLM的验证,并且仅在令牌被认为不可接受时才被调用。这减少了对较大LLM的调用次数,实现了进一步的加速和更低的计算成本。我们对SPRINTER进行了理论分析,检查了生成令牌的统计特性,以及作为验证器函数的预期延迟减少。我们在多个数据集和模型对上评估了SPRINTER,证明近似验证仍能保持高质量的生成,同时进一步降低延迟。

英文摘要:

Speculative Decoding (SD) is a recently proposed technique for faster inference using Large Language Models (LLMs). SD operates by using a smaller draft LLM for autoregressively generating a sequence of tokens and a larger target LLM for parallel verification to ensure statistical consistency. However, periodic parallel calls to the target LLM for verification prevent SD from achieving even lower latencies. We propose SPRINTER, which utilizes a low-complexity verifier trained to predict if tokens generated from a draft LLM would be accepted by the target LLM. By performing sequential approximate verification, SPRINTER does not require verification by the target LLM and is only invoked when a token is deemed unacceptable. This reduces the number of calls to the larger LLM, achieving further speedups and lower computation cost. We present a theoretical analysis of SPRINTER, examining the statistical properties of the generated tokens, as well as the expected reduction in latency as a function of the verifier. We evaluate SPRINTER on several datasets and model pairs, demonstrating that approximate verification can still maintain high quality generation while further reducing latency.

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

↑