要約
モデルの重みの量子化は、大規模なモデルの通信コストと推論コストを削減するために重要です。
ただし、モデルの量子化 – 特にINT4やINT2などの低精度では、モデルの品質のトレードオフが必要です。
特に、INT2はモデルの品質をひどく低下させることが知られています。
その結果、実務家は、量子化レベルが異なる複数のモデルを維持することを余儀なくされるか、品質遅延のトレードオフを最もよく満たす単一のモデルを提供することを余儀なくされます。
一方、INT8などの整数データ型は、INT4やINT2などのより小さなビット幅の整数が最も重要なビット内にネストされるネストされた(マトリオシュカ)構造を本質的に持っています。
このペーパーでは、複数の量子化されたモデルを必要とするという課題に対処する新しいマルチスケール量子化技術であるMatryoshka量子化(Matquant)を提案します。
これにより、トレーニングと1つのモデルのみを維持でき、さまざまな精度レベルで提供できます。
さらに、Matquantが提供する共同トレーニングと共蒸留の正規化により、Matquantによって抽出されたInt2精度モデルは、標準のINT2量子化(QATやomniquantなどの技術を使用)よりも最大$ 10 \%$ $より正確になります。
これは、同じレシピを使用して、INT2 FFN定量化されたGEMMA-2 9BモデルがINT8 FFN定量化されたGEMMA-2 2Bモデルよりも正確であるという事実によって実証されたモデル量子化の大きな進歩を表しています。
要約(オリジナル)
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. This paper proposes Matryoshka Quantization (MatQuant), a novel multi-scale quantization technique that addresses the challenge of needing multiple quantized models. It allows training and maintaining just one model, which can then be served at different precision levels. Furthermore, due to the co-training and co-distillation regularization provided by MatQuant, the int2 precision models extracted by MatQuant can be up to $10\%$ more accurate than standard int2 quantization (using techniques like QAT or OmniQuant). This represents significant progress in model quantization, demonstrated by the fact that, with the same recipe, an int2 FFN-quantized Gemma-2 9B model is more accurate than an int8 FFN-quantized Gemma-2 2B model.
arxiv情報
著者 | Pranav Nair,Puranjay Datta,Jeff Dean,Prateek Jain,Aditya Kusupati |
発行日 | 2025-02-10 18:59:10+00:00 |
arxivサイト | arxiv_id(pdf) |
提供元, 利用サービス
arxiv.jp, Google