LUT-GEMM: Quantized Matrix Multiplication based on LUTs for Efficient Inference in Large-Scale Generative Language Models

要約

タイトル:LUT-GEMM:大規模生成言語モデルにおける効率的な推論のためのLUTに基づく量子化行列乗算

要約:

– セルフスーパーバイズ学習とTransformerアーキテクチャによる最近の発展により、NLPは驚くべき低パープレキシティを実現しています。
– しかし、強力なNLPモデルは増加し続けるモデルサイズを必要とし、莫大な計算資源とメモリ要件が発生します。
– 本論文では、大規模生成言語モデルに適した効率的な推論フレームワークを紹介します。
– モデルサイズを縮小するために、ウェイトのみの量子化戦略を採用しますが、アクティベーションに完全な精度を維持します。
– 結果として、非均一または均一量子化技術を介して、各ウェイトのサブ4ビット量子化を達成します。
– LUT-GEMMと呼ばれる提案されたカーネルは、量子化された行列乗算を加速し、圧縮率と精度の柔軟なバランスを提供します。
– ウェイトのみの量子化に対応する以前の行列乗算カーネルとは異なり、LUT-GEMMは統一量子化と非統一量子化の両方に対して、リソースを要求するデクォンタイゼーション処理を効率的に除去します。
– 大規模言語モデルの個々のGPUと全体的な推論プロセスのレイテンシを減らすことにより、LUT-GEMMは推論において重要な性能改善を提供します。
– LUTベースの操作を介して低ビット量子化と高効率の圧縮率を実現し、必要なGPUの数を減らします。
– 3ビット量子化のOPT-175Bモデルでは、デクォンタイズが必要なOPTQと比較して、LUT-GEMMはトークンを生成するためのレイテンシを2.1倍加速します。
– 結果として、LUT-GEMMは、精度や性能の劣化がほとんどなく、1つのGPUでOPT-175Bモデルの推論を可能にし、量子化されていないOPT-175Bモデルでは最低8つのGPUが必要になります。

要約(オリジナル)

The recent advancements in self-supervised learning, combined with the Transformer architecture, have enabled natural language processing (NLP) to achieve remarkably low perplexity. However, powerful NLP models necessitate increasing model size, leading to substantial computational and memory requirements. In this paper, we introduce an efficient inference framework tailored for large-scale generative language models. To reduce the model size, we employ a weight-only quantization strategy while preserving full precision for activations. As a result, we attain sub-4-bit quantization for each weight through non-uniform or uniform quantization techniques. Our proposed kernel, called LUT-GEMM, then accelerates quantized matrix multiplications, offering a flexible balance between compression ratio and accuracy. Unlike earlier matrix multiplication kernels that accommodated weight-only quantization, LUT-GEMM efficiently eliminates the resource-demanding dequantization process for both uniform and non-uniform quantization methods. By reducing the latency of individual GPUs and the overall inference process for large-scale language models, LUT-GEMM provides significant performance improvements in inference. The impact of LUT-GEMM is facilitated by implementing high compression ratios through low-bit quantization and efficient LUT-based operations, which decreases the number of required GPUs. For the OPT-175B model with 3-bit quantization, we show that LUT-GEMM accelerates the latency for generating each token by 2.1x compared to OPTQ, which requires costly dequantization. Consequently, LUT-GEMM enables inference of the OPT-175B model on a single GPU without noticeable degradation in accuracy or performance, while the non-quantized OPT-175B model requires a minimum of 8 GPUs.

arxiv情報

著者 Gunho Park,Baeseong Park,Minsub Kim,Sungjae Lee,Jeonghoon Kim,Beomseok Kwon,Se Jung Kwon,Byeongwook Kim,Youngjoo Lee,Dongsoo Lee
発行日 2023-04-15 15:16:40+00:00
arxivサイト arxiv_id(pdf)

提供元, 利用サービス

arxiv.jp, OpenAI

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