How Abilities in Large Language Models are Affected by Supervised Fine-tuning Data Composition

Guanting Dong, Hongyi Yuan, Keming Lu, Chengpeng Li, Mingfeng Xue +5 more
10/9/2023
355 citations
cs.CLcs.AIcs.LG

Official code: OFA-Sys/gsm8k-ScRel (269 stars, Python, last commit 2024-09-12).

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).

Show full abstract

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.

View on arXivView PDF

Code Implementations(1)

Codes and Data for Scaling Relationship on Learning Mathematical Reasoning with Large Language Models

26919Python, ShellAug 4, 20232 years ago

Similar Papers

Cite this paper

@article{dong2023abilities,
  title  = {How Abilities in Large Language Models are Affected by Supervised Fine-tuning Data Composition},
  author = {Guanting Dong and Hongyi Yuan and Keming Lu and Chengpeng Li and Mingfeng Xue and Dayiheng Liu and Wei Wang and Zheng Yuan and Chang Zhou and Jingren Zhou},
  year   = {2023},
  eprint = {2310.05492},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2310.05492v4}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2310.05492.svg)](https://codeofpaper.com/paper/2310.05492)

Discussion