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

要約

大規模言語モデル (LLM) を使用してテキストを生成すると、大量のメモリが消費されます。
すでに大規模なモデル パラメーターとは別に、シーケンス内の以前のトークンに関する情報を保持するキー/値 (KV) キャッシュは、モデル自体よりもさらに大きくなる可能性があります。
この問題は、出力シーケンスの長さがわからないため、完全なシーケンスの生成を保証するために KV キャッシュ用のメモリの最大シーケンス長を予約する現在の LLM サービス フレームワークの 1 つではさらに悪化します。
これにより、より小さいバッチ サイズの使用が制限され、GPU 使用率が低下し、何よりもスループットが低下します。
私たちは、出力シーケンスに関する先験的な知識を備えたシステムを設計することで、この問題を軽減できると主張します。
この目的のために、出力シーケンスの長さを予測し、その予測に基づいて生成クエリをスケジュールして、デバイスのリソース使用率とスループットを向上させ、予測ミスを処理する S$^{3}$ を提案します。
私たちが提案した方法は、出力シーケンス長の最悪のケースを想定したシステムに対して 6.49$\times$ のスループットを達成します。

要約(オリジナル)

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.

arxiv情報

著者 Yunho Jin,Chun-Feng Wu,David Brooks,Gu-Yeon Wei
発行日 2023-06-09 16:13:43+00:00
arxivサイト arxiv_id(pdf)

提供元, 利用サービス

arxiv.jp, Google

カテゴリー: cs.AI, cs.AR パーマリンク