Abstract
Attention encoder-decoder model architecture is the backbone of several recent top-performing foundation speech models, including Whisper, Seamless, OWSM, and Canary-1B. However, the reported data and compute requirements for their training are prohibitive for many in the research community. In this work, we focus on the efficiency angle, asking whether we are training these speech models efficiently and how we can improve. We argue that a major detrimental factor for training efficiency is the sampling strategy of sequential data. We show that negligence in mini-batch sampling leads to more than 50% of computation being spent on padding. To that end, we study, profile, and optimize Canary-1B training to show gradual improvement in GPU utilization, leading to a 5x increase in average batch sizes versus its original training settings. This allows us to train an equivalent model using 4x fewer GPUs in the same wall time, or leverage the original resources to train it in 2x shorter wall time. Finally, we observe that the major inference bottleneck lies in the autoregressive decoder steps. We find that shifting model parameters from the decoder to the encoder results in a 3x inference speedup as measured by inverse real-time factor (RTFx) while preserving accuracy and compute requirements for convergence.
The "Padding Tax" and Training Inefficiency
Training large-scale speech models is notoriously expensive, often requiring thousands of GPU hours. A primary culprit is the "Padding Tax." Because speech data is inherently variable in length, processing it in mini-batches requires all sequences to be the same length, typically achieved by adding zeros (padding). In standard setups, over 50% of computation is wasted processing these useless tokens.
To address this, we implemented 2D Bucketing and the OOMptimizer. Instead of grouping audio solely by duration, we group data by both audio duration and transcript length. The OOMptimizer tool then finds the maximum batch size that fits in GPU memory for each specific bucket, drastically reducing wasted compute.
Scaling Throughput and Synchronization
As training scales to 128+ GPUs, the "tail-worker" effect—where fast GPUs sit idle waiting for one slow GPU to finish a "heavy" batch—becomes severe. By synchronizing random number generators across the cluster to ensure all GPUs pick similar buckets, we achieved a 20% speedup at high GPU counts.
These optimizations led to a 5x increase in average batch sizes compared to the baseline, allowing for much higher hardware utilization throughout the training process.
Architectural Innovation: Canary-1B-Flash
Beyond training, we identified the autoregressive decoder as the primary inference bottleneck. In standard models, the decoder generates text one token at a time, making it slow if it has many layers. We introduced the Canary-1B-Flash architecture, which reduces the decoder from 24 layers to just 4, while increasing the encoder from 24 to 32 layers. This shift keeps the total parameter count similar but moves the "brains" of the model to the parallelized encoder.
Key Results
- Training Efficiency: The optimized setup allowed training an equivalent model using 4x fewer GPUs in the same time, or training on original hardware 2x faster.
- Inference Speed: The Flash architecture achieved a 3x inference speedup (measured by RTFx).
- Accuracy: Despite these speedups, the Canary-1B-Flash model maintained state-of-the-art performance, achieving a 6.35% WER on the Open ASR Leaderboard.
By minimizing padding and rebalancing model capacity, we have made state-of-the-art speech foundation models significantly more accessible to the research community without sacrificing accuracy.
Summary updated