arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2508.08192cs.CL
收藏

大规模 Llama 的高效投机解码:挑战与解决方案

Efficient Speculative Decoding for Llama at Scale: Challenges and Solutions

GenAI and Infra Teams at Meta(Meta 生成AI与基础设施团队)
Bangsheng Tang, Carl Chengyan Fu, Fei Kou, Grigory Sizov, Haoci Zhang, Jason Park, Jiawen Liu, Jie You, Qirui Yang, Sachin Mehta, Shengyong Cai, Xiaodong Wang, … 展开作者

Bangsheng Tang, Carl Chengyan Fu, Fei Kou, Grigory Sizov, Haoci Zhang, Jason Park, Jiawen Liu, Jie You, Qirui Yang, Sachin Mehta, Shengyong Cai, Xiaodong Wang, Xingyu Liu, Yunlu Li, Yanjun Zhou, Wei Wei, Zhiwei Zhao, Zixi Qi, Adolfo Victoria, Aya Ibrahim, Bram Wasti, Changkyu Kim, Daniel Haziza, Fei Sun, Giancarlo Delfin, Emily Guo, Jialin Ouyang, Jaewon Lee, Jianyu Huang, Jeremy Reizenstein, Lu Fang, Quinn Zhu, Ria Verma, Vlad Mihailescu, Xingwen Guo, Yan Cui, Ye Hu, Yejin Lee

AI总结:

本文针对大规模生产环境中 Llama 模型投机解码面临的 GPU 工程挑战,提出了基于 EAGLE 的训练与推理优化技术,实现了最先进推理延迟并在大批大小下获得 1.4 至 2.0 倍加速。

摘要:

投机解码是加速大语言模型推理速度的标准方法。然而,将其扩展到生产环境面临多项工程挑战,包括在 GPU 上高效实现不同操作(如树形注意力和多轮投机解码)。本文详细介绍了我们为实现生产规模的基于 EAGLE 的 Llama 模型投机解码而实施的训练与推理优化技术。通过这些改进,我们为 Llama 模型实现了新的最先进推理延迟。例如,Llama4 Maverick 在 8 块 NVIDIA H100 GPU 上以每 token 约 4 ms 的速度进行解码(批大小为 1),比此前已知最佳方法快 10%。此外,对于基于 EAGLE 的投机解码,我们的优化在生产规模下对大批大小实现了 1.4 倍至 2.0 倍的加速。

英文摘要:

Speculative decoding is a standard method for accelerating the inference speed of large language models. However, scaling it for production environments poses several engineering challenges, including efficiently implementing different operations (e.g., tree attention and multi-round speculative decoding) on GPU. In this paper, we detail the training and inference optimization techniques that we have implemented to enable EAGLE-based speculative decoding at a production scale for Llama models. With these changes, we achieve a new state-of-the-art inference latency for Llama models. For example, Llama4 Maverick decodes at a speed of about 4 ms per token (with a batch size of one) on 8 NVIDIA H100 GPUs, which is 10% faster than the previously best known method. Furthermore, for EAGLE-based speculative decoding, our optimizations enable us to achieve a speed-up for large batch sizes between 1.4x and 2.0x at production scale.

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

↑