Skip to main content
QUICK REVIEW

[Paper Review] Blockwise Parallel Decoding for Deep Autoregressive Models

Mitchell Stern, Noam Shazeer|arXiv (Cornell University)|Nov 7, 2018
Image Processing Techniques and ApplicationsEngineering7 citations
TL;DR

This paper proposes blockwise parallel decoding, a technique that accelerates autoregressive sequence generation by predicting multiple tokens in parallel and validating the longest valid prefix using a scoring model. Applied to Transformer models, it achieves up to 3.3x real-time speedup over greedy decoding with minimal quality loss, reducing decoding iterations by up to 2x without performance degradation and up to 7x with slight degradation.

ABSTRACT

Deep autoregressive sequence-to-sequence models have demonstrated impressive performance across a wide variety of tasks in recent years. While common architecture classes such as recurrent, convolutional, and self-attention networks make different trade-offs between the amount of computation needed per layer and the length of the critical path at training time, generation still remains an inherently sequential process. To overcome this limitation, we propose a novel blockwise parallel decoding scheme in which we make predictions for multiple time steps in parallel then back off to the longest prefix validated by a scoring model. This allows for substantial theoretical improvements in generation speed when applied to architectures that can process output sequences in parallel. We verify our approach empirically through a series of experiments using state-of-the-art self-attention models for machine translation and image super-resolution, achieving iteration reductions of up to 2x over a baseline greedy decoder with no loss in quality, or up to 7x in exchange for a slight decrease in performance. In terms of wall-clock time, our fastest models exhibit real-time speedups of up to 4x over standard greedy decoding.

Motivation & Objective

  • To address the inherent sequential bottleneck in autoregressive sequence generation, which limits inference speed despite parallelizable architectures.
  • To enable faster decoding in deep autoregressive models without compromising generation quality.
  • To develop a method compatible with existing models that requires minimal architectural changes.
  • To evaluate the trade-off between decoding speed and performance across diverse sequence-to-sequence tasks.

Proposed method

  • The method trains auxiliary models to predict multiple future tokens in parallel, extending beyond the next token in standard greedy decoding.
  • At inference, the model generates candidate sequences for k future positions in parallel using these auxiliary models.
  • A base model scores all predicted positions simultaneously to validate the longest prefix that would have been generated under greedy decoding.
  • If the validated prefix length exceeds one, the algorithm skips multiple decoding steps, reducing the number of iterations by a factor of up to k.
  • The approach is applied to Transformer-based models for machine translation and image super-resolution, with minimal model modifications.
  • The method is compatible with knowledge distillation and approximate decoding, enabling further speedups at a small cost in quality.

Experimental results

Research questions

  • RQ1Can parallel prediction of multiple tokens in autoregressive models significantly reduce decoding iterations without sacrificing output quality?
  • RQ2How does blockwise parallel decoding compare to existing acceleration techniques in terms of speed and performance trade-offs?
  • RQ3To what extent can this method be applied to existing models with minimal architectural changes?
  • RQ4What is the impact of increasing block size k on speedup and generation quality in sequence-to-sequence tasks?
  • RQ5Can the method be effectively combined with knowledge distillation and approximate decoding for further speed improvements?

Key findings

  • Blockwise parallel decoding achieves up to 3.31x real-time speedup over standard greedy decoding on the English-German translation task, with only 0.29 BLEU points of degradation from the baseline.
  • For k=2, the method reduces decoding iterations by 2x with no loss in quality, maintaining a BLEU score of 28.95 compared to 29.11 for the baseline.
  • At k=8, the method achieves a 3.31x wall-clock speedup while maintaining a BLEU score of 27.88, demonstrating strong scalability.
  • For image super-resolution, the method achieves up to 7x reduction in decoding iterations with a slight performance drop, corresponding to a 4x wall-clock speedup.
  • Human evaluations confirm that blockwise decoded outputs are largely comparable in quality to standard greedy decodes, especially at smaller block sizes.
  • The method is effective across diverse tasks, including machine translation and image generation, and can be combined with distillation and approximate decoding for further gains.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.