[论文解读] A Simplified Fully Quantized Transformer for End-to-end Speech Recognition
本文提出一种简化的全量化Transformer模型,用于端到端语音识别,在不损失性能的前提下通过移除解码器侧卷积、位置编码并降低隐藏层维度,实现10倍模型压缩,随后进行8位后训练量化。该模型在保持Librispeech数据集全精度自动语音识别准确率的同时,实现了高效的设备端推理。
While significant improvements have been made in recent years in terms of end-to-end automatic speech recognition (ASR) performance, such improvements were obtained through the use of very large neural networks, unfit for embedded use on edge devices. That being said, in this paper, we work on simplifying and compressing Transformer-based encoder-decoder architectures for the end-to-end ASR task. We empirically introduce a more compact Speech-Transformer by investigating the impact of discarding particular modules on the performance of the model. Moreover, we evaluate reducing the numerical precision of our network's weights and activations while maintaining the performance of the full-precision model. Our experiments show that we can reduce the number of parameters of the full-precision model and then further compress the model 4x by fully quantizing to 8-bit fixed point precision.
研究动机与目标
- 通过减小模型大小和计算成本,实现基于Transformer的端到端自动语音识别系统在设备端的高效部署。
- 研究移除特定组件(如解码器侧卷积和位置编码)对自动语音识别性能的影响。
- 评估将紧凑型Transformer完全量化至8位定点精度的可行性,且不造成性能下降。
- 在保持标准基准测试中顶尖识别准确率的同时,实现显著的模型压缩。
提出的方法
- 作者通过降低隐藏层维度,并移除解码器侧的一维因果卷积和正弦位置编码,对Transformer进行简化。
- 对权重和激活值应用后训练量化,将其转换为8位定点表示。
- 采用大批次训练(80,000个音频帧)以确保收敛,尤其是在架构简化后。
- 在量化后对激活值钳位范围进行1,000步的微调,以防止输出退化。
- 最终模型采用标准Transformer架构,包含多头自注意力和前馈网络,但容量减小且无显式位置编码。
- 量化采用与[21]中相似的方案,确保与高效推理硬件的兼容性。
实验结果
研究问题
- RQ1在移除解码器侧卷积和位置编码后,全精度Transformer语音识别模型的性能是否仍能保持?
- RQ2通过架构简化和权重/激活量化,模型大小可减少多少,且不造成性能损失?
- RQ3对简化后的Transformer架构应用后训练8位量化后,是否仍能保持自动语音识别准确率?
- RQ4是否存在一种训练策略,可在经历显著架构和精度降低后,仍能实现收敛和稳定推理?
主要发现
- 在不使用位置编码和解码器卷积的情况下,简化后的模型仍能保持全精度语音识别性能,表明自回归解码器结构能隐式学习位置信息。
- 后训练8位量化使简化模型的模型大小减少4倍,与原始138M参数基线相比,总压缩比超过10倍。
- 最终全量化模型在Librispeech开发集(dev-clean)上的词错误率与全精度基线相当,未观察到可测量的性能下降。
- 模型需要大批次训练(80,000帧)才能收敛,且对激活值钳位范围进行1,000步微调对避免量化后输出退化至关重要。
- 未使用量化感知训练对性能影响不大,通过后量化校准可完全恢复全精度性能。
更好的研究,从现在开始
从阅读论文到最终审阅,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。