Skip to main content
QUICK REVIEW

[论文解读] Multi-Task Instruction Tuning of LLaMa for Specific Scenarios: A Preliminary Study on Writing Assistance

Yue Zhang, Leyang Cui|arXiv (Cornell University)|May 22, 2023
Topic ModelingComputer Science被引用 11
一句话总结

本文研究通过对 LLaMA 进行通用与写作特定指令数据的微调,创建一个面向场景的写作助手,并分析其有效性、效率与局限性。

ABSTRACT

Proprietary Large Language Models (LLMs), such as ChatGPT, have garnered significant attention due to their exceptional capabilities in handling a diverse range of tasks. Recent studies demonstrate that open-sourced smaller foundational models, such as 7B-size LLaMA, can also display remarkable proficiency in tackling diverse tasks when fine-tuned using instruction-driven data. In this work, we investigate a practical problem setting where the primary focus is on one or a few particular tasks rather than general-purpose instruction following, and explore whether LLMs can be beneficial and further improved for such targeted scenarios. We choose the writing-assistant scenario as the testbed, which includes seven writing tasks. We collect training data for these tasks, reframe them in an instruction-following format, and subsequently refine the LLM, specifically LLaMA, via instruction tuning. Experimental results show that fine-tuning LLaMA on writing instruction data significantly improves its ability on writing tasks. We also conduct more experiments and analyses to offer insights for future work on effectively fine-tuning LLaMA for specific scenarios. Finally, we initiate a discussion regarding the necessity of employing LLMs for only one targeted task, taking into account the efforts required for tuning and the resources consumed during deployment.

研究动机与目标

  • 推动对大型语言模型进行纵向、面向任务的定制研究,而非通用指令遵循。
  • 评估在写作相关指令上对 LLaMA 进行微调是否能提升在七个写作任务上的表现。
  • 研究模型规模、训练方式(LoRA 与完整微调)以及数据组成之间的权衡。
  • 评估较小的、专门化的 LLM 是否能在目标领域超过更大、现成的 LLM。
  • 以语法纠错为案例,讨论在单一任务场景部署 LLM 的可行性与成本。

提出的方法

  • 将七个写作任务重新框架为一个遵循指令的格式,采用统一的提示结构。
  • 汇集约 ~60k 的写作指令示例以及 ~52k 的通用 Alpaca 数据用于微调。
  • 使用 LoRA(参数高效)对 LLaMA 进行微调,并与完整微调进行比较。
  • 在七个写作任务上进行评估,使用受 EditEval 启发的基准和面向任务的指标。
  • 将 Writing-Alpaca-7B 与更大规模的 LLM(OPT-175B、GPT-175B、InstructGPT-175B、ChatGPT)进行比较。
  • 研究数据组成的影响(通用数据与写作特定数据)以及模型容量(7B vs 13B)对性能的影响。

实验结果

研究问题

  • RQ1有针对性的写作指令微调能在写作助手场景中提升 LLaMA 吗?
  • RQ2将通用指令数据与领域特定写作数据结合,是否优于仅使用域数据?
  • RQ3在纵向应用中,模型规模和训练方法(LoRA vs 全量微调)如何影响性能和成本?
  • RQ4较小、专门化的 LLM 是否能够在针对性写作任务上超越更大、现成的 LLM?
  • RQ5在考虑训练与部署成本时,单独为单一任务部署 LLM 是否明智?

主要发现

  • 指令微调提升了 LLaMA 在所有写作任务上的表现。
  • 写作特定指令数据在通用数据之上带来进一步提升(平均提升从 43.07 提高到 48.65)。
  • 较小的 LLM(约 7B)在目标写作领域可以超越更大、现成的 LLM。
  • 全量微调在平均性能上优于 LoRA,但训练时间约多出 5 倍。
  • 通用指令数据有助于保留泛化能力,例如改写能力,并且对任务灵活性不可或缺。
  • GEC 案例研究表明,LLMs 可能因幻觉与速度成本而不及任务特定的轻量模型;数据和模型规模必须与部署目标一致。

阅读本论文

在 Nubint 阅读器中打开原文,边读边就任意段落提问。

在 Nubint 中阅读本论文

本解读由 AI 根据论文原文生成,引用前请核对原文。