Model quantization is challenging due to many tedious hyper-parameters such as precision (bitwidth), dynamic range (minimum and maximum discrete values) and stepsize (interval between discrete values). Unlike prior arts that carefully tune these values, we present a fully differentiable approach to learn all of them, named Differentiable Dynamic Quantization (DDQ), which has several benefits. (1) DDQ is able to quantize challenging lightweight architectures like MobileNets, where different layers prefer different quantization parameters. (2) DDQ is hardware-friendly and can be easily implemented using low-precision matrix-vector multiplication, making it capable in many hardware such as ARM. (3) Extensive experiments show that DDQ outperforms prior arts on many networks and benchmarks, especially when models are already efficient and compact. e.g., DDQ is the first approach that achieves lossless 4-bit quantization for MobileNetV2 on ImageNet.
翻译:模型量化之所以具有挑战性,是因为许多繁琐的超参数,如精度(比特维特)、动态范围(最小值和最大离散值)和阶梯化(离散值之间的交互值)等。 与以往仔细调和这些值的艺术不同,我们提出了一种完全不同的学习方法,称为差异动态量化(DDQ),它有几个好处。 (1) DDQ能够量化具有挑战性的轻量结构,如移动网络,其中不同层次更喜欢不同的量化参数。 (2) DDQ是硬件友好型的,可以使用低精度矩阵-矢量化倍增法轻易实施,使DDQ能够在诸如ARM等许多硬件中发挥作用。 (3) 广泛的实验表明,DDQ在许多网络和基准上超越了先前的艺术,特别是在模型已经高效和紧凑的情况下。 例如,DDQ是第一个在图像网络上实现移动网络2无损四位四位量化的方法。