Sparsity-Accelerated Training for Large Language Models
Da Ma, Lu Chen, Pengyu Wang, Hongshen Xu, Hanqi Li, Liangtai Sun, Su Zhu, Shuai Fan, Kai Yu
TL;DR
This work tackles the high training cost of continual pre-training and supervised fine-tuning for large language models by introducing Sparsity-Accelerated Training (SAT), which strategically omits computations for inactive neurons to speed up transformer training. It presents a Transformer-tailored framework that computes neuron importance, selects a sparse subset of heads and channels (MHA and MLP), and uses a Ladder Omission Rate Scheduler (LORS) to manage sparsity over time while preserving performance. Across TinyLlama-1.1B and Llama-2 7B/13B, SAT achieves comparable or improved results with substantial speedups: up to 45% throughput gains in CPT and around 38% reductions in SFT elapsed time, demonstrating a hardware-agnostic, deployable approach to accelerate additional LLM training. The results suggest that exploiting activation sparsity during training can yield practical, scalable benefits without compromising core capabilities, with future work extending methods to more architectures and neuron-importance metrics.
Abstract
Large language models (LLMs) have demonstrated proficiency across various natural language processing (NLP) tasks but often require additional training, such as continual pre-training and supervised fine-tuning. However, the costs associated with this, primarily due to their large parameter count, remain high. This paper proposes leveraging \emph{sparsity} in pre-trained LLMs to expedite this training process. By observing sparsity in activated neurons during forward iterations, we identify the potential for computational speed-ups by excluding inactive neurons. We address associated challenges by extending existing neuron importance evaluation metrics and introducing a ladder omission rate scheduler. Our experiments on Llama-2 demonstrate that Sparsity-Accelerated Training (SAT) achieves comparable or superior performance to standard training while significantly accelerating the process. Specifically, SAT achieves a $45\%$ throughput improvement in continual pre-training and saves $38\%$ training time in supervised fine-tuning in practice. It offers a simple, hardware-agnostic, and easily deployable framework for additional LLM training. Our code is available at https://github.com/OpenDFM/SAT.
