要約
大規模言語モデル (LLM) は、複雑な言語タスクを解決する際に優れたパフォーマンスを示します。
ただし、パラメーターが多数あるため、エッジ デバイスでのモデルの展開と適用には大きな課題が生じます。
大規模な言語モデルを低ビットに圧縮すると、リソースに制約のあるデバイス上で実行できるようになり、多くの場合パフォーマンスの低下につながります。
この問題に対処するために、我々は、勾配を考慮した重み量子化 (GWQ) を提案します。これは、勾配を活用して外れ値の位置を特定する、低ビット重み量子化のための最初の量子化アプローチであり、外れ値の検出に最小限の量のキャリブレーション データのみを必要とします。
GWQ は上位 1% の外れ値に対応する重みを優先的に FP16 精度で保持し、残りの非外れ値の重みは低ビット形式で保存されます。
GWQ は、ヘッセ行列局所化モデルで敏感な重みを利用するよりも、勾配局所化モデルで敏感な重みを利用する方が科学的であることを実験的に発見しました。
現在の量子化方法と比較して、GWQ は複数の言語モデルに適用でき、WikiText2 および C4 データセットでより低い PPL を実現します。
ゼロショット タスクでは、GWQ 量子化モデルは他の量子化方法と比較して精度が高くなります。
GWQ はマルチモーダル モデルの量子化にも適しており、量子化された Qwen-VL ファミリ モデルは他の方法よりも正確です。
ゼロショット目標検出タスク データセット RefCOCO は、現在の最先端の手法である SPQR を上回ります。
GWQ は、オリジナル モデルと比較して 1.2 倍の推論速度向上を実現し、推論メモリを効果的に削減します。
要約(オリジナル)
Large language models (LLMs) show impressive performance in solving complex language tasks. However, its large number of parameters present significant challenges for the deployment and application of the model on edge devices. Compressing large language models to low bits can enable them to run on resource-constrained devices, often leading to performance degradation. To address this problem, we propose gradient-aware weight quantization (GWQ), the first quantization approach for low-bit weight quantization that leverages gradients to localize outliers, requiring only a minimal amount of calibration data for outlier detection. GWQ retains the weights corresponding to the top 1% outliers preferentially at FP16 precision, while the remaining non-outlier weights are stored in a low-bit format. GWQ found experimentally that utilizing the sensitive weights in the gradient localization model is more scientific compared to utilizing the sensitive weights in the Hessian matrix localization model. Compared to current quantization methods, GWQ can be applied to multiple language models and achieves lower PPL on the WikiText2 and C4 dataset. In the zero-shot task, GWQ quantized models have higher accuracy compared to other quantization methods. GWQ is also suitable for multimodal model quantization, and the quantized Qwen-VL family model is more accurate than other methods. Zero-shot target detection task dataset RefCOCO outperforms the current stat-of-the-arts method SPQR. GWQ achieves 1.2 times inference speedup in comparison to the original model, and effectively reduces the inference memory.
arxiv情報
著者 | Yihua Shao,Siyu Liang,Zijian Ling,Minxi Yan,Haiyang Liu,Siyu Chen,Ziyang Yan,Chenyu Zhang,Haotong Qin,Michele Magno,Yang Yang,Zhen Lei,Yan Wang,Jingcai Guo,Ling Shao,Hao Tang |
発行日 | 2024-12-04 10:45:41+00:00 |
arxivサイト | arxiv_id(pdf) |
提供元, 利用サービス
arxiv.jp, Google