arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2306.06000cs.ARcs.AI
收藏

S$^{3}$:在生成式推理期间提高GPU利用率以实现更高吞吐量

S$^{3}$: Increasing GPU Utilization during Generative Inference for Higher Throughput

Harvard University(哈佛大学)

Yunho Jin, Chun-Feng Wu, David Brooks, Gu-Yeon Wei

AI总结:

针对大语言模型生成推理中KV缓存预留内存过大导致GPU利用率低、吞吐量不足的问题,提出S³系统,通过预测输出序列长度调度查询并处理误预测,实现了6.49倍于最坏情况假设系统的吞吐量。

摘要:

使用大语言模型(LLM)生成文本会消耗大量内存。除了本就庞大的模型参数外,存储序列中先前令牌信息的键/值(KV)缓存的大小甚至可能超过模型本身。在当前的一种LLM服务框架中,这一问题更为严重——由于不知道输出序列的长度,该框架会为KV缓存预留最大序列长度的内存,以确保生成完整的序列。这限制了我们使用更小的批处理大小,导致GPU利用率降低,更重要的是吞吐量下降。我们认为,设计一个具备输出序列先验知识的系统可以缓解这一问题。为此,我们提出了S$^{3}$,该系统可预测输出序列长度,基于预测结果调度生成查询以提高设备资源利用率和吞吐量,并能处理预测失误的情况。我们提出的方法相较于假设输出序列长度为最坏情况的系统,实现了6.49倍的吞吐量提升。

英文摘要:

Generating texts with a large language model (LLM) consumes massive amounts of memory. Apart from the already-large model parameters, the key/value (KV) cache that holds information about previous tokens in a sequence can grow to be even larger than the model itself. This problem is exacerbated in one of the current LLM serving frameworks which reserves the maximum sequence length of memory for the KV cache to guarantee generating a complete sequence as they do not know the output sequence length. This restricts us to use a smaller batch size leading to lower GPU utilization and above all, lower throughput. We argue that designing a system with a priori knowledge of the output sequence can mitigate this problem. To this end, we propose S$^{3}$, which predicts the output sequence length, schedules generation queries based on the prediction to increase device resource utilization and throughput, and handle mispredictions. Our proposed method achieves 6.49$\times$ throughput over those systems that assume the worst case for the output sequence length.

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

↑