Skip to main content
QUICK REVIEW

[Paper Review] SPDF: Sparse Pre-training and Dense Fine-tuning for Large Language Models

Vithursan Thangarasa, Abhay Gupta|arXiv (Cornell University)|Mar 18, 2023
Topic ModelingComputer Science7 citations
TL;DR

SPDF trains LLMs with unstructured weight sparsity during pre-training to cut FLOPs, then densifies during fine-tuning to recover capacity and maintain downstream performance.

ABSTRACT

The pre-training and fine-tuning paradigm has contributed to a number of breakthroughs in Natural Language Processing (NLP). Instead of directly training on a downstream task, language models are first pre-trained on large datasets with cross-domain knowledge (e.g., Pile, MassiveText, etc.) and then fine-tuned on task-specific data (e.g., natural language generation, text summarization, etc.). Scaling the model and dataset size has helped improve the performance of LLMs, but unfortunately, this also lead to highly prohibitive computational costs. Pre-training LLMs often require orders of magnitude more FLOPs than fine-tuning and the model capacity often remains the same between the two phases. To achieve training efficiency w.r.t training FLOPs, we propose to decouple the model capacity between the two phases and introduce Sparse Pre-training and Dense Fine-tuning (SPDF). In this work, we show the benefits of using unstructured weight sparsity to train only a subset of weights during pre-training (Sparse Pre-training) and then recover the representational capacity by allowing the zeroed weights to learn (Dense Fine-tuning). We demonstrate that we can induce up to 75% sparsity into a 1.3B parameter GPT-3 XL model resulting in a 2.5x reduction in pre-training FLOPs, without a significant loss in accuracy on the downstream tasks relative to the dense baseline. By rigorously evaluating multiple downstream tasks, we also establish a relationship between sparsity, task complexity and dataset size. Our work presents a promising direction to train large GPT models at a fraction of the training FLOPs using weight sparsity, while retaining the benefits of pre-trained textual representations for downstream tasks.

Motivation & Objective

  • Motivate reducing pre-training computational cost without sacrificing downstream accuracy.
  • Propose Sparse Pre-training and Dense Fine-tuning (SPDF) as a two-phase training framework.
  • Demonstrate that high sparsity (up to 75%) during pre-training can reduce FLOPs while preserving performance after dense fine-tuning.
  • Investigate how sparsity level relates to task difficulty, dataset size, and model scale.
  • Analyze parameter subspace movement between pre-trained and fine-tuned models.

Proposed method

  • Apply uniform static unstructured sparsity to a dense GPT-like model before pre-training.
  • Pre-train the sparse model on large text corpora to minimize a masked autoregressive objective with a fixed sparsity mask.
  • Transition to dense fine-tuning by reviving all previously zeroed weights (initialized to zero) and updating densely on downstream tasks.
  • Evaluate across natural language generation and text summarization tasks to assess downstream transfer.
  • Measure FLOPs and compare against dense training to quantify efficiency gains.
Figure 1 : Sparse Pre-training and Dense Fine-tuning (SPDF) framework. In this framework, we sparsify a dense network and perform sparse pre-training followed by dense fine-tuning (green connections indicate newly activated weights). We use SPDF to pre-train large GPT models at a fraction of the tra
Figure 1 : Sparse Pre-training and Dense Fine-tuning (SPDF) framework. In this framework, we sparsify a dense network and perform sparse pre-training followed by dense fine-tuning (green connections indicate newly activated weights). We use SPDF to pre-train large GPT models at a fraction of the tra

Experimental results

Research questions

  • RQ1Can high sparsity (50-75%) during pre-training preserve downstream performance after dense fine-tuning?
  • RQ2How does SPDF’s sparsity interact with dataset size and task difficulty?
  • RQ3Does larger model size (e.g., GPT-3 XL) tolerate higher sparsity with less downstream degradation?
  • RQ4What is the FLOP reduction achievable with SPDF across model scales and tasks?
  • RQ5How do pre-training and fine-tuning parameter subspaces relate under SPDF?

Key findings

  • Pre-training GPT-2 Small and GPT-3 XL with up to 75% sparsity yields only modest BLEU/perplexity drops on several NLG tasks, with larger models showing more tolerance to sparsity.
  • Dense fine-tuning after sparse pre-training mitigates performance loss compared to sparse fine-tuning alone.
  • SPDF achieves substantial FLOP reductions, scaling with model size: GPT-2 Small shows about 1.65x and GPT-3 XL about 2.48x to 2.49x total FLOP reductions when pre-training at 75% sparsity.
  • Downstream task difficulty correlates with sparsity tolerance; Curation Corpus (summarization) is more sensitive to high sparsity than E2E, WebNLG, or DART.
  • Larger models exhibit smaller cosine distances between pre-trained and fine-tuned parameter subspaces, indicating less adaptation needed during fine-tuning.
Figure 2 : Comparison of sparse-to-dense vs sparse-to-sparse pre-training and fine-tuning with GPT-2 Small on E2E, WebNLG and DART. Across tasks dense fine-tuning noticeably outperforms sparse fine-tuning, especially at 75% sparsity.
Figure 2 : Comparison of sparse-to-dense vs sparse-to-sparse pre-training and fine-tuning with GPT-2 Small on E2E, WebNLG and DART. Across tasks dense fine-tuning noticeably outperforms sparse fine-tuning, especially at 75% sparsity.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.