arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2212.05326cs.LG
收藏

用于异构推理的量化神经网络的垂直分层

Vertical Layering of Quantized Neural Networks for Heterogeneous Inference

The University of Hong Kong(香港大学)

Hai Wu, Ruifei He, Haoru Tan, Xiaojuan Qi, Kaibin Huang

摘要:

尽管在用于有效推理的神经网络量化方面已经取得了相当大的进展,但是现有方法不能扩展到异构设备,因为需要针对一个特定硬件设置来训练、传输和存储一个专用模型,从而在模型训练和维护方面产生相当大的成本。在本文中,我们研究了一种新的垂直分层表示的神经网络的权重封装成一个单一的量化模型。有了这种表示,我们可以在理论上实现任何精确的网络按需服务,而只需要训练和维护一个模型。为此,我们提出了一个简单的一次量化感知训练(QAT)计划,以获得高性能的垂直分层模型。我们的设计采用了级联下采样机制,该机制允许我们通过逐步将较高精度的权重映射到相邻的较低精度权重,从一个全精度源模型中获得多个量化网络。然后,针对同一源模型的不同位宽的网络,采用多目标优化方法对共享源模型权值进行训练,使其能够同时更新,同时考虑所有网络的性能。通过这样做,共享权重将被优化以平衡不同量化模型的性能,从而使得权重在不同位宽之间可转移。实验结果表明,本文提出的垂直分层表示方法和一次QAT方法能够有效地将多个量化网络合并为一个网络,并允许一次训练,其性能与任何特定位宽的量化模型相当。代码将可用。

英文摘要:

Although considerable progress has been obtained in neural network quantization for efficient inference, existing methods are not scalable to heterogeneous devices as one dedicated model needs to be trained, transmitted, and stored for one specific hardware setting, incurring considerable costs in model training and maintenance. In this paper, we study a new vertical-layered representation of neural network weights for encapsulating all quantized models into a single one. With this representation, we can theoretically achieve any precision network for on-demand service while only needing to train and maintain one model. To this end, we propose a simple once quantization-aware training (QAT) scheme for obtaining high-performance vertical-layered models. Our design incorporates a cascade downsampling mechanism which allows us to obtain multiple quantized networks from one full precision source model by progressively mapping the higher precision weights to their adjacent lower precision counterparts. Then, with networks of different bit-widths from one source model, multi-objective optimization is employed to train the shared source model weights such that they can be updated simultaneously, considering the performance of all networks. By doing this, the shared weights will be optimized to balance the performance of different quantized models, thus making the weights transferable among different bit widths. Experiments show that the proposed vertical-layered representation and developed once QAT scheme are effective in embodying multiple quantized networks into a single one and allow one-time training, and it delivers comparable performance as that of quantized models tailored to any specific bit-width. Code will be available.

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

↑