Fine-tuning large language models for domain adaptation: Exploration of training strategies, scaling, model merging and synergistic capabilities

📄 arXiv: 2409.03444v1 📥 PDF

作者: Wei Lu, Rachel K. Luu, Markus J. Buehler

分类: cs.CL, cond-mat.mtrl-sci, cs.AI

发布日期: 2024-09-05


💡 一句话要点

探索微调策略、模型合并与规模效应,提升LLM在材料科学领域的适应性

🎯 匹配领域: 支柱二:RL算法与架构 (RL & Architecture) 支柱九:具身大模型 (Embodied Foundation Models)

关键词: 大语言模型微调 领域自适应 模型合并 持续预训练 偏好优化 材料科学 涌现能力

📋 核心要点

  1. 现有LLM在材料科学等专业领域应用面临挑战,缺乏针对特定技术能力的有效微调策略。
  2. 通过探索持续预训练、监督微调和基于偏好的优化方法,研究模型合并对LLM性能的影响。
  3. 实验表明,模型合并能涌现新能力,提升领域性能,但小模型不一定具备此特性,模型规模是关键。

📝 摘要(中文)

本文研究了大规模语言模型(LLM)在材料科学与工程等领域应用中的微调策略,旨在提升其专业技术能力。我们探索了持续预训练(CPT)、监督微调(SFT)以及各种基于偏好的优化方法,包括直接偏好优化(DPO)和优势比偏好优化(ORPO)对微调LLM性能的影响。分析表明,这些策略影响模型输出,并且多个微调模型的合并可以涌现出超越单个父模型的新能力。模型合并产生了单个模型无法实现的新功能,从而提高了领域特定评估的性能。实验使用了Llama 3.1 8B和Mistral 7B等不同模型架构,观察到类似的行为。我们还使用了一个17亿参数的小型LLM,发现模型合并不一定会产生涌现能力,表明模型规模可能是关键因素。通过人与AI模型之间的开放式对话,我们深入了解了不同模型变体的性能,发现最小的模型在推理深度、创造力、清晰度和定量精度等关键标准上获得了高智能评分。其他实验包括基于不同的生物材料设计概念开发图像生成提示,以创建新的微观结构、建筑概念和受生物材料启发的城市设计。

🔬 方法详解

问题定义:论文旨在解决如何有效微调大型语言模型(LLM),使其更好地适应材料科学和工程等特定领域的问题。现有方法在针对这些专业领域进行微调时,可能无法充分利用领域知识,导致模型性能提升有限,甚至出现灾难性遗忘等问题。

核心思路:论文的核心思路是通过探索不同的微调策略(包括持续预训练、监督微调和基于偏好的优化方法),并结合模型合并技术,使LLM能够学习和利用领域知识,从而提升其在特定领域的性能。此外,论文还关注模型规模对涌现能力的影响。

技术框架:论文的技术框架主要包括以下几个阶段:1) 选择合适的LLM作为基础模型(例如Llama 3.1 8B和Mistral 7B)。2) 应用不同的微调策略,包括持续预训练(CPT)、监督微调(SFT)、直接偏好优化(DPO)和优势比偏好优化(ORPO)。3) 将多个微调后的模型进行合并,探索模型合并带来的涌现能力。4) 使用领域特定的评估指标对模型性能进行评估。5) 进行开放式对话评估,考察模型的推理深度、创造力、清晰度和定量精度。

关键创新:论文的关键创新在于发现模型合并可以导致涌现能力,即合并后的模型能够实现单个模型无法实现的功能,从而显著提升在特定领域的性能。此外,论文还发现模型规模是影响涌现能力的关键因素,小规模模型在合并后可能无法展现出明显的性能提升。

关键设计:论文的关键设计包括:1) 探索不同的微调策略,并比较它们对模型性能的影响。2) 设计模型合并策略,例如平均权重等。3) 使用领域特定的数据集进行微调和评估。4) 设计开放式对话评估方案,考察模型的综合能力。5) 实验中使用了不同的模型规模,以便研究模型规模对涌现能力的影响。

🖼️ 关键图片

img_0

📊 实验亮点

实验结果表明,模型合并能够显著提升LLM在材料科学领域的性能,涌现出单个模型无法实现的新功能。例如,合并后的模型能够生成更符合生物材料设计原则的图像,并在开放式对话中展现出更高的智能水平。此外,研究还发现模型规模是影响涌现能力的关键因素,小规模模型在合并后可能无法展现出明显的性能提升。

🎯 应用场景

该研究成果可应用于材料科学、生物工程、化学等多个领域,帮助科研人员更高效地利用LLM进行材料设计、性质预测、文献挖掘等任务。通过模型合并,可以创造出更强大的AI工具,加速科研创新,并为相关产业带来变革。

📄 摘要(原文)

The advancement of Large Language Models (LLMs) for domain applications in fields such as materials science and engineering depends on the development of fine-tuning strategies that adapt models for specialized, technical capabilities. In this work, we explore the effects of Continued Pretraining (CPT), Supervised Fine-Tuning (SFT), and various preference-based optimization approaches, including Direct Preference Optimization (DPO) and Odds Ratio Preference Optimization (ORPO), on fine-tuned LLM performance. Our analysis shows how these strategies influence model outcomes and reveals that the merging of multiple fine-tuned models can lead to the emergence of capabilities that surpass the individual contributions of the parent models. We find that model merging leads to new functionalities that neither parent model could achieve alone, leading to improved performance in domain-specific assessments. Experiments with different model architectures are presented, including Llama 3.1 8B and Mistral 7B models, where similar behaviors are observed. Exploring whether the results hold also for much smaller models, we use a tiny LLM with 1.7 billion parameters and show that very small LLMs do not necessarily feature emergent capabilities under model merging, suggesting that model scaling may be a key component. In open-ended yet consistent chat conversations between a human and AI models, our assessment reveals detailed insights into how different model variants perform and show that the smallest model achieves a high intelligence score across key criteria including reasoning depth, creativity, clarity, and quantitative precision. Other experiments include the development of image generation prompts based on disparate biological material design concepts, to create new microstructures, architectural concepts, and urban design based on biological materials-inspired construction principles.