arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2411.13918cs.CV
收藏

无痛量化

Quantization without Tears

National Key Laboratory for Novel Software Technology, Nanjing University, China(国家新型软件技术重点实验室,南京大学,中国);School of Artificial Intelligence, Nanjing University, China(人工智能学院,南京大学,中国)

Minghao Fu, Hao Yu, Jie Shao, Junjie Zhou, Ke Zhu, Jianxin Wu

AI总结:

提出QwT方法,通过引入轻量线性层结构,实现快速、准确、简单且通用的网络量化,在多种任务中验证有效性。

摘要:

深度神经网络在各类任务中取得显著成功的同时,也消耗大量资源,包括计算、GPU内存、带宽、存储和能源。网络量化作为一种标准的压缩与加速技术,通过将网络权重和激活值离散化为有限集合的整数值,降低了存储成本并实现了潜在的推理加速。然而,当前的量化方法往往复杂且敏感,需要大量针对特定任务的超参数,即使单个配置错误也可能损害模型性能,限制了其在不同模型和任务间的通用性。在本文中,我们提出了无痛量化(QwT)方法,该方法同时实现了量化的速度、精度、简单性和通用性。QwT的关键洞察在于将轻量级附加结构引入量化网络,以减轻量化过程中的信息损失。该结构仅由少量线性层组成,保持了方法的简单性和高效性。更重要的是,它提供了闭式解,使我们能在2分钟内轻松提升精度。在多种视觉、语言和多模态任务上的广泛实验表明,QwT既高效又通用。事实上,我们的方法为网络量化提供了一种结合简单性、准确性和适应性的稳健解决方案,为新型量化范式的设计提供了新见解。代码公开于https://github.com/wujx2001/QwT。

英文摘要:

Deep neural networks, while achieving remarkable success across diverse tasks, demand significant resources, including computation, GPU memory, bandwidth, storage, and energy. Network quantization, as a standard compression and acceleration technique, reduces storage costs and enables potential inference acceleration by discretizing network weights and activations into a finite set of integer values. However, current quantization methods are often complex and sensitive, requiring extensive task-specific hyperparameters, where even a single misconfiguration can impair model performance, limiting generality across different models and tasks. In this paper, we propose Quantization without Tears (QwT), a method that simultaneously achieves quantization speed, accuracy, simplicity, and generality. The key insight of QwT is to incorporate a lightweight additional structure into the quantized network to mitigate information loss during quantization. This structure consists solely of a small set of linear layers, keeping the method simple and efficient. More importantly, it provides a closed-form solution, allowing us to improve accuracy effortlessly under 2 minutes. Extensive experiments across various vision, language, and multimodal tasks demonstrate that QwT is both highly effective and versatile. In fact, our approach offers a robust solution for network quantization that combines simplicity, accuracy, and adaptability, which provides new insights for the design of novel quantization paradigms. The code is publicly available at https://github.com/wujx2001/QwT

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑