要約
大規模な言語モデル(LLM)は、長いシーケンスの処理において顕著な可能性を示していますが、これらの長いコンテストモデルを効率的に提供することは、プレフィング段階の2次計算の複雑さと、デコード段階のKVキャッシュの大きなメモリフットプリントのために依然として困難なままです。
。
これらの問題に対処するために、ハイブリッドスパースの注意を払って長いシーケンスLLMを加速する効率的なシステムであるLserveを導入します。
この方法は、さまざまなハードウェアに優しい、構造化されたスパース性パターンを統合して、注意を積み、それほど重要ではないトークンでの計算がブロックでスキップされる単一のフレームワークに注意を整えることができます。
LSERVEは、長いコンテキストLLMの注意における静的および動的なスパースの互換性を示しています。
この設計により、これらの最適化を組み合わせることにより、乗法高速化が可能になります。
具体的には、注目ヘッドの半分を、充填段階とデコード段階の両方で、ほぼフリーストリーミングヘッドに変換します。
さらに、コンテキストの長さに関係なく、長いコンテキスト機能を維持するには、一定のKVページのみが必要であることがわかります。
次に、クエリ中心の類似性に基づいてKVページを動的にプルーネする階層KVページ選択ポリシーを設計します。
平均して、LSERVEはLLMの充填を最大2.9倍に加速し、VLLMで1.3-2.1xずつデコードし、長いコンテキストの精度を維持します。
コードはhttps://github.com/mit-han-lab/omniserveでリリースされます。
要約(オリジナル)
Large language models (LLMs) have shown remarkable potential in processing long sequences, yet efficiently serving these long-context models remains challenging due to the quadratic computational complexity of attention in the prefilling stage and the large memory footprint of the KV cache in the decoding stage. To address these issues, we introduce LServe, an efficient system that accelerates long-sequence LLM serving via hybrid sparse attention. This method unifies different hardware-friendly, structured sparsity patterns for both prefilling and decoding attention into a single framework, where computations on less important tokens are skipped block-wise. LServe demonstrates the compatibility of static and dynamic sparsity in long-context LLM attention. This design enables multiplicative speedups by combining these optimizations. Specifically, we convert half of the attention heads to nearly free streaming heads in both the prefilling and decoding stages. Additionally, we find that only a constant number of KV pages is required to preserve long-context capabilities, irrespective of context length. We then design a hierarchical KV page selection policy that dynamically prunes KV pages based on query-centric similarity. On average, LServe accelerates LLM prefilling by up to 2.9x and decoding by 1.3-2.1x over vLLM, maintaining long-context accuracy. Code is released at https://github.com/mit-han-lab/omniserve.
arxiv情報
著者 | Shang Yang,Junxian Guo,Haotian Tang,Qinghao Hu,Guangxuan Xiao,Jiaming Tang,Yujun Lin,Zhijian Liu,Yao Lu,Song Han |
発行日 | 2025-02-20 18:59:52+00:00 |
arxivサイト | arxiv_id(pdf) |
提供元, 利用サービス
arxiv.jp, Google