arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2503.05931cs.CLeess.AS
收藏

编码器-解码器语音模型的训练与推理效率

Training and Inference Efficiency of Encoder-Decoder Speech Models

NVIDIA(英伟达)

Piotr Żelasko, Kunal Dhawan, Daniel Galvez, Krishna C. Puvvada, Ankita Pasad, Nithin Rao Koluguri, Ke Hu, Vitaly Lavrukhin, Jagadeesh Balam, Boris Ginsburg

AI总结:

针对语音编码器-解码器基础模型训练计算成本高的问题,通过优化小批量采样策略提升Canary-1B训练GPU利用率与批量规模,还通过调整架构转移参数实现3倍推理加速且保持精度。

摘要:

注意力编码器-解码器模型架构是近期多款性能顶尖的语音基础模型的核心支柱,这些模型包括Whisper、Seamless、OWSM以及Canary-1B。然而,已有公开的这类模型训练所需的数据量与计算资源,对研究领域的多数从业者而言门槛过高、难以承担。在本研究中,我们从效率角度切入,探讨两个核心问题:当前我们对这类语音模型的训练是否高效?以及我们可以通过哪些手段提升效率?我们提出,训练效率的一大关键损害因素(即便算不上最严重的)与序列数据的采样策略相关。我们的研究表明,小批量采样环节的疏忽会导致超过50%的计算资源被消耗在填充(padding)操作上。为此,我们对Canary-1B的训练流程开展研究、性能剖析与优化,逐步提升GPU利用率,最终实现平均批量大小较原始训练设置提升5倍的效果。这一效率提升反过来让我们能够在相同的实际运行时间内,用少4倍的GPU训练出性能等效的模型;或是沿用原有资源,将训练耗时缩短2倍。最后,我们观察到推理阶段的主要瓶颈在于自回归解码器的步骤。我们发现,调整模型架构、将模型参数从解码器转移至编码器的方案,能够以逆实时因子(RTFx)衡量的推理速度提升3倍,同时保持模型精度不变,且不增加收敛所需的计算量。训练代码与模型将以开源形式发布。

英文摘要:

Attention encoder-decoder model architecture is the backbone of several recent top performing foundation speech models: 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 and ask the questions of whether we are training these speech models efficiently, and what can we do to improve? We argue that a major, if not the most severe, detrimental factor for training efficiency is related to the sampling strategy of sequential data. We show that negligence in mini-batch sampling leads to more than 50% computation being spent on padding. To that end, we study, profile, and optimize Canary-1B training to show gradual improvement in GPU utilization leading up to 5x increase in average batch sizes versus its original training settings. This in turn allows us to train an equivalent model using 4x less GPUs in the same wall time, or leverage the original resources and train it in 2x shorter wall time. Finally, we observe that the major inference bottleneck lies in the autoregressive decoder steps. We find that adjusting the model architecture to transfer model parameters from the decoder to the encoder results in a 3x inference speedup as measured by inverse real-time factor (RTFx) while preserving the accuracy and compute requirements for convergence. The training code and models will be available as open-source.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑