Quantizing the activations of large language models (LLMs) has been a significant challenge due to the presence of structured outliers. Most existing methods focus on the per-token or per-tensor quantization of activations, making it difficult to achieve both accuracy and hardware efficiency. To address this problem, we propose OutlierTune, an efficient per-channel post-training quantization (PTQ) method for the activations of LLMs. OutlierTune consists of two components: pre-execution of dequantization and symmetrization. The pre-execution of dequantization updates the model weights by the activation scaling factors, avoiding the internal scaling and costly additional computational overheads brought by the per-channel activation quantization. The symmetrization further reduces the quantization differences arising from the weight updates by ensuring the balanced numerical ranges across different activation channels. OutlierTune is easy to implement and hardware-efficient, introducing almost no additional computational overheads during the inference. Extensive experiments show that the proposed framework outperforms existing methods across multiple different tasks. Demonstrating better generalization, this framework improves the Int6 quantization of the instruction-tuning LLMs, such as OPT-IML, to the same level as half-precision (FP16). Moreover, we have shown that the proposed framework is 1.48x faster than the FP16 implementation while reducing approximately 2x memory usage.
SmoothRot: Combining Channel-Wise Scaling and Rotation for Quantization-Friendly LLMs
Doctoral School of Applied Informatics and Applied Mathematics, Obuda University(应用信息学与应用数学博士学院,奥布达大学);John von Neumann Faculty of Informatics, Obuda University(约翰·冯·诺依曼信息学院,奥布达大学)
Accurate KV Cache Quantization with Outlier Tokens Tracing
School of Computer Science and Technology, Soochow University(苏州大学计算机科学与技术学院);Key Laboratory of Data Intelligence and Advanced Computing, Soochow University(苏州大学数据智能与先进计算重点实验室);Huawei Cloud(华为云)
GEMQ: Global Expert-Level Mixed-Precision Quantization for MoE LLMs
University of Pittsburgh(匹兹堡大学);University of Central Florida(佛罗里达州立大学);University of Arizona(亚利桑那大学);University of North Carolina at Chapel Hill(北卡罗来纳大学教堂山分校)
Doctoral School of Applied Informatics and Applied Mathematics, Obuda University(应用信息与应用数学博士学院,奥布达大学);John von Neumann Faculty of Informatics, Obuda University(约翰·冯·诺伊曼信息学院,奥布达大学)
G$^2$PTQ: Improving LLM Post-Training Quantization with Generalized Gradient Compensation
ZTE Corporation(中兴通讯);The Chinese University of Hong Kong(香港中文大学);Northwestern Polytechnical University(西北工业大学);Peking University(北京大学);Nanjing University of Aeronautics and Astronautics(南京航空航天大学)
Compression of Generative Pre-trained Language Models via Quantization
The University of Hong Kong(香港大学);Huawei Noah’s Ark Lab(华为诺亚方舟实验室)
生成式预训练语言模型(PLM)的规模不断增大,极大地增加了对模型压缩的需求。尽管有各种方法来压缩BERT或其变体,但很少有人尝试压缩生成PLM,并且潜在的困难仍然不清楚。在本文中,我们压缩生成PLM量化。我们发现,以前的量化方法失败的生成任务,由于\textit{homogeneous word embeddings}所造成的能力降低,和\textit{varied distribution of weights}。相应地,我们提出了一个令牌级的对比蒸馏学习可区分的词嵌入,和一个模块的动态缩放,使量化器适应不同的模块。各种任务的实证结果表明,我们提出的方法优于国家的最先进的压缩方法生成PLM的一个明确的保证金。与全精度模型相比,我们在GPT-2和BART上分别实现了14.4倍和13.4倍的压缩率。