Reading Note: “WizardLM: Empowering Large Language Models to Follow Complex Instructions”

date
Jun 8, 2024
slug
wizard-lm
status
Published
tags
NLP
summary
type
Post

0. TL; DR

使用 open-domain instruction tuning 来微调一个大语言模型取得了良好的效果。然而,人工构造这样的数据集是非常费时间和人力的。同时,人类常常无法构造复杂的指令。本文提出一种使用 LLM 自动生成不同复杂度层级的指令的方法 Evol-Instruct从一组简单的种子指令开始,通过循环迭代地应用进化操作重写指令,逐步生成更多样和更复杂的指令
人工评估得出 Evol-Instruct 生成的指令质量优于人工构造的指令。使用 Evol-Instruct 微调 LLaMA,得到 WizradLM 模型。在 GPT4 自动评估中,WizrdLM29 个任务中的 17 个取得了 ChatGPT 90% 的性能。尽管在某些方面仍然不如 ChatGPT,但是使用这种基于 AI 演化的指令来微调 LLM 是一个值得继续探索的方向。

1. Motivation

Close-domain instructions 的局限性:
  • 指令的多样性不足。
  • 一个指令只对应一个任务。
人工构造 open-domain instructions 的局限性:
  • 费时费力。
  • 指令复杂度分布偏斜,大部分集中在简单和中等复杂度。
本文方法:使用 LLM 而不是人类来生成复杂度不同的指令。

2. Approach

notion image
从一组初始的指令开始,通过 evolution 迭代产生不同多样性和复杂度的指令加入 instruction pool,其中 evolution 迭代的主要组件是 Instruction Evolver 和 Instruction Eliminator。

2.1 Instruction Evolution

随机地使用 In-depth evolution 和 In-breadth evolution,前者将现有的指令,根据一组规则,使用 LLM 扩展成复杂度略高一点的指令,后者将现有的指令,通过 LLM 变异成复杂度相近但是不同的指令。
In-depth evolution 使用的 prompt 示例(不完全):
"Your objective is to rewrite a given prompt into a more complex version to make those famous AI systems (e.g., ChatGPT and GPT4 ) a bit harder to handle. But the rewritten prompt must be reasonable, understood, and responded to by humans.
生成新指令后使用同一个 LLM 来生成输出。

2.2 Instruction Elimination

使用一个 LLM,根据一组规则来检查演化后生成的新指令,如果不符合要求,那么把原指令放回 instruction pool,否则应该把原指令取出,加入演化后生成的新指令。

3. Experiment

在 Evol-Instruct testset 和 vicuna testset 上对 WizardLM, Alpaca, Vicuna 和 ChatGPT 进行了人工评估和自动评估。
notion image
notion image
 

© Lifan Sun 2023 - 2024