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

Cerberus:利用自适应并行解码与顺序知识增强实现高效推理

Cerberus: Efficient Inference with Adaptive Parallel Decoding and Sequential Knowledge Enhancement

Guangdong Laboratory of Artificial Intelligence and Digital Economy (SZ)(广东省人工智能与数字经济实验室(深圳));Shenzhen University(深圳大学)

Yuxuan Liu, Wenyuan Li, Laizhong Cui, Hailiang Yang

AI总结:

Cerberus提出自适应并行解码框架,通过门控机制动态选择解码策略,并在保持并行执行的同时引入顺序知识,实现最高2.12倍加速,在加速比和生成质量上均优于Medusa。

摘要:

大型语言模型(LLMs)由于依赖自回归解码,常常面临推理速度瓶颈。近年来,并行解码在提升推理效率方面展现出显著潜力。然而,我们发现现有并行解码框架存在两个关键问题:(1)解码头无法在预测准确性与执行并行性之间取得平衡;(2)并行解码并非通用解决方案,在某些具有挑战性的解码步骤上可能带来不必要的开销。为解决这些问题,我们提出Cerberus,一个自适应并行解码框架,引入门控机制使LLMs能够在每个解码步骤自适应地选择合适的解码方法,同时引入一种新的解码头范式,在保持执行并行性的同时引入顺序知识。实验结果表明,与自回归解码相比,Cerberus可实现高达2.12倍的加速,并且优于领先的并行解码框架之一Medusa,加速提升10%至30%,同时生成质量更优。

英文摘要:

Large language models (LLMs) often face a bottleneck in inference speed due to their reliance on auto-regressive decoding. Recently, parallel decoding has shown significant promise in enhancing inference efficiency. However, we have identified two key issues with existing parallel decoding frameworks: (1) decoding heads fail to balance prediction accuracy and the parallelism of execution, and (2) parallel decoding is not a universal solution, as it can bring unnecessary overheads at some challenging decoding steps. To address these issues, we propose Cerberus, an adaptive parallel decoding framework introduces the gating mechanism to enable the LLMs to adaptively choose appropriate decoding approaches at each decoding step, along with introducing a new paradigm of decoding heads that introduce the sequential knowledge while maintaining execution parallelism. The experiment results demonstrate that the Cerberus can achieve up to 2.12x speed up compared to auto-regressive decoding, and outperforms one of the leading parallel decoding frameworks, Medusa, with a 10% - 30% increase in acceleration and superior generation quality.

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

↑