AWQ: Activation-aware Weight Quantization for LLM Compression and Acceleration

要約

大規模言語モデル (LLM) は、自然言語処理からロボット工学や自動運転におけるより複雑なドメイン固有のタスクに至るまで、多数のアプリケーションの機能を根本的に変革しました。
さらに、オンデバイス LLM の重要性は近年大幅に高まっています。
エッジ デバイス上で LLM を実行すると、遅延の削減とユーザー エクスペリエンスの向上が約束されるだけでなく、データ処理がローカルで行われる可能性があるため、ユーザー プライバシーのニーズの高まりにも対応できます。
ただし、最新の LLM の天文学的なモデル サイズと、主にメモリ サイズと帯域幅に関するエッジ デバイスの制約により、導入には重大な課題が生じます。
この論文では、LLM の低ビット重みのみの量子化に対するハードウェア フレンドリーなアプローチである、アクティベーションを意識した重み量子化 (AWQ) を提案します。
私たちの方法は、重みは同じように重要ではないという観察に基づいています。顕著な重みの 1% だけを保護するだけで、量子化誤差を大幅に減らすことができます。
次に、重みではなく活性化を観察することによって、顕著な重みを保護するチャネルごとの最適なスケーリングを探索することを提案します。
AWQ はバックプロパゲーションや再構成に依存しないため、キャリブレーション セットに過剰適合することなく、さまざまなドメインやモダリティでの LLM の汎化能力を適切に維持できます。
AWQ は、さまざまな言語モデリングやドメイン固有のベンチマーク (コーディングと数学) に関する既存の研究よりも優れたパフォーマンスを発揮します。
一般化の改善により、命令調整型 LM および初めてマルチモーダル LM に対して優れた量子化パフォーマンスが実現しました。
AWQ と並行して、オンデバイス LLM/VLM 向けに調整された効率的で柔軟な推論フレームワークである TinyChat を実装し、デスクトップとモバイル GPU の両方で Huggingface FP16 実装と比較して 3 倍以上の高速化を実現します。
また、モバイル GPU での 70B Llama-2 モデルの展開も民主化されます。

要約(オリジナル)

Large language models (LLMs) have fundamentally transformed the capabilities of numerous applications, from natural language processing to more intricate domain-specific tasks in robotics and autonomous driving. Moreover, the importance of on-device LLMs has grown significantly in the recent years. Running LLMs on edge devices not only promises reduced latency and improved user experience but also aligns with the increasing need for user privacy, as data processing can occur locally. However, the astronomical model sizes of modern LLMs and constraints of the edge devices, primarily in terms of memory size and bandwidth, pose significant deployment challenges. In this paper, we propose Activation-aware Weight Quantization (AWQ), a hardware-friendly approach for LLM low-bit weight-only quantization. Our method is based on the observation that weights are not equally important: protecting only 1% of salient weights can greatly reduce quantization error. We then propose to search for the optimal per-channel scaling that protects the salient weights by observing the activation, not weights. AWQ does not rely on any backpropagation or reconstruction, so it can well preserve LLMs’ generalization ability on different domains and modalities, without overfitting to the calibration set. AWQ outperforms existing work on various language modeling and domain-specific benchmarks (coding and math). Thanks to better generalization, it achieves excellent quantization performance for instruction-tuned LMs and, for the first time, multi-modal LMs. Alongside AWQ, we implement TinyChat, an efficient and flexible inference framework tailored for on-device LLM/VLMs, offering more than 3x speedup over the Huggingface FP16 implementation on both desktop and mobile GPUs. It also democratizes the deployment of the 70B Llama-2 model on mobile GPUs.

arxiv情報

著者 Ji Lin,Jiaming Tang,Haotian Tang,Shang Yang,Wei-Ming Chen,Wei-Chen Wang,Guangxuan Xiao,Xingyu Dang,Chuang Gan,Song Han
発行日 2024-04-23 19:51:53+00:00
arxivサイト arxiv_id(pdf)

提供元, 利用サービス

arxiv.jp, Google

カテゴリー: cs.CL パーマリンク