Skip to main content
QUICK REVIEW

[論文レビュー] S$^{3}$: Increasing GPU Utilization during Generative Inference for Higher Throughput

Yunho Jin, Chun-Feng Wu|arXiv (Cornell University)|Jun 9, 2023
Topic Modeling被引用数 7
ひとこと要約

S3は出力系列長を予測してバッチ化と生成推論のスケジューリングを行い、TransformerベースのLLMのGPU利用率とスループットを向上させるとともに、誤予測を処理します。

ABSTRACT

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.

研究の動機と目的

  • autoregressive LLM推論におけるKVキャッシュの成長によるメモリ制約のGPU利用問題を動機付ける。
  • 遅延SLOの下でスループットを向上させるための系列長予測とスケジューリングフレームワーク(S3)を提案する。
  • 誤予測に対処し、モデルの整合性を損なうことなく信頼性を維持する機構を開発する。
  • 複数のモデルスケールにわたってベースラインシステムよりもスループットを改善を実証する。

提案手法

  • DistilBERTベースの予測子を微調整して出力系列長を10バケットに高精度で分類する(例:Alpacaで98.61%)。
  • ORCAに着想を得た単一HBM容量制約と選択的バッチ処理を用いたビンパック風の長さ認識スケジューラを実装する。
  • 誤予測を検知する監督者を用いて過長なKVキャッシュを未然に防ぎ、データを再配置し、オンラインで予測子を再訓練する。
  • 予測子、スケジューラ、監督者をFasterTransformer上に統合し、メモリ制約を守りつつスループットを最大化する。
  • 大規模モデルをGPU間でパイプライン分割してバッチサイズを増やし、スループットを維持する。
Figure 1 : Latency versus throughput trade-off among different models (left) and the number of GPUs (right, distributing GPT-3 to 6, 8, and 10 GPUs) when generating 60 tokens, inspired by FlexGen [ 6 ] . The markers in the lines represent batch sizes, from 1 to the maximum batch size that can be loa
Figure 1 : Latency versus throughput trade-off among different models (left) and the number of GPUs (right, distributing GPT-3 to 6, 8, and 10 GPUs) when generating 60 tokens, inspired by FlexGen [ 6 ] . The markers in the lines represent batch sizes, from 1 to the maximum batch size that can be loa

実験結果

リサーチクエスチョン

  • RQ1出力系列長を予測することは、GPU HBMs容量を超えずに実現可能なバッチサイズを増やせるのか。
  • RQ2長さ認識スケジューリングは、オンライン(SLO)とオフラインのシナリオでスループットとレイテンシにどのような影響を与えるのか。
  • RQ3誤予測とメモリ断片化への対処における監督者のオーバーヘッドと頑健性はどの程度か。

主な発見

  • S3は最悪ケースの出力長を想定したシステムより最大で6.49×のスループット向上を達成。
  • オンラインシナリオでトークンあたり0.1875秒のレイテンシSLOは、S3が同じSLOを尊重しつつORCAより最大6.49×多くの系列を生成。
  • S3はモデルサイズに応じてOracle(完璧な予測子)に対し9.34%〜40.52%の範囲で一致できる(出力長を事前に正確には知らないにもかかわらず)。
  • 6 GPUを使用した場合、S3は10 GPUの素のシステムとほぼ同等のスループットを生成し、費用対効果を改善。
  • 予測子は高精度(Alpacaでバケット予測90%超の98.61%)を達成し、予測子待ち時間はほとんどなく(3.7 ms)。
  • オーバーヘッドと誤予測ペナルティは小さく(生成時間の平均11%)、長い生成で償却される。
Figure 2 : (a) GPT-J’s and (b)GPT-NEOX’s NVIDIA A100 compute utilization.
Figure 2 : (a) GPT-J’s and (b)GPT-NEOX’s NVIDIA A100 compute utilization.

より良い研究を、今すぐ始めましょう

論文設計から論文執筆まで、研究時間を劇的に削減しましょう。

クレジットカード登録不要

このレビューはAIが作成し、人間の編集者が確認しました。