边缘设备上使用Quantization进行DNN推断的性能表征:扩展版本
Performance Characterization of using Quantization for DNN Inference on Edge Devices: Extended Version
摘要:
量化是深度神经网络(DNN)推理中使用的一种流行技术,用于通过利用本地硬件来减小模型的大小并提高整体数值性能。本文试图使用MLPerf边缘推理基准测试方法,对使用量化技术的好处进行详细的性能表征-主要是静态和动态方案的FP 16/INT 8变体。该研究是在Intel x86处理器和Raspberry Pi设备上进行的。本文使用了许多DNN推理框架,包括OpenVINO(仅适用于英特尔CPU),TensorFlow Lite(TFLite),ONNX和PyTorch以及MobileNetV 2,VGG-19和DenseNet-121。在我们的实验中,MLPerf边缘推理基准测试的单流、多流和离线场景用于测量延迟和吞吐量。我们的评估表明,OpenVINO和TFLite分别是英特尔CPU和树莓派设备的最优化框架。除了静态量化技术外,我们没有观察到精度损失。我们还观察到使用量化对这些优化框架的好处。例如,对于MLPerf离线场景,基于INT 8的量化模型分别在Intel CPU上使用OpenVINO和Raspberry Pi设备上使用TFLite时,提供了比FP 32更好的$3.3\times$和$4\times$性能。据我们所知,本文是第一篇提出独特的表征研究的论文,该研究描述了量化对一系列DNN推理框架的影响-包括OpenVINO,TFLite,PyTorch和ONNX -使用MLPerf Edge Inference基准测试方法在Intel x86处理器和Raspberry Pi设备上使用ARM处理器。
英文摘要:
Quantization is a popular technique used in Deep Neural Networks (DNN) inference to reduce the size of models and improve the overall numerical performance by exploiting native hardware. This paper attempts to conduct an elaborate performance characterization of the benefits of using quantization techniques -- mainly FP16/INT8 variants with static and dynamic schemes -- using the MLPerf Edge Inference benchmarking methodology. The study is conducted on Intel x86 processors and Raspberry Pi device with ARM processor. The paper uses a number of DNN inference frameworks, including OpenVINO (for Intel CPUs only), TensorFlow Lite (TFLite), ONNX, and PyTorch with MobileNetV2, VGG-19, and DenseNet-121. The single-stream, multi-stream, and offline scenarios of the MLPerf Edge Inference benchmarks are used for measuring latency and throughput in our experiments. Our evaluation reveals that OpenVINO and TFLite are the most optimized frameworks for Intel CPUs and Raspberry Pi device, respectively. We observe no loss in accuracy except for the static quantization techniques. We also observed the benefits of using quantization for these optimized frameworks. For example, INT8-based quantized models deliver $3.3\times$ and $4\times$ better performance over FP32 using OpenVINO on Intel CPU and TFLite on Raspberry Pi device, respectively, for the MLPerf offline scenario. To the best of our knowledge, this paper is the first one that presents a unique characterization study characterizing the impact of quantization for a range of DNN inference frameworks -- including OpenVINO, TFLite, PyTorch, and ONNX -- on Intel x86 processors and Raspberry Pi device with ARM processor using the MLPerf Edge Inference benchmark methodology.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。