Matryoshka Quantization

要約

モデルの重みを量子化することは、大規模モデルの通信コストと推論コストを削減するために重要である。しかし、モデルの量子化、特にint4やint2のような低い精度での量子化は、モデルの品質とのトレードオフを必要とします。その結果、実務者は、量子化レベルの異なる複数のモデルを維持するか、品質とレイテンシのトレードオフを最もよく満たす単一のモデルを提供することを余儀なくされることが多い。一方、int8のような整数データ型は、int4やint2のようなビット幅の小さい整数が最上位ビットに入れ子になっている入れ子構造(マトリョーシカ構造)を本質的に持っています。この洞察を活用し、本論文では、前述の課題を軽減する新しいマルチスケール量子化技術であるマトリョーシカ量子化(MatQuant)を提案する。この手法により、単一の量子化モデルを訓練・維持しながら、配備時に要求される精度でモデルを提供することができる。さらに、MatQuantの協調訓練と協調蒸留正則化を活用することで、MatQuantによって抽出されたint2精度モデルは、OmniQuantとQATを基本アルゴリズムとする標準的なint2量子化よりも、それぞれ最大で4%と7%優れた性能を発揮します。最後に、外れ値を表現するために余分なビットを使用することで、2.05ビットの有効精度を持つモデルが、OmniQuantを基本アルゴリズムとした場合に、さらに6%の改善をもたらすことを示す。

要約(オリジナル)

Quantizing model weights is critical for reducing the communication and inference costs of large models. However, quantizing models — especially to low precisions like int4 or int2 — requires a trade-off in model quality; int2, in particular, is known to severely degrade model quality. Consequently, practitioners are often forced to maintain multiple models with different quantization levels or serve a single model that best satisfies the quality-latency trade-off. On the other hand, integer data types, such as int8, inherently possess a nested (Matryoshka) structure where smaller bit-width integers, like int4 or int2, are nested within the most significant bits. Leveraging this insight, in this paper, we propose Matryoshka Quantization (MatQuant), a novel multi-scale quantization technique that alleviates the aforementioned challenge. This technique allows us to train and maintain a single quantized model but serve it with the precision demanded by the deployment. Furthermore, leveraging MatQuant’s co-training and co-distillation regularization, int2 precision models extracted by MatQuant outperform standard int2 quantization by up to to 4% and 7% with OmniQuant and QAT as base algorithms respectively. Finally, we demonstrate that by using an extra bit to represent outliers, a model with an effective precision of 2.05-bit gives an additional 6% improvement with OmniQuant as the base algorithm.

arxiv情報

著者 Pranav Nair,Puranjay Datta,Jeff Dean,Prateek Jain,Aditya Kusupati
発行日 2025-03-03 17:54:53+00:00
arxivサイト arxiv_id(pdf)

提供元, 利用サービス

arxiv.jp, DeepL

カテゴリー: cs.AI, cs.LG パーマリンク