arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2110.03252cs.CL
收藏

基于Transformer注意头的分层剪枝语言建模

Layer-wise Pruning of Transformer Attention Heads for Efficient Language Modeling

Seoul National University(首尔国立大学);Hanyang University(汉阳大学)

Kyuhong Shim, Iksoo Choi, Wonyong Sung, Jungwook Choi

摘要:

虽然基于transformer的模型已经显示出令人印象深刻的语言建模性能,但大量的计算成本通常使实际使用望而却步。注意头修剪技术是解决这一问题的一种有效方法,它可以去除多个注意头中不必要的注意头。然而,它并没有均匀地减少整体负载,因为重前馈模块不受头部修剪的影响。在本文中,我们将逐层注意力头部修剪应用于全注意力Transformer,使得整个计算和参数的数量可以与修剪头部的数量成比例地减少。虽然该架构有可能充分利用头部修剪,我们提出了三种训练方法,特别有助于最大限度地减少性能下降和稳定的修剪过程。我们的修剪模型在WikiText-103语言建模基准测试中显示出比Transformer-XL更低的困惑度。

英文摘要:

While Transformer-based models have shown impressive language modeling performance, the large computation cost is often prohibitive for practical use. Attention head pruning, which removes unnecessary attention heads in the multihead attention, is a promising technique to solve this problem. However, it does not evenly reduce the overall load because the heavy feedforward module is not affected by head pruning. In this paper, we apply layer-wise attention head pruning on All-attention Transformer so that the entire computation and the number of parameters can be reduced proportionally to the number of pruned heads. While the architecture has the potential to fully utilize head pruning, we propose three training methods that are especially helpful to minimize performance degradation and stabilize the pruning process. Our pruned model shows consistently lower perplexity within a comparable parameter size than Transformer-XL on WikiText-103 language modeling benchmark.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑