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

Minions:通过聚合式投机执行加速大语言模型推理

Minions: Accelerating Large Language Model Inference with Aggregated Speculative Execution

Siqi Wang, Hailong Yang, Xuezhu Wang, Tongxuan Liu, Pengbo Wang, Xuning Liang, Kejie Ma, Tianyu Feng, Xin You, Yongjun Bao, Yi Liu, Zhongzhi Luan, Depei Qian

AI总结:

针对大语言模型自回归推理效率低、现有投机解码接受率不足的问题,本文提出Minions系统,通过多小型投机模型多数投票、自适应投机长度与流水线机制,实现了更优的推理吞吐量与延迟表现。

摘要:

大语言模型(LLM)近期因在各领域的出色能力引发了激增的研究兴趣。然而,实现高效的LLM推理颇具挑战性,因为其采用自回归解码机制,每次仅能生成一个token。尽管已有研究工作采用剪枝或量化技术来加速LLM推理,但这类方法通常需要对LLM进行微调,会产生高昂的时间与经济成本。与此同时,投机解码方法被提出,即利用小型投机模型(SSM)来加速LLM的推理,但SSM的低接受率以及LLM的高验证成本限制了推理性能的进一步提升。本文提出了Minions——一种通过集体自适应投机生成来加速LLM推理的LLM推理系统。具体而言,Minions提出了一种多数投票机制,利用多个SSM共同推测LLM的输出,在不给LLM带来过高计算成本的前提下提升推理性能。为了更好地权衡SSM推测的token数量与LLM的验证成本,Minions提出了一种自适应机制,可动态确定SSM的最优投机长度,能在不同模型、数据集和超参数设置下实现更优的推理性能。此外,Minions高效解耦了SSM解码与LLM验证过程,并采用流水线执行机制进一步提升LLM的推理性能。通过与当前最先进的LLM推理系统对比,我们证明Minions能够实现更高的推理吞吐量与更短的推理时间。

英文摘要:

Large language models (LLM) have recently attracted surging interest due to their outstanding capabilities across various domains. However, enabling efficient LLM inference is challenging due to its autoregressive decoding that generates tokens only one at a time. Although research works apply pruning or quantization to speed up LLM inference, they typically require fine-tuning the LLM, incurring significant time and economic costs. Meanwhile, speculative decoding has been proposed to use small speculative models (SSMs) to accelerate the inference of LLM. However, the low acceptance rate of SSM and the high verification cost of LLM prohibit further performance improvement of inference. In this paper, we propose Minions, an LLM inference system that accelerates LLM inference with a collective and adaptive speculative generation. Specifically, Minions proposes a majority-voted mechanism to leverage multiple SSMs to jointly speculate the outputs of LLM, which improves the inference performance without introducing prohibitive computation costs for LLM. To better trade off the number of tokens speculated from SSM and the verification cost of LLM, Minions proposes an adaptive mechanism to dynamically determine the optimal speculation length of SSM, which can achieve better inference performance across different models, datasets, and hyper-parameters. In addition, Minions decouples the SSM decoding and LLM verification efficiently and adopts a pipelined execution mechanism to further improve the inference performance of LLM. By comparing with the state-of-the-art LLM inference systems, we demonstrate that Minions can achieve higher inference throughput and lower inference time.

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

↑