[论文解读] When Scaling Meets LLM Finetuning: The Effect of Data, Model and Finetuning Method
本论文研究在对齐 full-model tuning、prompts 和 LoRA 的范围内,微调大型语言模型在模型大小、预训练数据规模、微调数据规模、PET 参数规模方面的可扩展性,提出一个乘法的联合缩放律,并揭示模型规模通常比预训练数据重要,而 PET 的缩放有限且取决于任务。
While large language models (LLMs) often adopt finetuning to unlock their capabilities for downstream applications, our understanding on the inductive biases (especially the scaling properties) of different finetuning methods is still limited. To fill this gap, we conduct systematic experiments studying whether and how different scaling factors, including LLM model size, pretraining data size, new finetuning parameter size and finetuning data size, affect the finetuning performance. We consider two types of finetuning -- full-model tuning (FMT) and parameter efficient tuning (PET, including prompt tuning and LoRA), and explore their scaling behaviors in the data-limited regime where the LLM model size substantially outweighs the finetuning data size. Based on two sets of pretrained bilingual LLMs from 1B to 16B and experiments on bilingual machine translation and multilingual summarization benchmarks, we find that 1) LLM finetuning follows a powerbased multiplicative joint scaling law between finetuning data size and each other scaling factor; 2) LLM finetuning benefits more from LLM model scaling than pretraining data scaling, and PET parameter scaling is generally ineffective; and 3) the optimal finetuning method is highly task- and finetuning data-dependent. We hope our findings could shed light on understanding, selecting and developing LLM finetuning methods.
研究动机与目标
- 在数据有限条件下,研究微调性能如何随多种因素(模型规模、预训练数据、微调数据、PET 参数规模)进行扩展/缩放。
- 在不同任务中比较两种微调范式(全模型微调和参数高效微调),以理解归纳偏置和缩放行为。
- 评估PET方法(Prompt、LoRA)是否有效扩展,以及任务、数据和方法如何交互影响性能。
- 就方法选择和零样本泛化对LLM微调的影响提供指导。
提出的方法
- 研究两组双语大型语言模型家族(En-De 与 En-Zh),模型规模从1B到16B,使用大量单语数据预训练。
- 在WMT翻译(En-De、En-Zh)和MLSUM多语言摘要任务上进行评估,微调数据最多达2000万条。
- 测试三种微调设置:全模型微调(FMT)、提示微调(软提示)、LoRA(低秩自适应)
- 提出并拟合一个乘法的联合缩放律用于微调损失:L̂(X,Df)=A/X^α * 1/Df^β + E,其中X为尺度因子,Df为微调数据规模;并与加法形式进行比较。
- 使用Hubber loss和L-BFGS进行拟合,并利用保留数据来评估外推性。
- 分析各任务中的缩放指数α和β,以比较模型规模、预训练数据和PET参数的影响。
实验结果
研究问题
- RQ1LLM微调性能如何随模型规模、预训练数据大小、微调数据大小和PET参数大小变化而缩放?
- RQ2全模型微调和PET方法在翻译和摘要任务中是否呈现不同的缩放趋势?
- RQ3乘法联合缩放律是否比加法律更能描述微调的缩放?
- RQ4在不同微调数据量和模型规模下,哪种微调方法更受欢迎?微调后零样本/泛化表现如何?
- RQ5在对LLM进行特定任务微调时,零-shot泛化的作用是什么?
主要发现
- 微调遵循基于幂的乘法联合缩放律,在微调数据规模与其他缩放因素之间。
- LLM模型规模对微调性能的提升通常大于预训练数据规模的提升。
- PET参数缩放(提示长度、LoRA秩)对LoRA和提示基本无效,LoRA提供更稳定性但收益有限。
- 最佳微调方法高度依赖任务和数据;在数据不足的条件下,PET常常优于FMT,在零-shot设置中也是如此,而FMT在大量微调数据和更大模型时可以追赶上来。
- 在某些微调策略下,零-shot泛化可以被保留或提升,Prompt和LoRA在大基线LLMs中显示出较好的泛化。
- 存在一个明确的关键微调数据点用于方法之间的比较,但它是任务相关的,不能普遍推广。
更好的研究,从现在开始
从论文设计到论文写作,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。