arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2110.15225cs.CLcs.LG
收藏

基于A* 搜索的Transformer模型注意头剪枝:一种压缩大NLP体系结构的新方法

Pruning Attention Heads of Transformer Models Using A* Search: A Novel Approach to Compress Big NLP Architectures

University of North Carolina at Charlotte(北卡罗来纳大学夏洛特分校);Corporate Model Risk, Wells Fargo(富国银行企业模型风险部)

Archit Parnami, Rahul Singh, Tarun Joshi

摘要:

近年来,在自然语言处理甚至在计算机视觉中越来越多地采用Transformer模型,例如BERT。然而,由于它们的大小,在资源受限的计算环境中,这种模型的采用有限。提出了一种新的剪枝算法,通过消除冗余的注意头来压缩Transformer模型。我们应用A* 搜索算法来获得具有严格精度保证的修剪模型。实验结果表明,该方法可以消除BERT Transformer模型中多达40%的注意头,而不损失准确性。

英文摘要:

Recent years have seen a growing adoption of Transformer models such as BERT in Natural Language Processing and even in Computer Vision. However, due to their size, there has been limited adoption of such models within resource-constrained computing environments. This paper proposes novel pruning algorithm to compress transformer models by eliminating redundant Attention Heads. We apply the A* search algorithm to obtain a pruned model with strict accuracy guarantees. Our results indicate that the method could eliminate as much as 40% of the attention heads in the BERT transformer model with no loss in accuracy.

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

↑