IntactKV: Improving Large Language Model Quantization by Keeping Pivot Tokens Intact

要約

大規模言語モデル(LLM)は自然言語処理に優れているが、計算量が多い。この問題を軽減するために、様々な量子化手法が検討されてきたが、LLMの性能は損なわれている。本稿では、これまで見過ごされてきたLLMの異常値を明らかにする。このような外れ値は、ピボットトークンと呼ばれる入力の初期トークンに注目スコアの大部分を割り当てていることが判明した。そこで我々は、ピボットトークンのKVキャッシュを全精度モデルからロスレスで生成するIntactKVを提案する。このアプローチはシンプルで、既存の量子化ソリューションと組み合わせることが容易である。さらに、IntactKVは量子化LLMをさらに向上させるための追加LLMパラメータとして較正することができる。数学的解析により、IntactKVが量子化誤差の上限を効果的に低減することも証明された。実証結果は、IntactKVが一貫した改善をもたらし、様々なダウンストリームタスクでロスレスウェイトオンリーINT4量子化を達成し、LLM量子化の新たな最先端へと導くことを示している。

要約(オリジナル)

Large language models (LLMs) excel in natural language processing but demand intensive computation. To mitigate this, various quantization methods have been explored, yet they compromise LLM performance. This paper unveils a previously overlooked type of outlier in LLMs. Such outliers are found to allocate most of the attention scores on initial tokens of input, termed as pivot tokens, which is crucial to the performance of quantized LLMs. Given that, we propose IntactKV to generate the KV cache of pivot tokens losslessly from the full-precision model. The approach is simple and easy to combine with existing quantization solutions. Besides, IntactKV can be calibrated as additional LLM parameters to boost the quantized LLMs further. Mathematical analysis also proves that IntactKV effectively reduces the upper bound of quantization error. Empirical results show that IntactKV brings consistent improvement and achieves lossless weight-only INT4 quantization on various downstream tasks, leading to the new state-of-the-art for LLM quantization.

arxiv情報

著者 Ruikang Liu,Haoli Bai,Haokun Lin,Yuening Li,Han Gao,Zhengzhuo Xu,Lu Hou,Jun Yao,Chun Yuan
発行日 2024-03-02 16:05:26+00:00
arxivサイト arxiv_id(pdf)

提供元, 利用サービス

arxiv.jp, DeepL

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