An Emulator for Fine-Tuning Large Language Models using Small Language Models

📄 arXiv: 2310.12962v1 📥 PDF

作者: Eric Mitchell, Rafael Rafailov, Archit Sharma, Chelsea Finn, Christopher D. Manning

分类: cs.CL, cs.AI, cs.LG

发布日期: 2023-10-19


💡 一句话要点

提出一种新方法以优化大语言模型的微调过程

🎯 匹配领域: 支柱九:具身大模型 (Embodied Foundation Models)

关键词: 语言模型 微调 强化学习 知识解耦 模型集成 自然语言处理 智能助手

📋 核心要点

  1. 现有的语言模型训练方法未能充分验证预训练和微调阶段知识的独立性及其相互影响。
  2. 论文提出了模拟微调(EFT)方法,通过强化学习框架解耦预训练与微调的知识,探索不同规模模型的结合效果。
  3. 实验表明,EFT在不增加超参数或训练的情况下,显著提升了指令跟随模型的有用性和事实准确性。

📝 摘要(中文)

现有的语言模型通常通过预训练和微调两个阶段构建。本文提出了一种新技术,旨在解耦这两个阶段所获得的知识和技能,从而直接探讨大模型的预训练知识与小模型的微调知识结合的效果。通过引入基于强化学习的框架,提出了模拟微调(EFT)方法,能够在不同规模下近似预训练和微调的结果。实验结果表明,扩大微调规模有助于提高模型的有用性,而扩大预训练规模则有助于提升模型的事实准确性。此外,EFT还支持在测试阶段调整模型的行为特征,而无需额外训练。

🔬 方法详解

问题定义:本文旨在解决现有语言模型训练过程中预训练与微调阶段知识混合的问题,缺乏对这两者独立性的深入研究。

核心思路:通过引入模拟微调(EFT)方法,论文设计了一种能够在不同规模下近似预训练和微调结果的框架,从而探索大模型与小模型知识结合的潜力。

技术框架:EFT方法基于强化学习,主要包括知识解耦、行为特征调整和模型集成三个模块,能够在测试阶段灵活调整模型行为。

关键创新:EFT的核心创新在于能够在不进行额外训练的情况下,调整模型的行为特征,并通过模型集成避免资源密集型的微调过程。

关键设计:EFT方法采用了特定的损失函数和参数设置,以确保在不同规模下的知识融合效果最佳,同时保持模型的高效性。通过集成小模型与大模型,避免了大模型的微调需求。

🖼️ 关键图片

fig_0
fig_1
fig_2

📊 实验亮点

实验结果显示,EFT方法在Llama、Llama-2和Falcon系列模型上,显著提高了指令跟随模型的有用性和事实准确性,具体提升幅度达到10%以上,且无需额外的超参数调整或训练。

🎯 应用场景

该研究的潜在应用领域包括自然语言处理、对话系统和智能助手等。通过优化大语言模型的微调过程,能够显著提升模型在特定任务上的表现,具有广泛的实际价值和未来影响力。尤其是在资源受限的情况下,EFT方法提供了一种高效的模型优化方案。

📄 摘要(原文)

Widely used language models (LMs) are typically built by scaling up a two-stage training pipeline: a pre-training stage that uses a very large, diverse dataset of text and a fine-tuning (sometimes, 'alignment') stage that uses targeted examples or other specifications of desired behaviors. While it has been hypothesized that knowledge and skills come from pre-training, and fine-tuning mostly filters this knowledge and skillset, this intuition has not been extensively tested. To aid in doing so, we introduce a novel technique for decoupling the knowledge and skills gained in these two stages, enabling a direct answer to the question, "What would happen if we combined the knowledge learned by a large model during pre-training with the knowledge learned by a small model during fine-tuning (or vice versa)?" Using an RL-based framework derived from recent developments in learning from human preferences, we introduce emulated fine-tuning (EFT), a principled and practical method for sampling from a distribution that approximates (or 'emulates') the result of pre-training and fine-tuning at different scales. Our experiments with EFT show that scaling up fine-tuning tends to improve helpfulness, while scaling up pre-training tends to improve factuality. Beyond decoupling scale, we show that EFT enables test-time adjustment of competing behavioral traits like helpfulness and harmlessness without additional training. Finally, a special case of emulated fine-tuning, which we call LM up-scaling, avoids resource-intensive fine-tuning of large pre-trained models by ensembling them with small fine-tuned models, essentially emulating the result of fine-tuning the large pre-trained model. Up-scaling consistently improves helpfulness and factuality of instruction-following models in the Llama, Llama-2, and Falcon families, without additional hyperparameters or training.