合并前馈子层以压缩Transformer
Merging Feed-Forward Sublayers for Compressed Transformers
AI总结:
提出一种通过选择、对齐和合并Transformer中相似前馈子层的新型模型压缩方法,在保持99%性能的同时移除超21%参数,优于层剪枝基线。
摘要:
随着更大深度学习模型的兴起与普及,为了广泛部署这些模型,对高质量压缩技术的需求日益增长。这些模型庞大的参数量使其难以适应不同硬件的内存限制。在本研究中,我们提出了一种新颖的模型压缩方法,通过合并模型内相似的参数组,而不是剪枝掉不重要的参数。具体而言,我们选择、对齐并合并Transformer模型中独立的feed-forward sublayers,并在语言建模、图像分类和机器翻译任务上测试了我们的方法。通过我们的方法,在合并了超过三分之一的模型feed-forward sublayers的同时,展示了与原始模型相当的性能,并且相对于强大的层剪枝基线表现出更优的性能。例如,我们可以从Vision Transformer中移除超过21%的总参数,同时保持其99%的原始性能。此外,我们观察到部分feed-forward sublayers组表现出高激活相似性,这可能有助于解释它们令人惊讶的可合并性。
英文摘要:
With the rise and ubiquity of larger deep learning models, the need for high-quality compression techniques is growing in order to deploy these models widely. The sheer parameter count of these models makes it difficult to fit them into the memory constraints of different hardware. In this work, we present a novel approach to model compression by merging similar parameter groups within a model, rather than pruning away less important parameters. Specifically, we select, align, and merge separate feed-forward sublayers in Transformer models, and test our method on language modeling, image classification, and machine translation. With our method, we demonstrate performance comparable to the original models while combining more than a third of model feed-forward sublayers, and demonstrate improved performance over a strong layer-pruning baseline. For instance, we can remove over 21% of total parameters from a Vision Transformer, while maintaining 99% of its original performance. Additionally, we observe that some groups of feed-forward sublayers exhibit high activation similarity, which may help explain their surprising mergeability.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。