Autoregressive decoding limits the efficiency of transformers for Machine Translation (MT). The community proposed specific network architectures and learning-based methods to solve this issue, which are expensive and require changes to the MT model, trading inference speed at the cost of the translation quality. In this paper, we propose to address the problem from the point of view of decoding algorithms, as a less explored but rather compelling direction. We propose to reframe the standard greedy autoregressive decoding of MT with a parallel formulation leveraging Jacobi and Gauss-Seidel fixed-point iteration methods for fast inference. This formulation allows to speed up existing models without training or modifications while retaining translation quality. We present three parallel decoding algorithms and test them on different languages and models showing how the parallelization introduces a speedup up to 38% w.r.t. the standard autoregressive decoding and nearly 2x when scaling the method on parallel resources. Finally, we introduce a decoding dependency graph visualizer (DDGviz) that let us see how the model has learned the conditional dependence between tokens and inspect the decoding procedure.

Accelerating Transformer Inference for Translation via Parallel Decoding / Santilli, Andrea; Severino, Silvio; Postolache, Emilian; Maiorca, Valentino; Mancusi, Michele; Marin, Riccardo; Rodola, Emanuele. - Volume 1:(2023), pp. 12336-12355. (Intervento presentato al convegno The 61st Annual Meeting of the Association for Computational Linguistics tenutosi a Toronto, Canada) [10.18653/v1/2023.acl-long.689].

Accelerating Transformer Inference for Translation via Parallel Decoding

Andrea Santilli
Primo
;
Silvio Severino
Secondo
;
Emilian Postolache;Valentino Maiorca;Michele Mancusi;Riccardo Marin
Penultimo
;
Emanuele Rodola
Ultimo
2023

Abstract

Autoregressive decoding limits the efficiency of transformers for Machine Translation (MT). The community proposed specific network architectures and learning-based methods to solve this issue, which are expensive and require changes to the MT model, trading inference speed at the cost of the translation quality. In this paper, we propose to address the problem from the point of view of decoding algorithms, as a less explored but rather compelling direction. We propose to reframe the standard greedy autoregressive decoding of MT with a parallel formulation leveraging Jacobi and Gauss-Seidel fixed-point iteration methods for fast inference. This formulation allows to speed up existing models without training or modifications while retaining translation quality. We present three parallel decoding algorithms and test them on different languages and models showing how the parallelization introduces a speedup up to 38% w.r.t. the standard autoregressive decoding and nearly 2x when scaling the method on parallel resources. Finally, we introduce a decoding dependency graph visualizer (DDGviz) that let us see how the model has learned the conditional dependence between tokens and inspect the decoding procedure.
2023
The 61st Annual Meeting of the Association for Computational Linguistics
natural language processing; parallel decoding; jacobi decoding; speculative decoding; efficient decoding method
04 Pubblicazione in atti di convegno::04b Atto di convegno in volume
Accelerating Transformer Inference for Translation via Parallel Decoding / Santilli, Andrea; Severino, Silvio; Postolache, Emilian; Maiorca, Valentino; Mancusi, Michele; Marin, Riccardo; Rodola, Emanuele. - Volume 1:(2023), pp. 12336-12355. (Intervento presentato al convegno The 61st Annual Meeting of the Association for Computational Linguistics tenutosi a Toronto, Canada) [10.18653/v1/2023.acl-long.689].
File allegati a questo prodotto
Non ci sono file associati a questo prodotto.

I documenti in IRIS sono protetti da copyright e tutti i diritti sono riservati, salvo diversa indicazione.

Utilizza questo identificativo per citare o creare un link a questo documento: https://hdl.handle.net/11573/1706544
 Attenzione

Attenzione! I dati visualizzati non sono stati sottoposti a validazione da parte dell'ateneo

Citazioni
  • ???jsp.display-item.citation.pmc??? ND
  • Scopus ND
  • ???jsp.display-item.citation.isi??? ND
social impact