要約
量子化は、大規模な言語モデル(LLM)推論を加速できます。
INT8の量子化を超えて、研究コミュニティはINT4などのさらに低い精度を積極的に調査しています。
それにもかかわらず、最先端のINT4量子化技術は、低バッチ、エッジLLM推論のみを加速し、大手バッチ、クラウドベースのLLMサービングでパフォーマンスの向上を実現できません。
重大な問題を明らかにします。GPUの重みまたは部分的合計のいずれかを非難する際に、既存のINT4量子化方法が重大なランタイムオーバーヘッド(20〜90%)に苦しんでいます。
この課題に対処するために、4ビット重量、8ビット活性化、4ビットkVキャッシュを備えたW4A8KV4量子化アルゴリズムであるQOQを導入します。
QOQは、ラテン語で4-8-4を表すQuattuor-Octo-quattuorの略です。
QOQは、測定されたスピードアップを達成するQServe Incerence Libraryによって実装されています。
QServeを推進する重要な洞察は、GPUでサービスを提供するLLMの効率が、低スループットCUDAコアの操作に重大な影響を受けていることです。
この洞察に基づいて、QOQアルゴリズムでは、W4A8 GEMMで低脱量化オーバーヘッドを可能にする進行性の量子化を導入します。
さらに、4ビットkV量子化によって発生する精度分解を効果的に軽減するために、スムージーアテンションを開発します。
QSERVEシステムでは、計算された重量の並べ替えを実行し、レジスタレベルの並列性を活用して、脱量化の遅延を減らします。
また、KV4量子化によってもたらされるパフォーマンスゲインを活用して、メモリバウンドの融合を行います。
その結果、QSERVEは、A100で1.2倍、L40Sで1.4倍で1.2倍の最大達成可能なサービングスループットを改善します。
Tensort-llmと比較して、Qwen1.5-72bはA100で2.4倍、L40で3.5倍。
驚くべきことに、L40S GPUのQServeは、A100でTensort-LLMよりもさらに高いスループットを達成できます。
したがって、QSERVEは、LLMの費用を3倍効果的に削減します。
コードはhttps://github.com/mit-han-lab/omniserveで入手できます。
要約(オリジナル)
Quantization can accelerate large language model (LLM) inference. Going beyond INT8 quantization, the research community is actively exploring even lower precision, such as INT4. Nonetheless, state-of-the-art INT4 quantization techniques only accelerate low-batch, edge LLM inference, failing to deliver performance gains in large-batch, cloud-based LLM serving. We uncover a critical issue: existing INT4 quantization methods suffer from significant runtime overhead (20-90%) when dequantizing either weights or partial sums on GPUs. To address this challenge, we introduce QoQ, a W4A8KV4 quantization algorithm with 4-bit weight, 8-bit activation, and 4-bit KV cache. QoQ stands for quattuor-octo-quattuor, which represents 4-8-4 in Latin. QoQ is implemented by the QServe inference library that achieves measured speedup. The key insight driving QServe is that the efficiency of LLM serving on GPUs is critically influenced by operations on low-throughput CUDA cores. Building upon this insight, in QoQ algorithm, we introduce progressive quantization that can allow low dequantization overhead in W4A8 GEMM. Additionally, we develop SmoothAttention to effectively mitigate the accuracy degradation incurred by 4-bit KV quantization. In the QServe system, we perform compute-aware weight reordering and take advantage of register-level parallelism to reduce dequantization latency. We also make fused attention memory-bound, harnessing the performance gain brought by KV4 quantization. As a result, QServe improves the maximum achievable serving throughput of Llama-3-8B by 1.2x on A100, 1.4x on L40S; and Qwen1.5-72B by 2.4x on A100, 3.5x on L40S, compared to TensorRT-LLM. Remarkably, QServe on L40S GPU can achieve even higher throughput than TensorRT-LLM on A100. Thus, QServe effectively reduces the dollar cost of LLM serving by 3x. Code is available at https://github.com/mit-han-lab/omniserve.
arxiv情報
著者 | Yujun Lin,Haotian Tang,Shang Yang,Zhekai Zhang,Guangxuan Xiao,Chuang Gan,Song Han |
発行日 | 2025-05-01 02:14:05+00:00 |
arxivサイト | arxiv_id(pdf) |
提供元, 利用サービス
arxiv.jp, Google