Speed of Light Exact Greedy Decoding for RNN-T Speech Recognition Models on GPU
Daniel Galvez, Vladimir Bataev, Hainan Xu, Tim Kaldewey
TL;DR
This work tackles the bottleneck of greedy decoding in GPU-based RNN-T speech recognition by introducing an exact GPU-based greedy decoding method that leverages CUDA Graphs with conditional nodes to eliminate GPU idle time. By removing host synchronization and enabling data-dependent control flow entirely on the device, the authors achieve substantial end-to-end speedups (up to 2.51x for a 1.1B Parakeet RNN-T and 2.70x when combined with label looping) and significant decoder-only improvements (up to 6.59x, or 10.40x with label looping). The results demonstrate that a 1.1B RNN-T can approach CTC throughput, challenging the belief that autoregressive models are impractical for high-throughput inference. The method is complementary to existing techniques, generalizes to other autoregressive models, and is available in NVIDIA NeMo.
Abstract
The vast majority of inference time for RNN Transducer (RNN-T) models today is spent on decoding. Current state-of-the-art RNN-T decoding implementations leave the GPU idle ~80% of the time. Leveraging a new CUDA 12.4 feature, CUDA graph conditional nodes, we present an exact GPU-based implementation of greedy decoding for RNN-T models that eliminates this idle time. Our optimizations speed up a 1.1 billion parameter RNN-T model end-to-end by a factor of 2.5x. This technique can applied to the "label looping" alternative greedy decoding algorithm as well, achieving 1.7x and 1.4x end-to-end speedups when applied to 1.1 billion parameter RNN-T and Token and Duration Transducer models respectively. This work enables a 1.1 billion parameter RNN-T model to run only 16% slower than a similarly sized CTC model, contradicting the common belief that RNN-T models are not suitable for high throughput inference. The implementation is available in NVIDIA NeMo.
