DuQuant: Distributing Outliers via Dual Transformation Makes Stronger Quantized LLMs

要約

大規模言語モデル (LLM) の量子化は、特に効率的な低ビット表現を妨げる外れ値アクティベーションの存在により、重大な課題に直面しています。
従来のアプローチは主に $\textit{Normal Outliers}$ に対処します。これは比較的大きな規模のすべてのトークンにわたる活性化です。
ただし、これらの方法では、著しく大きな値を表示する $\textit{Massive Outliers}$ の平滑化に苦労し、低ビット量子化でのパフォーマンスの大幅な低下につながります。
この論文では、回転変換と順列変換を利用して大規模な外れ値と通常の外れ値の両方をより効果的に軽減する新しいアプローチである DuQuant を紹介します。
まず、DuQuant は、事前知識として特定の外れ値の次元を使用して回転行列を構築し、ブロックごとの回転によって外れ値を隣接するチャネルに再分配することから始めます。
第 2 に、ジグザグ順列をさらに採用して、ブロック全体にわたる外れ値の分布のバランスをとり、それによってブロックごとの分散を削減します。
その後のローテーションにより、アクティベーション ランドスケープがさらにスムーズになり、モデルのパフォーマンスが向上します。
DuQuant は量子化プロセスを簡素化し、外れ値の管理に優れており、4 ビットのウェイト アクティベーション量子化であっても、複数のタスクでさまざまなサイズと種類の LLM にわたって最先端のベースラインを上回ります。
私たちのコードは https://github.com/Hsu1023/DuQuant で入手できます。

要約(オリジナル)

Quantization of large language models (LLMs) faces significant challenges, particularly due to the presence of outlier activations that impede efficient low-bit representation. Traditional approaches predominantly address $\textit{Normal Outliers}$, which are activations across all tokens with relatively large magnitudes. However, these methods struggle with smoothing $\textit{Massive Outliers}$ that display significantly larger values, which leads to significant performance degradation in low-bit quantization. In this paper, we introduce DuQuant, a novel approach that utilizes rotation and permutation transformations to more effectively mitigate both massive and normal outliers. First, DuQuant starts by constructing rotation matrices, using specific outlier dimensions as prior knowledge, to redistribute outliers to adjacent channels by block-wise rotation. Second, We further employ a zigzag permutation to balance the distribution of outliers across blocks, thereby reducing block-wise variance. A subsequent rotation further smooths the activation landscape, enhancing model performance. DuQuant simplifies the quantization process and excels in managing outliers, outperforming the state-of-the-art baselines across various sizes and types of LLMs on multiple tasks, even with 4-bit weight-activation quantization. Our code is available at https://github.com/Hsu1023/DuQuant.

arxiv情報

著者 Haokun Lin,Haobo Xu,Yichen Wu,Jingzhi Cui,Yingtao Zhang,Linzhan Mou,Linqi Song,Zhenan Sun,Ying Wei
発行日 2024-09-24 16:40:39+00:00
arxivサイト arxiv_id(pdf)

提供元, 利用サービス

arxiv.jp, Google

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