要約
トレーニングされたモデルがユーザープロンプトに応じて一度に1つの単語を生成する大規模な言語モデル(LLM)推論は、レイテンシとリソースの使用率を最適化するための効率的なスケジューリングを必要とする計算的に集中的なプロセスです。
LLM推論の重要な課題は、冗長計算を削減しますが、メモリの制約を導入するキー値(KV)キャッシュの管理です。
この作業では、KVキャッシュの制約とのLLM推論を理論的にモデル化し、KVキャッシュのメモリを効果的に管理しながら推論の遅延を最小限に抑える新しいバッチおよびスケジューリングアルゴリズムを提案します。
より具体的には、次の貢献をします。
まず、LLM推論でのスケジューリングのためのオンラインアルゴリズムのパフォーマンスを評価するために、完全な将来の情報の下で最小総推論潜時を計算する整数プログラムとして定式化された後知恵最適ベンチマークを導入します。
第二に、到着プロセスが任意である場合、決定論的なオンラインアルゴリズムが一定の競争比を達成できないことを証明します。
第三に、整数プログラムを大規模に解決する計算上の扱いやすさに動機付けられ、多項式時間オンラインスケジューリングアルゴリズムを提案し、特定の条件下で一定の競争比を達成できることを示します。
また、アルゴリズムの強力な経験的パフォーマンスを、合成データセットの後知恵最適と比較することで実証します。
最後に、A100 GPUのLLAMA2-70Bモデルをシミュレートする現実世界の公開LLM推論データセットで経験的評価を実施し、アルゴリズムがベンチマークアルゴリズムを大幅に上回ることを示します。
全体として、私たちの結果は、より持続可能で費用対効果の高いLLM展開への道を提供します。
要約(オリジナル)
Large Language Model (LLM) inference, where a trained model generates text one word at a time in response to user prompts, is a computationally intensive process requiring efficient scheduling to optimize latency and resource utilization. A key challenge in LLM inference is the management of the Key-Value (KV) cache, which reduces redundant computations but introduces memory constraints. In this work, we model LLM inference with KV cache constraints theoretically and propose a novel batching and scheduling algorithm that minimizes inference latency while effectively managing the KV cache’s memory. More specifically, we make the following contributions. First, to evaluate the performance of online algorithms for scheduling in LLM inference, we introduce a hindsight optimal benchmark, formulated as an integer program that computes the minimum total inference latency under full future information. Second, we prove that no deterministic online algorithm can achieve a constant competitive ratio when the arrival process is arbitrary. Third, motivated by the computational intractability of solving the integer program at scale, we propose a polynomial-time online scheduling algorithm and show that under certain conditions it can achieve a constant competitive ratio. We also demonstrate our algorithm’s strong empirical performance by comparing it to the hindsight optimal in a synthetic dataset. Finally, we conduct empirical evaluations on a real-world public LLM inference dataset, simulating the Llama2-70B model on A100 GPUs, and show that our algorithm significantly outperforms the benchmark algorithms. Overall, our results offer a path toward more sustainable and cost-effective LLM deployment.
arxiv情報
著者 | Patrick Jaillet,Jiashuo Jiang,Konstantina Mellou,Marco Molinaro,Chara Podimata,Zijie Zhou |
発行日 | 2025-05-20 16:29:52+00:00 |
arxivサイト | arxiv_id(pdf) |
提供元, 利用サービス
arxiv.jp, Google