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

SpaceEvo:用于高效INT8推理的硬件友好搜索空间设计

SpaceEvo: Hardware-Friendly Search Space Design for Efficient INT8 Inference

Microsoft Research(微软研究院);Microsoft(微软);Shanghai Jiao Tong University(上海交通大学)

Li Lyna Zhang, Xudong Wang, Jiahang Xu, Quanlu Zhang, Yujing Wang, Yuqing Yang, Ningxin Zheng, Ting Cao, Mao Yang

摘要:

神经结构搜索(NAS)和量化的结合已被证明是成功的自动设计低浮点数INT 8量化神经网络(QNN)。然而,直接应用NAS来设计精确的QNN模型,在现实世界的设备上实现低延迟会导致性能低下。在这项工作中,我们发现差的INT 8延迟是由于量化不友好的问题:操作员和配置(例如,信道宽度)选择导致不同的量化效率,并可能减慢INT 8推断速度。为了解决这一挑战,我们提出了SpaceEvo,一个自动的方法为每个目标硬件设计一个专用的,量化友好的搜索空间。SpaceEvo的核心思想是自动搜索硬件首选的操作符和配置来构建搜索空间,由称为Q-T得分的度量来量化候选搜索空间的量化友好程度。我们进一步在我们发现的搜索空间上训练一个量化的超网,使搜索到的模型能够直接部署,而无需额外的重新训练或量化。我们发现的模型在各种延迟约束下建立了新的SOTA INT 8量化精度,在相同延迟下,ImageNet的精度比现有技术的CNN提高了10.1%。在各种边缘设备上进行的大量实验表明,SpaceEvo始终优于现有的手动设计的搜索空间,速度快2.5倍,同时达到相同的精度。

英文摘要:

The combination of Neural Architecture Search (NAS) and quantization has proven successful in automatically designing low-FLOPs INT8 quantized neural networks (QNN). However, directly applying NAS to design accurate QNN models that achieve low latency on real-world devices leads to inferior performance. In this work, we find that the poor INT8 latency is due to the quantization-unfriendly issue: the operator and configuration (e.g., channel width) choices in prior art search spaces lead to diverse quantization efficiency and can slow down the INT8 inference speed. To address this challenge, we propose SpaceEvo, an automatic method for designing a dedicated, quantization-friendly search space for each target hardware. The key idea of SpaceEvo is to automatically search hardware-preferred operators and configurations to construct the search space, guided by a metric called Q-T score to quantify how quantization-friendly a candidate search space is. We further train a quantized-for-all supernet over our discovered search space, enabling the searched models to be directly deployed without extra retraining or quantization. Our discovered models establish new SOTA INT8 quantized accuracy under various latency constraints, achieving up to 10.1% accuracy improvement on ImageNet than prior art CNNs under the same latency. Extensive experiments on diverse edge devices demonstrate that SpaceEvo consistently outperforms existing manually-designed search spaces with up to 2.5x faster speed while achieving the same accuracy.

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

↑