Towards More Efficient Insertion Transformer with Fractional Positional Encoding

Zhisong Zhang, Yizhe Zhang, Bill Dolan
12/12/2021
cs.CL
transformer-attention

Official code: zzsfornlp/zgen1 (0 stars, Python, GPL-3.0, last commit 2023-01-22).

Abstract

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.

Show full abstract

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.

View on arXivView PDF

Code Implementations(1)

zzsfornlp/zgen1Official100%
GPL-3.0

An Insertion-based Text Generator

01Python, PerlJan 22, 20233 years agoGPL-3.0

Similar Papers

Cite this paper

@article{zhang2021towards,
  title  = {Towards More Efficient Insertion Transformer with Fractional Positional Encoding},
  author = {Zhisong Zhang and Yizhe Zhang and Bill Dolan},
  year   = {2021},
  eprint = {2112.06295},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2112.06295}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2112.06295.svg)](https://codeofpaper.com/paper/2112.06295)

Discussion