One approach to reducing the massive costs of large language models (LLMs) is the use of quantized or sparse representations for training or deployment. While post-training compression methods are very popular, the question of obtaining even more accurate compressed models by directly training over such representations, i.e., Quantization-Aware Training (QAT), is still open: for example, a recent study (arXiv:2411.04330) put the "optimal" bit-width at which models can be trained using QAT, while staying accuracy-competitive with standard FP16/BF16 precision, at 8-bits weights and activations. We advance this state-of-the-art via a new method called QuEST, for which we demonstrate optimality at 4-bits and stable convergence as low as 1-bit weights and activations. QuEST achieves this by improving two key aspects of QAT methods: (1) accurate and fast quantization of the (continuous) distributions of weights and activations via Hadamard normalization and MSE-optimal fitting; (2) a new trust gradient estimator based on the idea of explicitly minimizing the error between the noisy gradient computed over quantized states and the "true" (but unknown) full-precision gradient. Experiments on Llama-type architectures show that QuEST induces stable scaling laws across the entire range of hardware-supported precisions, and can be extended to sparse representations. We provide GPU kernel support showing that models produced by QuEST can be executed efficiently. Our code is available at https://github.com/IST-DASLab/QuEST.
Mitigating the Impact of Outlier Channels for Language Model Quantization with Activation Regularization
Massachusetts Institute of Technology(麻省理工学院);MIT-IBM Watson AI Lab(MIT-IBM沃森人工智能实验室);IBM Research(IBM研究院);IST Austria(奥地利科学技术研究所);Neural Magic, Inc.(Neural Magic公司)
Quantization Error as a Metric for Dynamic Precision Scaling in Neural Net Training
Department of Electrical and Computer Engineering(电气与计算机工程系);University of Toronto(多伦多大学);Toronto, ON, Canada(加拿大安大略省多伦多市)
最近的工作已经探索了在神经网络训练期间降低参数、激活和梯度的数值精度,作为降低训练计算成本的一种方式(Na & Mukhopadhyay,2016)(Courbariaux et al.,2014年)。我们提出了一种新的动态精度缩放(DPS)计划。通过使用随机定点舍入、基于量化误差的缩放方案以及训练过程中的动态位宽,我们在MNIST数据集上实现了98.8%的测试准确度,与深度学习框架中使用的标准32位浮点值相比,权重的平均位宽仅为16位,激活的平均位宽为14位。
STaMP: Sequence Transformation and Mixed Precision for Low-Precision Activation Quantization
Qualcomm AI Research(高通人工智能研究)
量化是减少生成式人工智能模型的推理延迟、功耗和内存占用的关键方法。然而,当激活被量化为低于8位时,准确度通常急剧下降。最近的工作表明,可逆线性变换(例如旋转)可以通过重新参数化特征通道和权重来帮助量化。在本文中,我们提出了\textit{Sequence Transformation and Mixed Precision}(STaMP)的量化,一种新的策略,适用于线性变换沿\textit{sequence}维利用语言和视觉数据的强局部相关性。通过以更高的精度在每个中间激活中保持少量的令牌,我们可以在较低的(平均)激活位宽下保持模型的准确性。我们评估STaMP最近的LVM和LLM架构,证明它显着提高了低位宽激活量化和补充建立激活和权重量化方法,包括最近的功能转换。
Achieving binary weight and activation for LLMs using Post-Training Quantization
MAIS, Institute of Automation, Chinese Academy of Sciences(自动化研究所,中国科学院);School of Artificial Intelligence, University of Chinese Academy of Sciences(中国科学院大学人工智能学院);Central Media Technology Institute, Huawei Technologies Ltd.(华为技术有限公司媒体技术研究所)
InfoQuant: Shaping Activation Distributions for Low-Bit LLM Quantization
School of Software Technology, Zhejiang University(浙江大学软件学院);Ant Group(蚂蚁集团);College of Computer Science and Technology, Zhejiang University of Technology(浙江工业大学计算机科学与技术学院);China Mobile (Zhejiang) Research & Innovation Institute(中国移动(浙江)研究院);Alibaba Cloud Computing(阿里云计算);State Key Lab of CAD&CG, Zhejiang University(浙江大学CAD&CG国家重点实验室)
Beyond Activation Alignment:The Alignment-Diversity Tradeoff in Task-Aware LLM Quantization
South China University of Technology(华南理工大学);Shenzhen Campus of Sun Yat-sen University(中山大学深圳校区);Ocean University of China(中国海洋大学);Center for AI Theoretical Foundation and Systems, Shenzhen Loop Area Institute(深圳环区研究所人工智能理论基础与系统中心)
LSQ+: Improving low-bit quantization through learnable offsets and better initialization
Qualcomm AI Research, Qualcomm Technologies, Inc.(高通AI研究,高通技术公司);Qualcomm AI Research, Qualcomm Technologies Netherlands B.V.(高通AI研究,高通技术荷兰有限公司);Seoul National University(首尔大学)
Fast matrix multiplication for binary and ternary CNNs on ARM CPU
Moscow Institute of Physics and Technology(莫斯科物理技术学院);Federal Research Center “Computer Science and Control” of Russian Academy of Sciences(俄罗斯科学院计算机科学与控制联邦研究中心);Smart Engines Service LLC(Smart Engines服务有限责任公司);Institute for Information Transmission Problems, RAS(俄罗斯科学院信息传输问题研究所)
QUIK: Towards End-to-End 4-Bit Inference on Generative Large Language Models
ETH Zurich(苏黎世联邦理工学院);Institute of Science and Technology Austria(奥地利科学技术研究所);Xidian University(西安电子科技大学);KAUST(阿卜杜拉国王科技大学);Neural Magic, Inc.(Neural Magic公司)
Loom: Exploiting Weight and Activation Precisions to Accelerate Convolutional Neural Networks
University of Toronto(多伦多大学)
介绍了一种用于卷积神经网络(CNN)的硬件推理加速器Loom(LM)。在LM中,可以节省的每一位数据精度都转化为成比例的性能增益。具体来说,对于卷积层,LM的执行时间与权重和激活的精度成反比。对于全连接层,LM的性能与权重的精度成反比。LM的目标是面积和带宽受限的片上系统设计,例如那些在移动设备上无法负担存储片上每层所需的多兆字节缓冲区的设计。因此,在给定数据带宽预算的情况下,LM相对于等效的位并行加速器提高了能量效率和性能。对于权重和激活,LM可以利用轮廓导出的每层精度。然而,在运行时,LM进一步以比层粒度小得多的粒度调整激活精度。此外,它可以自然地以比层更小的粒度利用权重精度可变性。平均而言,在几个图像分类CNN中,对于每个周期可以执行相当于128个16 b x 16 b乘法累加操作的配置,LM的性能比最先进的位并行加速器[1]高出4.38倍,而精度没有任何损失,同时能效高出3.54倍。LM可以在执行性能和能源效率的额外改进上权衡准确性,并且与仅针对激活精度的加速器相比是有利的。我们还研究了2位和4位LM变体,发现每周期2位变体是最节能的。