SqueezeLLM: Dense-and-Sparse Quantization

要約

生成大規模言語モデル (LLM) は、幅広いタスクに対して顕著な結果を示しています。
ただし、これらのモデルを推論用にデプロイすることは、前例のないリソース要件のため、大きな課題となっていました。
このため、既存の展開フレームワークは、多くの場合複雑でコストがかかるマルチ GPU 推論パイプラインを使用するか、より小型でパフォーマンスの低いモデルを使用する必要がありました。
この研究では、LLM を使用した生成推論の主なボトルネックは、特に単一バッチ推論の場合、コンピューティングではなくメモリ帯域幅であることを示します。
量子化は、精度を下げてモデルの重みを表現することで有望なソリューションとして浮上していますが、これまでの取り組みでは、顕著なパフォーマンスの低下が生じることがよくありました。
これに対処するために、トレーニング後の量子化フレームワークである SqueezeLLM を導入します。これは、最大 3 ビットの超低精度まで可逆圧縮を可能にするだけでなく、同じメモリ制約の下でより高い量子化パフォーマンスも実現します。
私たちのフレームワークには 2 つの新しいアイデアが組み込まれています。(i) 感度ベースの不均一量子化。二次情報に基づいて最適なビット精度の割り当てを検索します。
(ii) 外れ値と敏感な重み値を効率的なスパース形式で保存する密-スパース分解。
LLaMA モデルに適用すると、当社の 3 ビット量子化は、同じメモリ要件を持つ最先端の手法と比較して、FP16 ベースラインからの複雑さのギャップを最大 2.1 倍まで大幅に削減します。
さらに、A6000 GPU に展開すると、量子化モデルはベースラインと比較して最大 2.3 倍の高速化を達成します。
私たちのコードはオープンソースであり、オンラインで入手できます。

要約(オリジナル)

Generative Large Language Models (LLMs) have demonstrated remarkable results for a wide range of tasks. However, deploying these models for inference has been a significant challenge due to their unprecedented resource requirements. This has forced existing deployment frameworks to use multi-GPU inference pipelines, which are often complex and costly, or to use smaller and less performant models. In this work, we demonstrate that the main bottleneck for generative inference with LLMs is memory bandwidth, rather than compute, specifically for single batch inference. While quantization has emerged as a promising solution by representing model weights with reduced precision, previous efforts have often resulted in notable performance degradation. To address this, we introduce SqueezeLLM, a post-training quantization framework that not only enables lossless compression to ultra-low precisions of up to 3-bit, but also achieves higher quantization performance under the same memory constraint. Our framework incorporates two novel ideas: (i) sensitivity-based non-uniform quantization, which searches for the optimal bit precision assignment based on second-order information; and (ii) the Dense-and-Sparse decomposition that stores outliers and sensitive weight values in an efficient sparse format. When applied to the LLaMA models, our 3-bit quantization significantly reduces the perplexity gap from the FP16 baseline by up to 2.1x as compared to the state-of-the-art methods with the same memory requirement. Furthermore, when deployed on an A6000 GPU, our quantized models achieve up to 2.3x speedup compared to the baseline. Our code is open-sourced and available online.

arxiv情報

著者 Sehoon Kim,Coleman Hooper,Amir Gholami,Zhen Dong,Xiuyu Li,Sheng Shen,Michael W. Mahoney,Kurt Keutzer
発行日 2023-06-13 08:57:54+00:00
arxivサイト arxiv_id(pdf)

提供元, 利用サービス

arxiv.jp, Google

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