arXiv:2412.01195eess.AScs.AI2024-12被引 1

用可逆网络和8位动态量化,让深网络在消费级显卡上高效训练。

Memory-Efficient Training for Deep Speaker Embedding Learning in Speaker Verification

  • 采用可逆神经网络消除反向传播时的中间激活存储需求。
  • 8位动态量化使优化器状态内存减少75%,性能几乎无损。
  • 仅需1-2张2080Ti显卡即可训练深层声纹模型,节省16.2倍内存。

近年来,声纹验证(SV)系统趋向采用更深的声纹嵌入提取器。尽管更深更大的神经网络能显著提升性能,但其巨大的内存需求限制了在消费级GPU上的训练。本文针对资源受限场景,提出一种高效的内存训练策略。首先系统分析了训练过程中GPU内存分配情况,发现激活值和优化器状态是主要内存消耗来源。针对激活值,设计了两种可逆神经网络,无需缓存中间激活,大幅降低内存占用且不损失性能。针对优化器状态,引入动态树结构8位量化方法,替代原有的32位浮点数。在VoxCeleb数据集上的实验表明,可逆版本的ResNets与DF-ResNets无需缓存激活即可完成训练;8位版SGD与Adam相比32位版本节省75%内存,性能相当。详细对比显示,所提模型相较原始系统实现最高达16.2倍的内存节省,参数量和性能几乎一致。相比以往需多张A100 GPU,现可仅用1-2张2080Ti成功训练深层声纹嵌入提取器。

原文摘要 · Abstract (English)

Recent speaker verification (SV) systems have shown a trend toward adopting deeper speaker embedding extractors. Although deeper and larger neural networks can significantly improve performance, their substantial memory requirements hinder training on consumer GPUs. In this paper, we explore a memory-efficient training strategy for deep speaker embedding learning in resource-constrained scenarios. Firstly, we conduct a systematic analysis of GPU memory allocation during SV system training. Empirical observations show that activations and optimizer states are the main sources of memory consumption. For activations, we design two types of reversible neural networks which eliminate the need to store intermediate activations during back-propagation, thereby significantly reducing memory usage without performance loss. For optimizer states, we introduce a dynamic quantization approach that replaces the original 32-bit floating-point values with a dynamic tree-based 8-bit data type. Experimental results on VoxCeleb demonstrate that the reversible variants of ResNets and DF-ResNets can perform training without the need to cache activations in GPU memory. In addition, the 8-bit versions of SGD and Adam save 75% of memory costs while maintaining performance compared to their 32-bit counterparts. Finally, a detailed comparison of memory usage and performance indicates that our proposed models achieve up to 16.2x memory savings, with nearly identical parameters and performance compared to the vanilla systems. In contrast to the previous need for multiple high-end GPUs such as the A100, we can effectively train deep speaker embedding extractors with just one or two consumer-level 2080Ti GPUs.

声纹识别内存优化可逆网络量化

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。