要約
近年の大規模言語モデル(LLM)事前学習の進歩により、素晴らしい能力を持つ高品質なLLMが誕生している。このようなLLMは、量子化によってパラメータあたり3-4ビットに圧縮することで、ノートパソコンや携帯電話などのメモリが限られたデバイスに収まるようになり、パーソナルな利用が可能になりました。しかし、1パラメータあたり3~4ビットに量子化すると、特にエッジ配置に適した1~10Bパラメータの小型モデルにおいて、通常、中~高精度の損失が発生する。この精度の問題に対処するため、我々は新しい圧縮フォーマットと量子化技術であるスパース量子化表現(SpQR)を導入し、従来の方法と同様の圧縮レベルを達成しながら、モデル規模を超えてLLMをほぼロスなく圧縮することを初めて可能にしました。SpQRは、特に大きな量子化誤差の原因となる異常値重みを識別・分離して高精度に保存し、その他の重みは3~4ビットに圧縮するという仕組みで、高精度なLLaMAやFalcon LLMにおいて、相対精度の損失は1%未満の当惑度を達成しました。これにより、24GBのコンシューマ向けGPU1台で、33BパラメータのLLMを15%の高速化で性能劣化なく実行することができ、強力なLLMをデメリットなくコンシューマに提供することが可能になりました。SpQRは、重みをエンコードするための効率的なアルゴリズムと、実行時に重みをデコードするための効率的なアルゴリズムを備えています。特に、SpQRの効率的なGPU推論アルゴリズムを提供し、16ビットベースラインと同等の精度でより高速な推論を実現するとともに、4倍以上のメモリ圧縮を可能にしています。
要約(オリジナル)
Recent advances in large language model (LLM) pretraining have led to high-quality LLMs with impressive abilities. By compressing such LLMs via quantization to 3-4 bits per parameter, they can fit into memory-limited devices such as laptops and mobile phones, enabling personalized use. However, quantization down to 3-4 bits per parameter usually leads to moderate-to-high accuracy losses, especially for smaller models in the 1-10B parameter range, which are well-suited for edge deployments. To address this accuracy issue, we introduce the Sparse-Quantized Representation (SpQR), a new compressed format and quantization technique which enables for the first time near-lossless compression of LLMs across model scales, while reaching similar compression levels to previous methods. SpQR works by identifying and isolating outlier weights, which cause particularly-large quantization errors, and storing them in higher precision, while compressing all other weights to 3-4 bits, and achieves relative accuracy losses of less than 1% in perplexity for highly-accurate LLaMA and Falcon LLMs. This makes it possible to run 33B parameter LLM on a single 24 GB consumer GPU without any performance degradation at 15% speedup thus making powerful LLMs available to consumer without any downsides. SpQR comes with efficient algorithms for both encoding weights into its format, as well as decoding them efficiently at runtime. Specifically, we provide an efficient GPU inference algorithm for SpQR which yields faster inference than 16-bit baselines at similar accuracy, while enabling memory compression gains of more than 4x.
arxiv情報
| 著者 | Tim Dettmers,Ruslan Svirschevski,Vage Egiazarian,Denis Kuznedelev,Elias Frantar,Saleh Ashkboos,Alexander Borzunov,Torsten Hoefler,Dan Alistarh |
| 発行日 | 2023-06-05 17:53:28+00:00 |
| arxivサイト | arxiv_id(pdf) |