Lune

ICML2024Top-tier venue

Accelerating Transformer Pre-training with 2: 4 Sparsity

Yuezhou Hu, Kang Zhao, Weiyu Huang, Jianfei Chen, Jun Zhu

Abstract

Training large transformers is slow, but recent innovations on GPU architecture give us an advantage. NVIDIA Ampere GPUs can execute a fine-grained 2:4 sparse matrix multiplication twice as fast as its dense equivalent. In the light of this property, we comprehensively investigate the feasibility of accelerating feed-forward networks (FFNs) of transformers in pre-training. First, we define a ``flip rate'' to monitor the stability of a 2:4 training process. Utilizing this metric, we propose three techniques to preserve accuracy: to modify the sparse-refined straight-through estimator by applying the masked decay term on gradients, to determine a feasible decay factor in warm-up stage, and to enhance the model's quality by a dense fine-tuning procedure near the end of pre-training. Besides, we devise two techniques to practically accelerate training: to calculate transposable 2:4 masks by convolution, and to accelerate gated activation functions by reducing GPU L2 cache miss. Experiments show that our 2:4 sparse training algorithm achieves similar convergence to dense training algorithms on several transformer pre-training tasks, while actual acceleration can be observed on different shapes of transformer block apparently. Our toolkit is available at https://github.com/huyz2023/2by4-pretrain.

Ask Lune

Know this paper in minutes, not an afternoon.

Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.

7 top-tier papers have cited it since. Know what they found before your reviewers do.

Questions to start from

Lune can draw on

the full paper · the top-tier papers that cite it · related work

Get the answer

Free to start. No credit card required.

Lineage

  • Pruning Large Language Models with Semi-Structural Adaptive Sparse Training cites Rigging the Lottery: Making All Tickets Winners
  • Pruning Large Language Models with Semi-Structural Adaptive Sparse Training cites Learning N: M Fine-grained Structured Sparse Neural Networks From Scratch
  • SLoPe: Double-Pruned Sparse Plus Lazy Low-Rank Adapter Pretraining of LLMs cites Learning N: M Fine-grained Structured Sparse Neural Networks From Scratch
  • CoLA: Compute-Efficient Pre-Training of LLMs via Low-Rank Activation cites SLoPe: Double-Pruned Sparse Plus Lazy Low-Rank Adapter Pretraining of LLMs
  • The Lottery Ticket Hypothesis for Pre-trained BERT Networks cites Rigging the Lottery: Making All Tickets Winners
  • Learning N: M Fine-grained Structured Sparse Neural Networks From Scratch cites Rigging the Lottery: Making All Tickets Winners
  • S-STE: Continuous Pruning Function for Efficient 2: 4 Sparse Pre-training cites The Lottery Ticket Hypothesis for Pre-trained BERT Networks
  • S-STE: Continuous Pruning Function for Efficient 2: 4 Sparse Pre-training cites Rigging the Lottery: Making All Tickets Winners
  • S-STE: Continuous Pruning Function for Efficient 2: 4 Sparse Pre-training cites Learning N: M Fine-grained Structured Sparse Neural Networks From Scratch
  • S-STE: Continuous Pruning Function for Efficient 2: 4 Sparse Pre-training cites Training data-efficient image transformers & distillation through attention
Builds onCited byLeft to right by year; the more cited, the higher.

Cited by top-tier papers7

  1. Pruning Large Language Models with Semi-Structural Adaptive Sparse TrainingWeiyu Huang, Yuezhou Hu, Guohao Jian, Jun Zhu et al.AAAI 2025 · 25 citations
  2. S-STE: Continuous Pruning Function for Efficient 2: 4 Sparse Pre-trainingYuezhou Hu, Jun Zhu, Jianfei ChenNeurIPS 2024 · 14 citations
  3. ARMOR: High-Performance Semi-Structured Pruning via Adaptive Matrix FactorizationLawrence Liu, Alexander Liu, Mengdi Wang, Tuo Zhao et al.ICLR 2026 · 3 citations
  4. SLoPe: Double-Pruned Sparse Plus Lazy Low-Rank Adapter Pretraining of LLMsMohammad Mozaffari, Amir Yazdanbakhsh, Zhao Zhang, Maryam Mehri DehnaviICLR 2025
  5. CoLA: Compute-Efficient Pre-Training of LLMs via Low-Rank ActivationZiyue Liu, Ruijie Zhang, Zhengyang Wang, Mingsong Yan et al.EMNLP 2025

Builds on12

  1. Training data-efficient image transformers & distillation through attentionHugo Touvron, Matthieu Cord, Matthijs Douze, Francisco Massa et al.ICML 2021 · 8,974 citations
  2. Rigging the Lottery: Making All Tickets WinnersUtku Evci, Trevor Gale, Jacob Menick, Pablo Samuel Castro et al.ICML 2020 · 723 citations
  3. The Lottery Ticket Hypothesis for Pre-trained BERT NetworksTianlong Chen, Jonathan Frankle, Shiyu Chang, Sijia Liu et al.NeurIPS 2020 · 428 citations
  4. Learning N: M Fine-grained Structured Sparse Neural Networks From ScratchAojun Zhou, Yukun Ma, Junnan Zhu, Jianbo Liu et al.ICLR 2021 · 301 citations
  5. LLM-Adapters: An Adapter Family for Parameter-Efficient Fine-Tuning of Large Language ModelsZhiqiang Hu, Lei Wang, Yihuai Lan, Wanyu Xu et al.EMNLP 2023 · 200 citations

Related papers

  1. Towards Fully Sparse Training: Information Restoration with Spatial SimilarityWeixiang Xu, Xiangyu He, Ke Cheng, Peisong Wang et al.AAAI 2022 · 7 citations
  2. Tempo: Accelerating Transformer-Based Model Training through Memory Footprint ReductionMuralidhar Andoorveedu, Zhanda Zhu, Bojian Zheng, Gennady PekhimenkoNeurIPS 2022 · 8 citations
  3. Sparsity-Accelerated Training for Large Language ModelsDa Ma, Lu Chen, Pengyu Wang, Hongshen Xu et al.ACL Findings 2024
  4. Dynamic N: M Fine-Grained Structured Sparse Attention MechanismZhaodong Chen, Zheng Qu, Yuying Quan, Liu Liu et al.PPoPP 2023 · 26 citations
  5. SlideSparse: Fast and Flexible (2N-2):2N Structured SparsityYingbo HAO, Hanyong Shao, Ting Song, Yan Xia et al.ICML 2026
Dusk over the sea between two cliffs drawn in fine vertical lines