QuantEase: Optimization-based Quantization for Language Models

Kayhan Behdin, Ayan Acharya, Aman Gupta, Qingquan Song, Siyu Zhu +2 more
9/5/2023
stat.MLcs.CLcs.LG

No confident code implementation found for this paper. 1 possible match can be shown below.

Abstract

With the rising popularity of Large Language Models (LLMs), there has been an increasing interest in compression techniques that enable their efficient deployment. This study focuses on the Post-Training Quantization (PTQ) of LLMs. Drawing from recent advances, our work introduces QuantEase, a layer-wise quantization framework where individual layers undergo separate quantization. The problem is framed as a discrete-structured non-convex optimization, prompting the development of algorithms rooted in Coordinate Descent (CD) techniques. These CD-based methods provide high-quality solutions to the complex non-convex layer-wise quantization problems. Notably, our CD-based approach features straightforward updates, relying solely on matrix and vector operations, circumventing the need for matrix inversion or decomposition. We also explore an outlier-aware variant of our approach, allowing for retaining significant weights (outliers) with complete precision. Our proposal attains state-of-the-art performance in terms of perplexity and zero-shot accuracy in empirical evaluations across various LLMs and datasets, with relative improvements up to 15% over methods such as GPTQ. Leveraging careful linear algebra optimizations, QuantEase can quantize models like Falcon-180B on a single NVIDIA A100 GPU in $\sim$3 hours. Particularly noteworthy is our outlier-aware algorithm's capability to achieve near or sub-3-bit quantization of LLMs with an acceptable drop in accuracy, obviating the need for non-uniform quantization or grouping techniques, improving upon methods such as SpQR by up to two times in terms of perplexity.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. 1 weaker match is hidden by default — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{behdin2023quantease,
  title  = {QuantEase: Optimization-based Quantization for Language Models},
  author = {Kayhan Behdin and Ayan Acharya and Aman Gupta and Qingquan Song and Siyu Zhu and Sathiya Keerthi and Rahul Mazumder},
  year   = {2023},
  eprint = {2309.01885},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2309.01885v2}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2309.01885.svg)](https://codeofpaper.com/paper/2309.01885)

Discussion