LazyFormer:延迟更新的自我关注
LazyFormer: Self Attention with Lazy Update
摘要:
提高基于transformer的语言预训练的效率是自然语言处理中的一项重要任务,特别是对于计算量很大的自我注意模块。在本文中,我们提出了一个简单而有效的解决方案,称为\emph{LazyFormer},它不经常计算自我注意力分布。LazyFormer由多个惰性块组成,每个惰性块包含多个Transformer层。在每个惰性块中,自注意力分布仅在第一层中计算一次,然后在所有上层中重用。这样可以大大节省计算成本。我们还为LazyFormer提供了一些训练技巧。大量的实验证明了该方法的有效性。
英文摘要:
Improving the efficiency of Transformer-based language pre-training is an important task in NLP, especially for the self-attention module, which is computationally expensive. In this paper, we propose a simple but effective solution, called \emph{LazyFormer}, which computes the self-attention distribution infrequently. LazyFormer composes of multiple lazy blocks, each of which contains multiple Transformer layers. In each lazy block, the self-attention distribution is only computed once in the first layer and then is reused in all upper layers. In this way, the cost of computation could be largely saved. We also provide several training tricks for LazyFormer. Extensive experiments demonstrate the effectiveness of the proposed method.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。