Skip to main content
QUICK 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 Modeling被引用 5
一句话总结

本文研究了监督微调(SFT)数据构成对大语言模型在数学推理、代码生成和通用指令遵循能力方面的影响。提出了一种双阶段混合微调(DMT)策略,有效缓解灾难性遗忘,并在多种能力上实现更优性能,尤其在数据有限的情况下表现突出。实验结果表明,DMT在不同尺寸的LLaMA模型上均优于标准SFT策略。

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.

研究动机与目标

  • 理解数学推理、代码生成与通用指令遵循能力之间的数据构成如何影响模型在监督微调中的性能。
  • 研究在不同数据量、构成比例、模型尺寸和SFT策略下的性能扩展模式。
  • 识别多任务SFT中出现的性能冲突,并确定其关键成因。
  • 评估并比较多种SFT策略——多任务、顺序、混合顺序与DMT——在学习具有不同扩展行为的多种能力时的表现。

提出的方法

  • 提出一种双阶段混合微调(DMT)策略:首先在数学、代码和通用数据的均衡混合数据上进行预训练,随后在优先级更高的子集上进行微调,以减少灾难性遗忘。
  • 采用k比例采样机制控制数据构成,其中k表示在混合训练中特定能力数据所占的比例。
  • 在三个基准测试上开展受控实验:GSM8K(数学推理)、HumanEval(代码生成)和MT-Bench(通用对齐)。
  • 使用7B、13B和33B参数的LLaMA模型,评估模型尺寸对性能扩展的影响。
  • 应用t-SNE可视化分析DMT训练后表示的分布变化,比较不同能力在特征空间中的聚类情况。
  • 通过从ShareGPT中移除代码和数学数据,开展消融研究,以隔离通用指令数据对性能的影响。

实验结果

研究问题

  • RQ1随着SFT数据量的增加,数学推理、编程和通用能力如何扩展?
  • RQ2在单一SFT阶段中同时组合数学、编程和通用能力时,是否存在性能冲突?
  • RQ3在多能力SFT中,导致性能冲突的关键因素是什么——数据量、构成比例或模型尺寸?
  • RQ4不同SFT策略(多任务、顺序、混合顺序、DMT)如何影响具有不同扩展行为的多种能力的学习?

主要发现

  • 数学推理和代码生成能力随着SFT数据量的增加而持续提升,即使在256个样本时也表现出性能增益。
  • 通用指令遵循能力在约1,000个样本后趋于饱和,表明其存在一个在推理或编程中未观察到的性能饱和点。
  • 在高数据可用性条件下出现性能冲突,即优化某一能力会导致其他能力性能下降,尤其在多任务学习中更为明显。
  • 构成数据的绝对数量比构成比例更具影响力——更高的数据总量比平衡的比例更能提升性能。
  • 顺序训练导致灾难性遗忘,非顺序任务性能显著下降(例如,LLaMA-7B上数学准确率从49.10降至31.39)。
  • 所提出的DMT策略在所有基准测试中均达到最先进性能:在LLaMA-7B上,分别达到GSM8K的41.92分、HumanEval的17.68分和MT-Bench的6.08分,优于多任务和顺序基线。

更好的研究,从现在开始

从阅读论文到最终审阅,大幅缩短您的研究时间。

无需绑定信用卡

本解读由 AI 生成,并经人工编辑审核。