paper-with-me

홈 › Papers

Sharpness-aware Quantization for Deep Neural Networks

2021-11-24 · Jing Liu, Jianfei Cai, Bohan Zhuang

Network quantization is a dominant paradigm of model compression. However, the abrupt changes in quantized weights during training often lead to severe loss fluctuations and result in a sharp loss landscape, making the gradients unstable and thus degrading the performance. Recently, Sharpness-Aware Minimization (SAM) has been proposed to smooth the loss landscape and improve the generalization performance of the models. Nevertheless, directly applying SAM to the quantized models can lead to perturbation mismatch or diminishment issues, resulting in suboptimal performance. In this paper, we propose a novel method, dubbed Sharpness-Aware Quantization (SAQ), to explore the effect of SAM in model compression, particularly quantization for the first time. Specifically, we first provide a unified view of quantization and SAM by treating them as introducing quantization noises and adversarial perturbations to the model weights, respectively. According to whether the noise and perturbation terms depend on each other, SAQ can be formulated into three cases, which are analyzed and compared comprehensively. Furthermore, by introducing an efficient training strategy, SAQ only incurs a little additional training overhead compared with the default optimizer (e.g., SGD or AdamW). Extensive experiments on both convolutional neural networks and Transformers across various datasets (i.e., ImageNet, CIFAR-10/100, Oxford Flowers-102, Oxford-IIIT Pets) show that SAQ improves the generalization performance of the quantized models, yielding the SOTA results in uniform quantization. For example, on ImageNet, SAQ outperforms AdamW by 1.2% on the Top-1 accuracy for 4-bit ViT-B/16. Our 4-bit ResNet-50 surpasses the previous SOTA method by 0.9% on the Top-1 accuracy.

📄 PDF Abstract BibTeX arXiv:2111.12273

Code (4)

zhuang-group/saq 공식 구현 pytorch
zip-group/saq 공식 구현 pytorch
ziplab/saq 공식 구현 pytorch
yangyucheng000/Paper-3/tree/main/SharpDRO-ms mindspore

Tasks

Image ClassificationModel CompressionQuantization

Methods 이 논문이 사용한 방법론

Sharpness-Aware Minimization Sharpness-Aware Minimization, or SAM, is a procedure that improves model generalization by simultaneously minimizing loss value and loss sharpness. SAM functions by…

Similar Papers 제목 키워드 기반

SQuAT: Sharpness- and Quantization-Aware Training for BERT

2022-10-13 · Zheng Wang, Juncheng B Li, Shuhui Qu, Florian Metze 외

Quantization is an effective technique to reduce memory footprint, inference latency, and power consumption of deep learning models. However, existing quantization methods suffer from accuracy degradation compared to ful…

Quantization

Sharpness-Aware Data Generation for Zero-shot Quantization

2025-10-08 · Dung Hoang-Anh, Cuong Pham Trung Le, Jianfei Cai, Thanh-Toan Do arxiv

Zero-shot quantization aims to learn a quantized model from a pre-trained full-precision model with no access to original real training data. The common idea in zero-shot quantization approaches is to generate synthetic …

Synthetic Data Generation

Zero-Shot Sharpness-Aware Quantization for Pre-trained Language Models

2023-10-20 · Miaoxi Zhu, Qihuang Zhong, Li Shen, Liang Ding 외

Quantization is a promising approach for reducing memory overhead and accelerating inference, especially in large pre-trained language model (PLM) scenarios. While having no access to original training data due to securi…

Language ModelingLanguage ModellingQuantization

Learning from Loss Landscape: Generalizable Mixed-Precision Quantization via Adaptive Sharpness-Aware Gradient Aligning

2025-05-08 · Lianbo Ma, Jianlun Ma, Yuee Zhou, Guoyang Xie 외

Mixed Precision Quantization (MPQ) has become an essential technique for optimizing neural network by determining the optimal bitwidth per layer. Existing MPQ methods, however, face a major hurdle: they require a computa…

Quantization

Sharpness-Aware Pretraining Mitigates Catastrophic Forgetting

2026-05-04 · Ishaan Watts, Catherine Li, Sachin Goyal, Jacob Mitchell Springer 외 arxiv

Pretraining optimizers are tuned to produce the strongest possible base model, on the assumption that a stronger starting point yields a stronger model after subsequent changes like post-training and quantization. This o…