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

APAR:大语言模型可实现自动并行自回归解码

APAR: LLMs Can Do Auto-Parallel Auto-Regressive Decoding

Tsinghua University(清华大学);Zhipu AI(智谱AI)

Mingdao Liu, Aohan Zeng, Bowen Wang, Peng Zhang, Jie Tang, Yuxiao Dong

AI总结:

本文提出 APAR 方法,通过指令微调使大语言模型自主规划并并行生成文本,减少生成步数,单独使用可加速 2 倍,结合投机解码可达 4 倍,并显著提升吞吐量、降低延迟。

摘要:

大语言模型(LLMs)的大规模采用要求高效的部署策略。然而,作为大多数大语言模型文本生成基础的自回归解码过程,给实现高效推理服务带来了挑战。在本工作中,我们提出了一种并行自回归生成方法。通过在包含层次结构的通用领域数据上进行指令微调,我们使大语言模型能够独立规划其生成过程并执行自动并行自回归(APAR)生成,从而显著减少生成步数。仅使用 APAR 即可实现最高 2 倍的加速,当与投机解码结合时,加速最高可达 4 倍。此外,APAR 减少了生成过程中的键值缓存消耗和注意力计算。与最先进的推理服务框架相比,这在高吞吐量场景下带来了 20-70% 的吞吐量提升和 20-35% 的延迟降低。

英文摘要:

The massive adoption of large language models (LLMs) demands efficient deployment strategies. However, the auto-regressive decoding process, which is fundamental to how most LLMs generate text, poses challenges to achieve efficient serving. In this work, we introduce a parallel auto-regressive generation method. By instruct-tuning on general domain data that contains hierarchical structures, we enable LLMs to independently plan their generation process and perform auto-parallel auto-regressive (APAR) generation, significantly reducing the number of generation steps. APAR alone can achieve up to 2x speed-up, and when combined with speculative decoding, the speed-up can reach up to 4x. In addition, APAR reduces the key-value cache consumption and attention computation during generation. This leads to a throughput increase of 20-70% and a latency reduce of 20-35% in high-throughput scenarios, compared to state-of-the-art serving frameworks.

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

↑