FPTQ: Fine-grained Post-Training Quantization for Large Language Models

Qingyuan Li, Yifan Zhang, Liang Li, Peng Yao, Bo Zhang +4 more
8/30/2023
cs.CLcs.AIcs.LG

No confident code implementation found for this paper. 3 possible matches can be shown below.

Abstract

In the era of large-scale language models, the substantial parameter size poses significant challenges for deployment. Being a prevalent compression technique, quantization has emerged as the mainstream practice to tackle this issue, which is mainly centered on two recipes W8A8 and W4A16 (i.e. weights and activations in such bit widths). In this study, we propose a novel W4A8 post-training quantization method for the available open-sourced LLMs, which combines the advantages of both two recipes. Therefore, we can leverage the benefit in the I/O utilization of 4-bit weight quantization and the acceleration due to 8-bit matrix computation. Nevertheless, the W4A8 faces notorious performance degradation. As a remedy, we involve layerwise activation quantization strategies which feature a novel logarithmic equalization for most intractable layers, and we combine them with fine-grained weight quantization. Without whistles and bells, we eliminate the necessity for further fine-tuning and obtain the state-of-the-art W4A8 quantized performance on BLOOM, LLaMA, and LLaMA-2 on standard benchmarks. We confirm that the W4A8 quantization is achievable for the deployment of large language models, fostering their wide-spreading real-world applications.

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. 3 weaker matches are 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{li2023fptq,
  title  = {FPTQ: Fine-grained Post-Training Quantization for Large Language Models},
  author = {Qingyuan Li and Yifan Zhang and Liang Li and Peng Yao and Bo Zhang and Xiangxiang Chu and Yerui Sun and Li Du and Yuchen Xie},
  year   = {2023},
  eprint = {2308.15987},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2308.15987v1}
}

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/2308.15987.svg)](https://codeofpaper.com/paper/2308.15987)

Discussion