通过引导权重多样性压缩视觉Transformer的MLP层,大幅降低参数量且几乎不损失性能。
Diversity-Guided MLP Reduction for Efficient Large Vision Transformers
- 采用格拉姆-施密特正交化策略剪枝MLP冗余神经元,保留权重多样性以提升蒸馏恢复能力。
- 仅需0.06%无标签数据即可恢复大模型性能,参数与计算量减少超57%,部分模型达71.5%。
- 适合追求高效部署的大规模视觉模型研究者,尤其适用于资源受限场景下的模型压缩。
Transformer模型具有优异的可扩展性,但大规模参数带来高昂的计算与内存开销。我们分析主流Transformer结构发现,多层感知机(MLP)模块占据绝大多数参数。为此,我们关注压缩后模型的可恢复性,提出多样性引导的MLP压缩方法(DGMR),显著降低大型视觉Transformer的参数量,同时性能下降可忽略。具体而言,采用格拉姆-施密特权重剪枝策略,剔除MLP隐藏层中的冗余神经元,同时保持权重多样性以增强蒸馏过程中的性能恢复。相比从头训练模型,我们的剪枝模型仅需0.06%的LAION-2B无标签数据(用于大视觉模型训练)和ImageNet-1K数据集即可恢复原始性能。在多个前沿大型视觉Transformer上的实验表明,该方法实现了超过57.0%的参数与FLOPs压缩,近乎无损。特别地,对于EVA-CLIP-E(4.4B),实现71.5%的参数与计算量缩减而无性能损失。源代码与训练权重已公开于https://github.com/visresearch/DGMR。
原文摘要 · Abstract (English)
Transformer models achieve excellent scaling property, where the performance is improved with the increment of model capacity. However, large-scale model parameters lead to an unaffordable cost of computing and memory. We analyze popular transformer architectures and find that multilayer perceptron (MLP) modules take up the majority of model parameters. To this end, we focus on the recoverability of the compressed models and propose a Diversity-Guided MLP Reduction (DGMR) method to significantly reduce the parameters of large vision transformers with only negligible performance degradation. Specifically, we conduct a Gram-Schmidt weight pruning strategy to eliminate redundant neurons of MLP hidden layer, while preserving weight diversity for better performance recover during distillation. Compared to the model trained from scratch, our pruned model only requires 0.06\% data of LAION-2B (for the training of large vision transformers) without labels (ImageNet-1K) to recover the original performance. Experimental results on several state-of-the-art large vision transformers demonstrate that our method achieves a more than 57.0\% parameter and FLOPs reduction in a near lossless manner. Notably, for EVA-CLIP-E (4.4B), our method accomplishes a 71.5\% parameter and FLOPs reduction without performance degradation. The source code and trained weights are available at https://github.com/visresearch/DGMR.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。