FlexiQ动态调整模型精度,兼顾速度与准确率。
FlexiQ: Adaptive Mixed-Precision Quantization for Latency/Accuracy Trade-Offs in Deep Neural Networks
- 按通道值域选择性使用低精度计算,减少误差
- 4比特模型平均准确率提升6.6%,50%通道4比特仅损失0.6%准确率
- 实时自适应调节精度,适合资源波动的部署场景
神经网络通常在NPU和GPU等硬件加速器上运行,但这些加速器成本高且难以应对实时负载波动。本文提出FlexiQ,一种面向计算机视觉模型的自适应混合精度量化方法。该方法针对值域小的特征通道选择性应用低比特计算,并采用高效降比特策略最小化量化误差,同时保持推理精度。此外,FlexiQ可实时调整低比特通道比例,使量化模型有效应对动态推理负载。我们在自研NPU和GPU上实现原型系统并评估了11个基于卷积和Transformer的视觉模型。结果表明,经过微调后,4比特模型平均准确率提升6.6%,优于四种先进量化技术。混合精度模型实现了高效的精度-延迟权衡:50%通道为4比特时,仅损失0.6%准确率,却达到100% 4比特模型相对于8比特模型40%的加速比。NPU与GPU上的延迟测试显示,FlexiQ引入的运行时开销极小,验证了其硬件效率与整体性能优势。
原文摘要 · Abstract (English)
Neural networks commonly execute on hardware accelerators such as NPUs and GPUs for their size and computation overhead. These accelerators are costly and it is hard to scale their resources to handle real-time workload fluctuations. We present FlexiQ, an adaptive mixed-precision quantization scheme for computer vision models. FlexiQ selectively applies low-bitwidth computation to feature channels with small value ranges and employs an efficient bit-lowering method to minimize quantization errors while maintaining inference accuracy. Furthermore, FlexiQ adjusts its low-bitwidth channel ratio in real time, enabling quantized models to effectively manage fluctuating inference workload. We implemented FlexiQ prototype, including the mixed-precision inference runtime on our custom NPU and GPUs. Evaluated on eleven convolution- and transformer-based vision models, FlexiQ achieves on average 6.6% higher accuracy for 4-bit models with finetuning and outperforms four state-of-the-art quantization techniques. Moreover, our mixed-precision models achieved an efficient accuracy-latency trade-off, with the 50% 4-bit model incurring only 0.6% accuracy loss while achieving 40% of the speedup of the 100% 4-bit model over 8-bit model. Latency evaluations on our NPU and GPUs confirmed that FlexiQ introduces minimal runtime overhead, demonstrating its hardware efficiency and overall performance benefits.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。