Outlier Suppression+: Accurate quantization of large language models by equivalent and optimal shifting and scaling

要約

トランスフォーマー言語モデルのトレーニング後の量子化 (PTQ) は、アクティベーションにおける有害な外れ値の存在により、重大な課題に直面しています。
これらの外れ値は特定のチャネルに集中しており、チャネル間で非対称であることが観察されます。
この問題に対処するために、非対称性に対するチャネルごとのシフトと集中に対するチャネルごとのスケーリングを含む Outlier Suppression+~(OS+) フレームワークを提案します。
これらの操作は等価性を維持しながら後続のモジュールにシームレスに移行できることを示します。
第二に、効果的なシフト値とスケーリング値を計算するための高速で安定したスキームを提案します。
チャネルごとのシフトにより、外れ値の非対称性が除去されるように各チャネルの中心が揃えられます。
チャネルごとのスケーリングは、移行と量子化による変化を定量的に評価し、量子化負荷のバランスを改善します。
BERT、OPT、BLOOM、BLOOMZ、LLaMA などのモデルを使用して、標準および詳細な量子化設定の両方で OS+ を検証します。
さまざまなタスクにわたる包括的な結果は、私たちのアプローチの優位性を示しています。
特に、標準量子化を使用すると、OS+ は、8 ビットおよび 6 ビットの小規模モデルと大規模言語モデルの両方で浮動小数点に近いパフォーマンスを達成できます。
さらに、15.5% 向上した 4 ビット BERT の新しい最先端技術を確立します。
コードは \url{https://github.com/ModelTC/Outlier_Suppression_Plus} で入手できます。

要約(オリジナル)

Post-training quantization~(PTQ) of transformer language models faces significant challenges due to the existence of detrimental outliers in activations. We observe that these outliers are concentrated in specific channels and are asymmetric across channels. To address this issue, we propose the Outlier Suppression+~(OS+) framework, which contains the channel-wise shifting for asymmetry and channel-wise scaling for concentration. We show that these operations can be seamlessly migrated into subsequent modules while maintaining equivalence. Second, we propose a fast and stable scheme to calculate effective shifting and scaling values. The channel-wise shifting aligns the center of each channel for removal of outlier asymmetry. The channel-wise scaling quantitatively evaluates changes brough by migration and quantization for better quantization burden balance. We validate our OS+ under both standard and fine-grained quantization settings with models including BERT, OPT, BLOOM, BLOOMZ, and LLaMA. Comprehensive results across various tasks demonstrate the superiority of our approach. Especially, with standard quantization, OS+ can achieve near-floating-point performance on both small models and large language models on 8-bit and 6-bit. Besides, we establish a new state-of-the-art for 4-bit BERT with 15.5\% improvement. Our code is available at \url{https://github.com/ModelTC/Outlier_Suppression_Plus}.

arxiv情報

著者 Xiuying Wei,Yunchen Zhang,Yuhang Li,Xiangguo Zhang,Ruihao Gong,Jinyang Guo,Xianglong Liu
発行日 2023-10-20 14:02:15+00:00
arxivサイト arxiv_id(pdf)

提供元, 利用サービス

arxiv.jp, Google

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