To 2:4 Sparsity and Beyond: Neuron-level Activation Function to Accelerate LLM Pre-Training
Meghana Madhyastha, Daniel Haziza, Jesse Cai, Newsha Ardalani, Zhiqi Bu, Carole-Jean Wu
TL;DR
The paper addresses the high computational cost of LLM pretraining by targeting the FFN-dominated matrix multiplications with a semi-structured sparsity approach. It couples 2:4 weight sparsity via soft-thresholding with Venom activation sparsity (V:N:M) implemented through a neuron-level router that assigns activations to expert groups, enabling end-to-end speedups. A mixed sparse-dense training schedule is proposed to recover accuracy, yielding up to 1.4–1.7× end-to-end speedups in experiments on Llama-1B/7B variants and up to several× speedups in microbenchmarks, while remaining compatible with quantization and MoE. The work demonstrates substantial practical acceleration for FFN computations on NVIDIA GPUs (A100+), with a scalable framework for adoption in large-model training and potential applicability to diverse transformer-based architectures.
Abstract
Trainings of Large Language Models are generally bottlenecked by matrix multiplications. In the Transformer architecture, a large portion of these operations happens in the Feed Forward Network (FFN), and this portion increases for larger models, up to 50% of the total pretraining floating point operations. We show that we can leverage hardware-accelerated sparsity to accelerate all matrix multiplications in the FFN, with 2:4 sparsity for weights and v:n:m (Venom) sparsity for activations. Our recipe relies on sparse training steps to accelerate a large part of the pretraining, associated with regular dense training steps towards the end. Overall, models trained with this approach exhibit the same performance on our quality benchmarks, and can speed up training end-to-end by 1.4 to 1.7x. This approach is applicable to all NVIDIA GPUs starting with the A100 generation, and is orthogonal to common optimization techniques, such as, quantization, and can also be applied to mixture-of-experts model architectures.
