arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2402.04744cs.LGcs.AR
收藏

渐进梯度流用于Transformer中鲁棒的N:M稀疏训练

Progressive Gradient Flow for Robust N:M Sparsity Training in Transformers

Georgia Institute of Technology(佐治亚理工学院);Google DeepMind(谷歌DeepMind);Google(谷歌)

Abhimanyu Rajeshkumar Bambhaniya, Amir Yazdanbakhsh, Suvinay Subramanian, Sheng-Chun Kao, Shivani Agrawal, Utku Evci, Tushar Krishna

AI总结:

针对N:M结构化稀疏训练在高稀疏度区域性能下降的问题,提出通过衰减机制渐进限制梯度流向被剪枝元素,在视觉和语言模型上分别提升最多2%和5%的准确率。

摘要:

N:M结构化稀疏性因其相对适度的开销和更高的效率而引起了广泛关注。此外,这种稀疏性形式因其适度的表示开销,在减少内存占用方面具有相当大的吸引力。已有一些工作致力于开发N:M结构化稀疏性的训练方法,但这些方法主要聚焦于低稀疏度区域(约50%)。然而,使用这些方法训练的模型在面对高稀疏度区域(超过80%)时,性能往往会下降。在本工作中,我们研究了现有稀疏训练方法在\textit{高稀疏度区域}的有效性,并认为这些方法无法维持与低稀疏度区域相当的模型质量。我们证明,造成这一差异的重要因素是梯度幅度中存在的较高水平的诱导噪声。为缓解这一不利影响,我们采用衰减机制逐步限制梯度流向被剪枝的元素。我们的方法在视觉和语言模型的高稀疏度区域分别将模型质量提高了最多2%和5%。我们还评估了模型准确性与训练计算成本(以FLOPs计)之间的权衡。在相同的训练FLOPs下,与传统的稀疏训练方法相比,我们的方法取得了更好的性能,准确率提升最高达2%。源代码可在https://github.com/abhibambhaniya/progressive_gradient_flow_nm_sparsity获取。

英文摘要:

N:M Structured sparsity has garnered significant interest as a result of relatively modest overhead and improved efficiency. Additionally, this form of sparsity holds considerable appeal for reducing the memory footprint owing to their modest representation overhead. There have been efforts to develop training recipes for N:M structured sparsity, they primarily focus on low-sparsity regions ($\sim$50\%). Nonetheless, performance of models trained using these approaches tends to decline when confronted with high-sparsity regions ($>$80\%). In this work, we study the effectiveness of existing sparse training recipes at \textit{high-sparsity regions} and argue that these methods fail to sustain the model quality on par with low-sparsity regions. We demonstrate that the significant factor contributing to this disparity is the presence of elevated levels of induced noise in the gradient magnitudes. To mitigate this undesirable effect, we employ decay mechanisms to progressively restrict the flow of gradients towards pruned elements. Our approach improves the model quality by up to 2$\%$ and 5$\%$ in vision and language models at high sparsity regime, respectively. We also evaluate the trade-off between model accuracy and training compute cost in terms of FLOPs. At iso-training FLOPs, our method yields better performance compared to conventional sparse training recipes, exhibiting an accuracy improvement of up to 2$\%$. The source code is available at https://github.com/abhibambhaniya/progressive_gradient_flow_nm_sparsity.

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

↑