NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

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, Trevor Strohman, Weiran Wang, Jiahui YuarXiv 2023 · DOI

Introduction

The Conformer architecture has become the gold standard for Automatic Speech Recognition (ASR) due to its unique ability to model both local dependencies via convolutions and global dependencies via self-attention. However, deploying these models for streaming ASR presents a significant "state" problem.

In streaming applications, the model processes audio frame-by-frame. Standard self-attention requires the system to store and reload "key" and "value" tensors (the KV-cache) for every previous frame at every step. For a typical 12-layer Conformer, this results in nearly 30x more internal states than an equivalent LSTM model. This creates a massive memory-bandwidth bottleneck on hardware like TPUs, where the time spent moving data from memory to the processor often outweighs the actual computation time. This paper introduces the "Practical Conformer," designed to fit within a low-cost profile: under 50M parameters, under 100M FLOPs, and less than 5ms latency per frame on cloud TPUs.

Architectural Optimizations

The researchers optimized the Conformer through three primary architectural shifts aimed at reducing the state bottleneck without sacrificing accuracy.

1. Removing Low-Level Attention

The authors hypothesized that the first few layers of an ASR model primarily learn low-level acoustic features that do not require global context. By replacing the self-attention modules in these bottom layers with convolution-only blocks, they significantly reduced the number of states the model must manage with negligible impact on phoneme recognition.

2. RNNAttention-Performers

For the remaining higher-level attention layers, the team swapped standard quadratic self-attention for Performers. Performers utilize a linear attention mechanism via the Fast Attention Via Positive Orthogonal Random Features (FAVOR+) algorithm. Specifically, they implemented an "RNNAttention" variant that mimics the causal, unidirectional nature of streaming speech, avoiding the materialization of massive attention matrices.

3. Cascaded Encoding Strategy

To ensure the optimized model maintained high quality, the researchers employed a cascaded decoding strategy. The optimized, low-latency model acts as a "first-pass" causal encoder. If additional compute is available, a "second-pass" non-causal encoder processes the first pass's output to refine the results using future context.

The cascaded encoder architecture utilizes a causal first-pass and a non-causal second-pass to balance latency and accuracy.

Key Results and Efficiency

The Practical Conformer achieved dramatic improvements in efficiency across all target metrics. By focusing on memory bandwidth rather than just FLOPs, the researchers addressed the real-world bottleneck of streaming Transformers.

  • Latency: The optimized model achieved a per-frame TPU latency of 3.2ms, a 6.8x speedup over the 21.8ms baseline.
  • Efficiency: Model size was reduced by 2.1x (from 120M to 56M parameters), and total FLOPs dropped from 247M to 93M.
  • Accuracy: While the standalone optimized model saw a slight Word Error Rate (WER) increase to 7.7%, the cascaded setup reached a final accuracy of 5.8% WER, actually outperforming the original large baseline while maintaining fast initial output.
Comparison of the baseline Conformer versus the optimized Practical Conformer across WER, latency, size, and FLOPs.

Conclusion

The Practical Conformer demonstrates that linear attention mechanisms and strategic layer pruning are mature enough for production-grade ASR. By acknowledging that memory bandwidth—not just raw computation—is the primary constraint for streaming models, this research provides a blueprint for deploying high-performance Transformer-based architectures on resource-constrained on-device and cloud hardware.

Summary updated

BibTeX
@misc{botros2023practical,
  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},
  title = {{Practical Conformer: Optimizing size, speed and flops of Conformer for on-Device and cloud ASR}},
  year = {2023},
  eprint = {2304.00171},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2304.00171},
}
Figure