Skip to main content
QUICK REVIEW

[Paper Review] How Abilities in Large Language Models are Affected by Supervised Fine-tuning Data Composition

Guanting Dong, Hongyi Yuan|arXiv (Cornell University)|Oct 9, 2023
Topic ModelingComputer Science5 citations
TL;DR

This paper investigates how supervised fine-tuning (SFT) data composition affects mathematical reasoning, code generation, and general instruction-following abilities in large language models. It proposes a dual-stage mixed fine-tuning (DMT) strategy that mitigates catastrophic forgetting and enables superior performance across diverse abilities, especially under limited data, with empirical results showing DMT outperforms standard SFT strategies across LLaMA models of varying sizes.

ABSTRACT

Large language models (LLMs) with enormous pre-training tokens and parameters emerge diverse abilities, including math reasoning, code generation, and instruction following. These abilities are further enhanced by supervised fine-tuning (SFT). While the open-source community has explored ad-hoc SFT for enhancing individual capabilities, proprietary LLMs exhibit versatility across various skills. Therefore, understanding the facilitation of multiple abilities via SFT is paramount. In this study, we specifically focuses on the interplay of data composition between mathematical reasoning, code generation, and general human-aligning abilities during SFT. We propose four intriguing research questions to explore the association between model performance and various factors including data amount, composition ratio, model size and SFT strategies. Our experiments reveal that distinct capabilities scale differently and larger models generally show superior performance with same amount of data. Mathematical reasoning and code generation consistently improve with increasing data amount, whereas general abilities plateau after roughly a thousand samples. Moreover, we observe data composition appears to enhance various abilities under limited data conditions, yet can lead to performance conflicts when data is plentiful. Our findings also suggest the amount of composition data influences performance more than the composition ratio. In analysis of SFT strategies, we find that sequentially learning multiple skills risks catastrophic forgetting. Our proposed Dual-stage Mixed Fine-tuning (DMT) strategy offers a promising solution to learn multiple abilities with different scaling patterns.

Motivation & Objective

  • To understand how data composition between math reasoning, code generation, and general instruction-following affects model performance during supervised fine-tuning.
  • To investigate performance scaling patterns across different data amounts, composition ratios, model sizes, and SFT strategies.
  • To identify performance conflicts arising from multi-task SFT and determine key factors causing them.
  • To evaluate and compare SFT strategies—multi-task, sequential, mixed sequential, and DMT—for learning multiple abilities with distinct scaling behaviors.

Proposed method

  • Proposes a Dual-stage Mixed Fine-tuning (DMT) strategy that first pre-trains on a balanced mix of math, code, and general data, then fine-tunes on a prioritized subset to reduce catastrophic forgetting.
  • Employs a k-proportion sampling mechanism to control data composition, where k represents the fraction of specific ability data used in mixed training.
  • Conducts controlled experiments across three benchmarks: GSM8K (math reasoning), HumanEval (code generation), and MT-Bench (general alignment).
  • Uses LLaMA models of 7B, 13B, and 33B parameters to evaluate scaling effects across model size.
  • Applies t-SNE visualization to analyze representation shifts after DMT training, comparing feature space clustering across abilities.
  • Performs ablation studies by removing code and math data from ShareGPT to isolate the impact of general instruction data on performance.

Experimental results

Research questions

  • RQ1How do math reasoning, coding, and general abilities scale with increasing SFT data amounts?
  • RQ2Are there performance conflicts when combining math, code, and general abilities in a single SFT stage?
  • RQ3What are the key factors—data amount, composition ratio, model size—that induce performance conflicts in multi-ability SFT?
  • RQ4How do different SFT strategies (multi-task, sequential, mixed sequential, DMT) impact the learning of multiple abilities with distinct scaling patterns?

Key findings

  • Mathematical reasoning and code generation abilities scale consistently with increasing SFT data, showing performance gains even at 256 samples.
  • General instruction-following abilities plateau after approximately 1,000 samples, indicating a saturation point not seen in reasoning or coding.
  • Performance conflicts emerge under high data availability, where optimizing for one ability degrades performance in others, especially in multi-task learning.
  • The amount of composition data is more influential than the composition ratio—higher absolute data quantity improves performance more than balanced ratios.
  • Sequential training leads to catastrophic forgetting, with performance dropping significantly on non-sequential tasks (e.g., math accuracy drops from 49.10 to 31.39 on LLaMA-7B).
  • The proposed DMT strategy achieves state-of-the-art performance across all benchmarks: on LLaMA-7B, it reaches 41.92 (GSM8K), 17.68 (HumanEval), and 6.08 (MT-Bench), outperforming multi-task and sequential baselines.

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.