arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 1802.05668cs.NEcs.LG
收藏

通过蒸馏和quantization进行模型压缩

Model compression via distillation and quantization

ETH Zürich(苏黎世联邦理工学院);Google DeepMind(谷歌DeepMind);IST Austria(奥地利科学技术研究所)

Antonio Polino, Razvan Pascanu, Dan Alistarh

摘要:

深度神经网络(DNN)继续取得重大进展,解决从图像分类到翻译或强化学习的任务。该领域受到相当大关注的一个方面是在资源受限的环境中有效地执行深度模型,例如移动或嵌入式设备。本文针对这一问题,提出了两种新的压缩方法,它们联合利用权重量化和将较大的教师网络蒸馏成较小的学生网络。我们提出的第一种方法被称为量化蒸馏,并在训练过程中利用蒸馏,通过将蒸馏损失(相对于教师表示)纳入学生网络的训练中,该网络的权重被量化到有限的一组水平。第二种方法是可微分量化,通过随机梯度下降优化量化点的位置,以更好地拟合教师模型的行为。我们通过对卷积和递归架构的实验来验证这两种方法。我们表明,量化的浅学生可以达到类似的精度水平,全精度教师模型,同时提供数量级压缩,推理加速,是线性的深度减少。总之,我们的研究结果使DNN能够在资源受限的环境中利用在更强大的设备上开发的架构和准确性进步。

英文摘要:

Deep neural networks (DNNs) continue to make significant advances, solving tasks from image classification to translation or reinforcement learning. One aspect of the field receiving considerable attention is efficiently executing deep models in resource-constrained environments, such as mobile or embedded devices. This paper focuses on this problem, and proposes two new compression methods, which jointly leverage weight quantization and distillation of larger teacher networks into smaller student networks. The first method we propose is called quantized distillation and leverages distillation during the training process, by incorporating distillation loss, expressed with respect to the teacher, into the training of a student network whose weights are quantized to a limited set of levels. The second method, differentiable quantization, optimizes the location of quantization points through stochastic gradient descent, to better fit the behavior of the teacher model. We validate both methods through experiments on convolutional and recurrent architectures. We show that quantized shallow students can reach similar accuracy levels to full-precision teacher models, while providing order of magnitude compression, and inference speedup that is linear in the depth reduction. In sum, our results enable DNNs for resource-constrained environments to leverage architecture and accuracy advances developed on more powerful devices.

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

↑