Stateful Large Language Model Serving with Pensieve

要約

大規模言語モデル (LLM) は現在非常に人気があり、これを効率的に提供することが重要です。
既存の LLM サービス システムは、リクエスト全体にわたってステートレスです。
その結果、LLM が複数ターンの会話の一般的な設定で使用される場合、各ターンでサービス提供システムによるリクエストとともに増大する会話履歴のログを処理する必要があり、結果として処理が繰り返されることになります。
この論文では、マルチターン会話 LLM サービス用に最適化されたシステム $Pensieve$ を設計します。
$Pensieve$ は、重複した処理を避けるために以前に処理された履歴をキャッシュすることで、リクエスト間で会話の状態を維持します。
$Pensieve$ の多層キャッシュ戦略では、GPU と CPU メモリの両方を利用して、キャッシュされたデータを効率的に保存および取得できます。
また、$Pensieve$ は、不連続メモリ上に分散された GPU キャッシュを使用して、複数の入力トークン間のアテンションをサポートするために、最近の PagedAttendance カーネルを一般化します。
私たちの評価では、$Pensieve$ が vLLM および TensorRT-LLM の $1.14$ ~ $3.0\ 倍のスループットを達成し、レイテンシーを大幅に削減できることがわかりました。

要約(オリジナル)

Large Language Models (LLMs) are wildly popular today and it is important to serve them efficiently. Existing LLM serving systems are stateless across requests. Consequently, when LLMs are used in the common setting of multi-turn conversations, a growing log of the conversation history must be processed alongside any request by the serving system at each turn, resulting in repeated processing. In this paper, we design $Pensieve$, a system optimized for multi-turn conversation LLM serving. $Pensieve$ maintains the conversation state across requests by caching previously processed history to avoid duplicate processing. $Pensieve$’s multi-tier caching strategy can utilize both GPU and CPU memory to efficiently store and retrieve cached data. $Pensieve$ also generalizes the recent PagedAttention kernel to support attention between multiple input tokens with a GPU cache spread over non-contiguous memory. Our evaluation shows that $Pensieve$ can achieve $1.14$-$3.0\times$ the throughput of vLLM and TensorRT-LLM and significantly reduce latency.

arxiv情報

著者 Lingfan Yu,Jinkun Lin,Jinyang Li
発行日 2024-10-07 17:21:57+00:00
arxivサイト arxiv_id(pdf)

提供元, 利用サービス

arxiv.jp, Google

カテゴリー: cs.DC, cs.LG パーマリンク