arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2302.01382cs.LG
收藏

灵敏度引导搜索的神经网络混合精度后训练Quantization

Mixed Precision Post Training Quantization of Neural Networks with Sensitivity Guided Search

University of Notre Dame(圣母大学);Google LLC(谷歌有限责任公司)

Clemens JS Schaefer, Elfie Guo, Caitlin Stanton, Xiaofan Zhang, Tom Jablin, Navid Lambert-Shirzad, Jian Li, Chiachen Chou, Siddharth Joshi, Yu Emma Wang

摘要:

由于模型大小和复杂性的增加,高效且低延迟地服务大规模机器学习(ML)模型变得具有挑战性。量化模型可以同时减少内存和计算需求,促进其广泛访问。然而,对于大型模型,并非所有层都同样适用于相同的数值精度,并且激进的量化可能导致模型精度的不可接受的损失。防止这种精度下降的一种方法是混合精度量化,它允许不同的张量被量化到不同的数值精度水平,利用现代硬件的能力。这种混合精度量化可以更有效地将数值精度分配给不同的张量,以保持模型的准确性,同时减少占用空间和计算延迟。在本文中,我们提出了一种方法来有效地确定不同的张量在ML模型中使用后训练混合精度量化的量化配置。我们分析了三个敏感性指标,并评估他们指导配置搜索的两个算法。我们评估了我们的计算机视觉和自然语言处理方法,并证明与基线16位浮点模型相比,延迟降低了27.59%和34.31%,同时保证不超过1%的准确性下降。

英文摘要:

Serving large-scale machine learning (ML) models efficiently and with low latency has become challenging owing to increasing model size and complexity. Quantizing models can simultaneously reduce memory and compute requirements, facilitating their widespread access. However, for large models not all layers are equally amenable to the same numerical precision and aggressive quantization can lead to unacceptable loss in model accuracy. One approach to prevent this accuracy degradation is mixed-precision quantization, which allows different tensors to be quantized to varying levels of numerical precision, leveraging the capabilities of modern hardware. Such mixed-precision quantiztaion can more effectively allocate numerical precision to different tensors `as needed' to preserve model accuracy while reducing footprint and compute latency. In this paper, we propose a method to efficiently determine quantization configurations of different tensors in ML models using post-training mixed precision quantization. We analyze three sensitivity metrics and evaluate them for guiding configuration search of two algorithms. We evaluate our method for computer vision and natural language processing and demonstrate latency reductions of up to 27.59% and 34.31% compared to the baseline 16-bit floating point model while guaranteeing no more than 1% accuracy degradation.

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

↑