Practical Conformer: Optimizing size, speed and flops of Conformer for on-Device and cloud ASR

Rami Botros, Anmol Gulati, Tara N. Sainath, Krzysztof Choromanski, Ruoming Pang +3 more
3/31/2023
cs.CLcs.SDeess.AS

No confident code implementation found for this paper.

Abstract

Conformer models maintain a large number of internal states, the vast majority of which are associated with self-attention layers. With limited memory bandwidth, reading these from memory at each inference step can slow down inference. In this paper, we design an optimized conformer that is small enough to meet on-device restrictions and has fast inference on TPUs. We explore various ideas to improve the execution speed, including replacing lower conformer blocks with convolution-only blocks, strategically downsizing the architecture, and utilizing an RNNAttention-Performer. Our optimized conformer can be readily incorporated into a cascaded-encoder setting, allowing a second-pass decoder to operate on its output and improve the accuracy whenever more resources are available. Altogether, we find that these optimizations can reduce latency by a factor of 6.8x, and come at a reasonable trade-off in quality. With the cascaded second-pass, we show that the recognition accuracy is completely recoverable. Thus, our proposed encoder can double as a strong standalone encoder in on device, and as the first part of a high-performance ASR pipeline.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. Any repos shown below are weak matches — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Cite this paper

@article{botros2023practical,
  title  = {Practical Conformer: Optimizing size, speed and flops of Conformer for on-Device and cloud ASR},
  author = {Rami Botros and Anmol Gulati and Tara N. Sainath and Krzysztof Choromanski and Ruoming Pang and Trevor Strohman and Weiran Wang and Jiahui Yu},
  year   = {2023},
  eprint = {2304.00171},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2304.00171v1}
}

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/2304.00171.svg)](https://codeofpaper.com/paper/2304.00171)

Discussion