Rotated Runtime Smooth: Training-Free Activation Smoother for accurate INT4 inference

要約

大規模な言語モデルは、パラメーターをスケールアップしたときに有望な機能を実証しています。
ただし、大規模な言語モデルを提供すると、その規模が大きいため、かなりの計算コストとメモリ移動コストが発生します。
サービスコストと待ち時間を削減するために、量子化手法が採用されています。
それにもかかわらず、アクティベーションの外れ値は、INT4 重みアクティベーション量子化の開発を妨げます。
既存のアプローチでは、外れ値と正常値を 2 つの行列に分離するか、外れ値をアクティベーションから重みに移行するため、待ち時間が長くなったり精度が低下したりする問題があります。
大規模な言語モデルからのアクティベーションの観察に基づいて、外れ値はチャネルごとの外れ値とスパイク外れ値に分類できます。
この研究では、Runtime Smooth と Rotation 操作で構成される、量子化用のプラグアンドプレイ アクティベーション スムーザーである Rotated Runtime Smooth (RRS) を提案します。
Runtime Smooth (RS) は、実行時にチャネルごとの最大値でアクティベーションを平滑化することにより、チャネルごとの異常値を排除するために導入されました。
回転操作により、スパイクの外れ値と通常の値の間のギャップを狭めることができ、チャネルごとの平滑化によって引き起こされる被害の影響を軽減できます。
提案された方法は、LLaMA および Qwen ファミリの最先端の方法を上回り、INT4 推論の WikiText-2 パープレキシティを 57.33 から 6.66 に改善します。

要約(オリジナル)

Large language models have demonstrated promising capabilities upon scaling up parameters. However, serving large language models incurs substantial computation and memory movement costs due to their large scale. Quantization methods have been employed to reduce service costs and latency. Nevertheless, outliers in activations hinder the development of INT4 weight-activation quantization. Existing approaches separate outliers and normal values into two matrices or migrate outliers from activations to weights, suffering from high latency or accuracy degradation. Based on observing activations from large language models, outliers can be classified into channel-wise and spike outliers. In this work, we propose Rotated Runtime Smooth (RRS), a plug-and-play activation smoother for quantization, consisting of Runtime Smooth and the Rotation operation. Runtime Smooth (RS) is introduced to eliminate channel-wise outliers by smoothing activations with channel-wise maximums during runtime. The rotation operation can narrow the gap between spike outliers and normal values, alleviating the effect of victims caused by channel-wise smoothing. The proposed method outperforms the state-of-the-art method in the LLaMA and Qwen families and improves WikiText-2 perplexity from 57.33 to 6.66 for INT4 inference.

arxiv情報

著者 Ke Yi,Zengke Liu,Jianwei Zhang,Chengyuan Li,Tong Zhang,Junyang Lin,Jingren Zhou
発行日 2024-09-30 14:59:22+00:00
arxivサイト arxiv_id(pdf)

提供元, 利用サービス

arxiv.jp, Google

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