arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2112.06295cs.CL
收藏

基于分数位置编码的高效插入Transformer

Towards More Efficient Insertion Transformer with Fractional Positional Encoding

Carnegie Mellon University(卡内基梅隆大学);Apple Inc.(苹果公司);Microsoft Research(微软研究院)

Zhisong Zhang, Yizhe Zhang, Bill Dolan

摘要:

自回归神经序列模型已被证明在文本生成任务中是有效的。然而,它们从左到右的解码顺序阻止了并行生成。插入式Transformer(Stern等人,2019)是一个有吸引力的替代方案,它允许在单个生成步骤中输出多个令牌。然而,由于绝对位置编码和基于插入的生成方案之间的不兼容性,需要在每个步骤刷新所生成的部分假设中的每个标记的编码,这可能是昂贵的。我们设计了一种新的可重用的位置编码方案的插入Transformers称为分数位置编码(FPE),它允许重用表示计算在前面的步骤。对各种文本生成任务的实证研究证明了FPE的有效性,它可以减少浮点运算并改善批量解码的延迟。

英文摘要:

Auto-regressive neural sequence models have been shown to be effective across text generation tasks. However, their left-to-right decoding order prevents generation from being parallelized. Insertion Transformer (Stern et al., 2019) is an attractive alternative that allows outputting multiple tokens in a single generation step. Nevertheless, due to the incompatibility between absolute positional encoding and insertion-based generation schemes, it needs to refresh the encoding of every token in the generated partial hypothesis at each step, which could be costly. We design a novel reusable positional encoding scheme for Insertion Transformers called Fractional Positional Encoding (FPE), which allows reusing representations calculated in previous steps. Empirical studies on various text generation tasks demonstrate the effectiveness of FPE, which leads to floating-point operation reduction and latency improvements on batched decoding.

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

↑