ChatPaper.aiChatPaper

트랜스포머에서 강건한 N:M 희소성 학습을 위한 점진적 그래디언트 흐름

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

February 7, 2024
저자: Abhimanyu Rajeshkumar Bambhaniya, Amir Yazdanbakhsh, Suvinay Subramanian, Sheng-Chun Kao, Shivani Agrawal, Utku Evci, Tushar Krishna
cs.AI

초록

N:M 구조화된 희소성은 비교적 적은 오버헤드와 향상된 효율성으로 인해 상당한 관심을 받고 있다. 또한, 이러한 형태의 희소성은 적은 표현 오버헤드로 인해 메모리 사용량을 줄이는 데 있어 상당한 매력을 지니고 있다. N:M 구조화된 희소성을 위한 훈련 방법을 개발하려는 노력이 있었으나, 이들은 주로 낮은 희소성 영역(약 50%)에 초점을 맞추고 있다. 그러나 이러한 접근법으로 훈련된 모델의 성능은 높은 희소성 영역(>80%)에서 감소하는 경향이 있다. 본 연구에서는 기존의 희소 훈련 방법이 높은 희소성 영역에서 효과적인지 조사하고, 이러한 방법들이 낮은 희소성 영역과 동등한 수준의 모델 품질을 유지하지 못한다는 점을 주장한다. 우리는 이러한 차이의 주요 원인이 그래디언트 크기에서 유발된 노이즈 수준이 높기 때문임을 보여준다. 이러한 바람직하지 않은 효과를 완화하기 위해, 우리는 가지치기된 요소로 향하는 그래디언트의 흐름을 점진적으로 제한하는 감쇠 메커니즘을 사용한다. 우리의 접근법은 높은 희소성 영역에서 시각 및 언어 모델의 품질을 각각 최대 2%와 5% 향상시킨다. 또한, 모델 정확도와 훈련 계산 비용 간의 트레이드오프를 FLOPs 측면에서 평가한다. 동일한 훈련 FLOPs에서, 우리의 방법은 기존의 희소 훈련 방법에 비해 더 나은 성능을 보이며, 최대 2%의 정확도 향상을 나타낸다. 소스 코드는 https://github.com/abhibambhaniya/progressive_gradient_flow_nm_sparsity에서 확인할 수 있다.
English
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 (sim50\%). 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 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.
PDF21December 15, 2024