策略融合优化 Transformer 压缩
Strategic Fusion Optimizes Transformer Compression
AI总结:
本文提出融合层激活、互信息、梯度、权重和注意力等剪枝信号的策略融合方法,并结合知识蒸馏压缩 Transformer,在九个数据集上显著提升准确率与规模效率。
摘要:
本研究通过系统性地剪枝 Transformer 模型的层来考察其压缩。我们在九个不同数据集上评估了14种剪枝策略,其中12种策略基于从层激活、互信息、梯度、权重和注意力中获得的不同信号。为解决单一信号策略的局限,我们提出了两种融合策略,即线性回归和随机森林,它们将各个策略结合起来(即策略融合),以做出更明智的剪枝决策。此外,我们应用知识蒸馏来缓解层剪枝过程中的任何准确率损失。结果表明,随机森林策略融合在九个数据集中的七个上优于单独策略,并在另外两个上取得接近最优的性能。经过蒸馏的随机森林在六个数据集上超过原始准确率,并在其余三个上缓解准确率下降。知识蒸馏还在所有数据集上将准确率与模型规模之比平均提升18.84倍。在数学基础和生物学类比的支持下,我们的发现表明,策略性地组合多种信号可以为资源受限应用带来高效、高性能的 Transformer 模型。
英文摘要:
This study investigates transformer model compression by systematically pruning its layers. We evaluated 14 pruning strategies across nine diverse datasets, including 12 strategies based on different signals obtained from layer activations, mutual information, gradients, weights, and attention. To address the limitations of single-signal strategies, we introduced two fusion strategies, linear regression and random forest, which combine individual strategies (i.e., strategic fusion), for more informed pruning decisions. Additionally, we applied knowledge distillation to mitigate any accuracy loss during layer pruning. Our results reveal that random forest strategic fusion outperforms individual strategies in seven out of nine datasets and achieves near-optimal performance in the other two. The distilled random forest surpasses the original accuracy in six datasets and mitigates accuracy drops in the remaining three. Knowledge distillation also improves the accuracy-to-size ratio by an average factor of 18.84 across all datasets. Supported by mathematical foundations and biological analogies, our findings suggest that strategically combining multiple signals can lead to efficient, high-performing transformer models for resource-constrained applications.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。