UPSCALE: 无约束通道剪枝
UPSCALE: Unconstrained Channel Pruning
AI总结:
针对多分支模型通道剪枝中“解除约束增延迟、施加约束降精度”的两难问题,提出通过导出时通道重排序的通用剪枝算法UPSCALE,兼顾精度提升与推理加速。
摘要:
随着神经网络规模与复杂度不断增长,其推理速度会下降。为解决这一问题,通道剪枝作为最有效的压缩技术之一,会从权重中移除通道。然而,对于模型的多分支结构段,移除通道会引入推理阶段的内存拷贝,这些拷贝会进一步增加推理延迟,甚至可能导致剪枝后的模型比未剪枝的模型更慢。作为一种变通方案,传统剪枝器会约束特定通道必须同步剪枝,这种做法能彻底消除内存拷贝,但正如我们所证实的,会严重损害模型精度。由此我们陷入两难:解除约束会增加延迟,施加约束则会降低精度。针对这一问题,我们的核心思路是在模型导出阶段对通道进行重排序,一方面通过减少内存拷贝降低延迟,另一方面通过解除剪枝约束提升精度。基于这一思路,我们设计了通用算法UPSCALE,可支持任意剪枝模式的模型剪枝。通过为现有剪枝器解除约束,我们将训练后剪枝模型的ImageNet精度平均提升了2.1个百分点,其中DenseNet提升16.9个点,EfficientNetV2提升7.9个点,ResNet提升6.2个点。此外,借助通道重排序,UPSCALE的推理速度相比基线导出方案最高提升至2倍。
英文摘要:
As neural networks grow in size and complexity, inference speeds decline. To combat this, one of the most effective compression techniques -- channel pruning -- removes channels from weights. However, for multi-branch segments of a model, channel removal can introduce inference-time memory copies. In turn, these copies increase inference latency -- so much so that the pruned model can be slower than the unpruned model. As a workaround, pruners conventionally constrain certain channels to be pruned together. This fully eliminates memory copies but, as we show, significantly impairs accuracy. We now have a dilemma: Remove constraints but increase latency, or add constraints and impair accuracy. In response, our insight is to reorder channels at export time, (1) reducing latency by reducing memory copies and (2) improving accuracy by removing constraints. Using this insight, we design a generic algorithm UPSCALE to prune models with any pruning pattern. By removing constraints from existing pruners, we improve ImageNet accuracy for post-training pruned models by 2.1 points on average -- benefiting DenseNet (+16.9), EfficientNetV2 (+7.9), and ResNet (+6.2). Furthermore, by reordering channels, UPSCALE improves inference speeds by up to 2x over a baseline export.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。