We present a differentiable joint pruning and quantization (DJPQ) scheme. We frame neural network compression as a joint gradient-based optimization problem, trading off between model pruning and quantization automatically for hardware efficiency. DJPQ incorporates variational information bottleneck based structured pruning and mixed-bit precision quantization into a single differentiable loss function. In contrast to previous works which consider pruning and quantization separately, our method enables users to find the optimal trade-off between both in a single training procedure. To utilize the method for more efficient hardware inference, we extend DJPQ to integrate structured pruning with power-of-two bit-restricted quantization. We show that DJPQ significantly reduces the number of Bit-Operations (BOPs) for several networks while maintaining the top-1 accuracy of original floating-point models (e.g., 53x BOPs reduction in ResNet18 on ImageNet, 43x in MobileNetV2). Compared to the conventional two-stage approach, which optimizes pruning and quantization independently, our scheme outperforms in terms of both accuracy and BOPs. Even when considering bit-restricted quantization, DJPQ achieves larger compression ratios and better accuracy than the two-stage approach.
翻译:我们提出了一个不同的联合运行和量化( DJPQ) 方案。 我们将神经网络压缩作为基于梯度的优化联合问题框架, 将模型的运行和量化自动交换, 以便实现硬件效率。 DJPQ 将基于结构结构的运行和混合比位精确度的变异信息瓶颈数纳入一个不同的损失函数。 与以前考虑单独运行和量化的工程相比, 我们的方法使用户能够在单一的培训程序中找到两种方法的最佳取舍。 为了使用效率更高的硬件推断方法, 我们扩展 DJPQ, 将结构化的运行与2位限制量的量化自动交换。 我们显示, DJPQ 在保持原始浮点模型的顶级和顶级精度( 例如, 在图像网络的ResNet18中减少53x BOPs, 在移动网络中减少43x)。 与常规的两阶段方法相比, 在独立地实现双级打印和四级化的精确度的精确度时, 我们显示, DPQQ会大幅减少一些网络的位操作数量, 同时保持原始浮点模型的顶级( 例如, ResNet18 方法减少43x NetV2x)。