针对语音识别中大模型推理慢的问题,提出专用加速框架SpecASR。
SpecASR: Accelerating LLM-based Automatic Speech Recognition via Speculative Decoding
- 基于语音识别的音频条件特性,动态调整候选词序列长度以提升生成效率。
- 通过复用历史生成序列和稀疏树结构,实现3.04至3.79倍的推理加速。
- 适合追求实时性但不牺牲准确率的语音识别系统开发者使用。
基于大语言模型(LLM)的自动语音识别(ASR)因识别准确率高和多方言支持能力强而受到关注,但其高解码延迟难以满足实时性要求。尽管推测解码已被用于提升效率,但现有方法常忽略语音识别任务的关键特性,加速效果有限。本文提出专为语音识别设计的推测解码框架SpecASR。核心观察是:尽管中间步骤存在输出差异,小模型与大模型在语音输入条件下仍具有高度输出对齐性。因此,SpecASR采用自适应草案序列生成机制,动态调节草案长度以最大化可接受令牌数;提出草案序列复用策略,降低小模型延迟;并引入两阶段稀疏令牌树生成算法,平衡草案与目标模型延迟。实验表明,SpecASR在不损失识别准确率的前提下,相较基线自回归解码提速3.04×–3.79×,相比传统推测解码提速1.25×–1.84×。
原文摘要 · Abstract (English)
Large language model (LLM)-based automatic speech recognition (ASR) has recently attracted a lot of attention due to its high recognition accuracy and enhanced multi-dialect support. However, the high decoding latency of LLMs challenges the real-time ASR requirements. Although speculative decoding has been explored for better decoding efficiency, they usually ignore the key characteristics of the ASR task and achieve limited speedup. To further reduce the real-time ASR latency, in this paper, we propose a novel speculative decoding framework specialized for ASR, dubbed SpecASR. SpecASR is developed based on our core observation that ASR decoding is audio-conditioned, which results in high output alignment between small and large ASR models, even given output mismatches in intermediate decoding steps. Therefore, SpecASR features an adaptive draft sequence generation process that dynamically modifies the draft sequence length to maximize the token acceptance length. SpecASR further proposes a draft sequence recycling strategy that reuses the previously generated draft sequence to reduce the draft ASR model latency. Moreover, a two-pass sparse token tree generation algorithm is also proposed to balance the latency of draft and target ASR models. With extensive experimental results, we demonstrate SpecASR achieves 3.04x-3.79x and 1.25x-1.84x speedup over the baseline autoregressive decoding and speculative decoding, respectively, without any loss in recognition accuracy.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。