Accelerating Inference and Language Model Fusion of Recurrent Neural Network Transducers via End-to-End 4-bit Quantization

Andrea Fasoli, Chia-Yu Chen, Mauricio J. Serrano, Swagath Venkataramani, George Saon, Xiaodong Cui, Brian Kingsbury, Kailash Gopalakrishnan

Abstract

We report on aggressive quantization strategies that greatly accelerate inference of Recurrent Neural Network Transducers (RNN-T). We use a 4 bit integer representation for both weights and activations and apply Quantization Aware Training (QAT) to retrain the full model (acoustic encoder and language model) and achieve near-iso-accuracy. We show that customized quantization schemes that are tailored to the local properties of the network are essential to achieve good performance while limiting the computational overhead of QAT. Density ratio Language Model fusion has shown remarkable accuracy gains on RNN-T workloads but it severely increases the computational cost of inference. We show that our quantization strategies enable using large beam widths for hypothesis search while achieving streaming-compatible runtimes and a full model compression ratio of 7.6x compared to the full precision model. Via hardware simulations, we estimate a 3.4x acceleration from FP16 to INT4 for the end-to-end quantized RNN-T inclusive of LM fusion, resulting in a Real Time Factor (RTF) of 0.06. On the NIST Hub5 2000, Hub5 2001, and RT-03 test sets, we retain most of the gains associated with LM fusion, improving the average WER by >1.5%.

Introduction

Recurrent Neural Network Transducer (RNN-T) models are a cornerstone of modern streaming speech recognition. To reach state-of-the-art performance, these models often employ "Language Model (LM) Fusion," integrating external LMs during the decoding process. However, this fusion significantly increases the computational burden and memory footprint, making deployment on edge devices or specialized accelerators challenging. While 8-bit quantization is common, pushing to 4-bit (INT4) often results in a significant "quantization cliff" where accuracy drops precipitously. This paper presents a strategy for aggressive 4-bit quantization across the entire RNN-T and LM fusion pipeline, achieving substantial speedups without sacrificing the accuracy benefits of external language models.

Methods and Architecture

The researchers utilized Quantization Aware Training (QAT) to allow the model to adapt to low-precision noise during retraining. Their approach is defined by three primary innovations:

  1. Tailored Quantizers: Instead of uniform quantization, the team applied specific schemes based on layer function. They used SAWB (Statistics Aware Weight Binning) for weights and FIX (fixed boundaries) for LSTM activations. Since LSTM outputs are naturally constrained to the $[-1, 1]$ range by activation functions, fixed boundaries simplify computation while maintaining precision.
  2. "Outer" Quantization: In standard LMs, quantization often occurs at every internal step. The authors introduced "Outer" quantization, where the cell output is quantized once before being passed to subsequent steps or layers. This optimization reduces activation quantization calls in the encoder by approximately 45%.
  3. End-to-End Quantization: The entire inference workload, including the core RNN-T and the external "Source" and "Density" LMs, was quantized to 4 bits to maximize hardware acceleration benefits.
Model architecture illustrating the integration of RNN-T with external LMs and the proposed 'Outer Q' vs 'Inner Q' LSTM cell designs.

Experimental Results

The models were evaluated on telephonic speech benchmarks including Switchboard-1 and NIST Hub5 sets. Hardware simulations of a custom AI accelerator were used to measure performance gains.

Inference Speed and Efficiency

The transition from FP16 to a full INT4 pipeline yielded a 3.4x acceleration. The system achieved a Real-Time Factor (RTF) of 0.06, meaning it can process audio 16 times faster than real-time. Furthermore, the model achieved a 7.6x compression ratio compared to the FP32 baseline, significantly lowering memory requirements.

Real-Time Factor (RTF) analysis: (a) shows the reduction in RTF across different quantization precisions, and (b) demonstrates the impact of beam width on inference latency.

Accuracy and Insights

Crucially, the 4-bit model maintained the accuracy gains provided by LM fusion. On the Hub5 2000 dataset, the INT4 fused model reached a Word Error Rate (WER) of 10.7%, nearly matching the non-quantized fused version and significantly outperforming the non-fused FP32 baseline (11.8%).

Key insights from the study include:

  • Activation Quantization is Essential: To unlock the full potential of integer-only Multiply-Accumulate (MAC) units in modern hardware, activations must be quantized alongside weights.
  • Sensitivity of the First Layer: The first layer of the acoustic encoder was found to be highly sensitive; keeping it at 8-bit precision stabilized the entire pipeline with minimal computational overhead (<10%).

Conclusion

This work demonstrates that aggressive 4-bit quantization is a viable path for high-performance, streaming speech recognition. By tailoring quantization strategies to the specific properties of RNN-T and LSTM components, researchers can achieve significant hardware acceleration and model compression while preserving the accuracy benefits of complex LM fusion techniques. Future research will focus on extending these strategies to newer architectures, such as Conformer-based transducers.

Summary updated

BibTeX
@inproceedings{fasoli2022accelerating,
  author = {Andrea Fasoli and Chia-Yu Chen and Mauricio J. Serrano and Swagath Venkataramani and George Saon and Xiaodong Cui and Brian Kingsbury and Kailash Gopalakrishnan},
  title = {{Accelerating Inference and Language Model Fusion of Recurrent Neural Network Transducers via End-to-End 4-bit Quantization}},
  booktitle = {Interspeech},
  year = {2022},
  url = {https://openreview.net/forum?id=8FGN8DwyXu},
}
Figure