Lightweight and effective models are essential for devices with limited resources, such as intelligent vehicles. Structured pruning offers a promising approach to model compression and efficiency enhancement. However, existing methods often tie pruning techniques to specific model architectures or vision tasks. To address this limitation, we propose a novel unified pruning framework Comb, Prune, Distill (CPD), which addresses both model-agnostic and task-agnostic concerns simultaneously. Our framework employs a combing step to resolve hierarchical layer-wise dependency issues, enabling architecture independence. Additionally, the pruning pipeline adaptively remove parameters based on the importance scoring metrics regardless of vision tasks. To support the model in retaining its learned information, we introduce knowledge distillation during the pruning step. Extensive experiments demonstrate the generalizability of our framework, encompassing both convolutional neural network (CNN) and transformer models, as well as image classification and segmentation tasks. In image classification we achieve a speedup of up to x4.3 with a accuracy loss of 1.8% and in semantic segmentation up to x1.89 with a 5.1% loss in mIoU.
翻译:轻量级且高效的模型对于资源受限设备(如智能车辆)至关重要。结构化剪枝为模型压缩与效率提升提供了一种前景广阔的方法。然而,现有方法通常将剪枝技术与特定模型架构或视觉任务绑定。为克服这一局限,我们提出了一种新颖的统一剪枝框架——梳理、剪枝、蒸馏(CPD),该框架同时解决了模型无关性与任务无关性问题。我们的框架采用梳理步骤以解决层次化层间依赖问题,从而实现架构独立性。此外,剪枝流程能够根据重要性评分指标自适应地移除参数,且不依赖于具体视觉任务。为支持模型保留已学习信息,我们在剪枝步骤中引入了知识蒸馏。大量实验证明了我们框架的泛化能力,其涵盖卷积神经网络(CNN)与Transformer模型,以及图像分类与分割任务。在图像分类任务中,我们实现了最高4.3倍的加速,精度损失仅为1.8%;在语义分割任务中,实现了最高1.89倍的加速,mIoU损失为5.1%。