paper-with-me

Papers

Scaling Law for Quantization-Aware Training

2025-05-20 · Mengzhao Chen, Chaoyi Zhang, Jing Liu, Yutao Zeng, Zeyue Xue, Zhiheng Liu, Yunshui Li, Jin Ma, Jie Huang, Xun Zhou, Ping Luo

Large language models (LLMs) demand substantial computational and memory resources, creating deployment challenges. Quantization-aware training (QAT) addresses these challenges by reducing model precision while maintaining performance. However, the scaling behavior of QAT, especially at 4-bit precision (W4A4), is not well understood. Existing QAT scaling laws often ignore key factors such as the number of training tokens and quantization granularity, which limits their applicability. This paper proposes a unified scaling law for QAT that models quantization error as a function of model size, training data volume, and quantization group size. Through 268 QAT experiments, we show that quantization error decreases as model size increases, but rises with more training tokens and coarser quantization granularity. To identify the sources of W4A4 quantization error, we decompose it into weight and activation components. Both components follow the overall trend of W4A4 quantization error, but with different sensitivities. Specifically, weight quantization error increases more rapidly with more training tokens. Further analysis shows that the activation quantization error in the FC2 layer, caused by outliers, is the primary bottleneck of W4A4 QAT quantization error. By applying mixed-precision quantization to address this bottleneck, we demonstrate that weight and activation quantization errors can converge to similar levels. Additionally, with more training data, weight quantization error eventually exceeds activation quantization error, suggesting that reducing weight quantization error is also important in such scenarios. These findings offer key insights for improving QAT research and development.

📄 PDF Abstract BibTeX arXiv:2505.14302

Code (3)

chenmnz/prefixquant pytorch
opengvlab/efficientqat pytorch
opengvlab/omniquant pytorch

Tasks

Quantization

Similar Papers 제목 키워드 기반

Rescaling-Aware Training for Efficient Deployment of Deep Learning Models on Full-Integer Hardware

2025-10-13 · Lion Mueller, Alberto Garcia-Ortiz, Ardalan Najafi, Adam Fuks 외 arxiv

Integer AI inference significantly reduces computational complexity in embedded systems. Quantization-aware training (QAT) helps mitigate accuracy degradation associated with post-training quantization but still overlook…

Low-Bit Quantization Favors Undertrained LLMs: Scaling Laws for Quantized LLMs with 100T Training Tokens

2024-11-26 · Xu Ouyang, Tao Ge, Thomas Hartvigsen, Zhisong Zhang 외

We reveal that low-bit quantization favors undertrained large language models (LLMs) by observing that models with larger sizes or fewer training tokens experience less quantization-induced degradation (QiD) when applyin…

Quantization

Scaling Laws for Precision

2024-11-07 · Tanishq Kumar, Zachary Ankner, Benjamin F. Spector, Blake Bordelon 외

Low precision training and inference affect both the quality and cost of language models, but current scaling laws do not account for this. In this work, we devise "precision-aware" scaling laws for both training and inf…

Quantization

Quadapter: Adapter for GPT-2 Quantization

2022-11-30 · Minseop Park, Jaeseong You, Markus Nagel, Simyung Chang

Transformer language models such as GPT-2 are difficult to quantize because of outliers in activations leading to a large quantization error. To adapt to the error, one must use quantization-aware training, which entails…

Quantization

TSPTQ-ViT: Two-scaled post-training quantization for vision transformer

2023-05-22 · Yu-Shan Tai, Ming-Guang Lin, An-Yeu, Wu

Vision transformers (ViTs) have achieved remarkable performance in various computer vision tasks. However, intensive memory and computation requirements impede ViTs from running on resource-constrained edge devices. Due …

Quantization