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

ProPD:面向LLM并行解码的动态令牌树剪枝与生成

ProPD: Dynamic Token Tree Pruning and Generation for LLM Parallel Decoding

Peking University(北京大学);Sensetime Research(商汤科技研究院)

Shuzhang Zhong, Zebin Yang, Meng Li, Ruihao Gong, Runsheng Wang, Ru Huang

AI总结:

ProPD通过动态令牌树剪枝与生成机制,在保持上下文关系的同时降低验证开销,实现LLM并行解码效率提升1.1-3.2倍。

摘要:

生成式大语言模型(LLMs)的最新进展显著提升了自然语言处理任务的性能。然而,其效率受到自回归令牌生成固有局限性的制约。尽管已提出基于令牌树验证的并行解码方法(如Medusa)来提高解码并行度和效率,但由于其独立的令牌预测方式,这类方法往往难以维持上下文关系,并且在大树规模和批处理场景下会产生显著的验证开销。本文提出ProPD,一种基于动态令牌树剪枝与生成的高效LLM并行解码框架。ProPD具备先进的早期剪枝机制,可高效剔除无前景的令牌序列,从而提高验证效率。此外,ProPD引入动态令牌树生成算法,实时平衡验证阶段的计算量与并行度,并在不同批大小、序列长度和任务等条件下最大化整体效率。我们在多种数据集、LLMs和批大小上验证了ProPD,结果表明ProPD始终优于现有解码算法,加速比达到1.1-3.2倍。

英文摘要:

Recent advancements in generative large language models (LLMs) have significantly boosted the performance in natural language processing tasks. However, their efficiency is hampered by the inherent limitations in autoregressive token generation. While parallel decoding with token tree verification, e.g., Medusa, has been proposed to improve decoding parallelism and efficiency, it often struggles with maintaining contextual relationships due to its independent token prediction approach and incurs significant verification overhead, especially with large tree sizes and batch processing. In this paper, we propose ProPD, an efficient LLM parallel decoding framework based on dynamic token tree pruning and generation. ProPD features an advanced early pruning mechanism to efficiently eliminate unpromising token sequences to improve verification efficiency. Additionally, it introduces a dynamic token tree generation algorithm to balance the computation and parallelism of the verification phase in real-time and maximize the overall efficiency across different batch sizes, sequence lengths, and tasks, etc. We verify ProPD across a diverse set of datasets, LLMs, and batch sizes and demonstrate ProPD consistently outperforms existing decoding algorithms by 1.1-3.2x.

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

↑