Skip to main content
QUICK REVIEW

[论文解读] Distilling Step-by-Step! Outperforming Larger Language Models with Less Training Data and Smaller Model Sizes

Cheng-Yu Hsieh, Chunliang Li|arXiv (Cornell University)|May 3, 2023
Topic ModelingComputer Science被引用 15
一句话总结

本文提出 Distilling step-by-step,一种使用 LLM 生成的推理过程来训练小型特定任务模型的方法,在数据效率和部署效率上优于微调或蒸馏,且在模型规模远小于大模型的情况下,往往超越 LLMs。

ABSTRACT

Deploying large language models (LLMs) is challenging because they are memory inefficient and compute-intensive for practical applications. In reaction, researchers train smaller task-specific models by either finetuning with human labels or distilling using LLM-generated labels. However, finetuning and distillation require large amounts of training data to achieve comparable performance to LLMs. We introduce Distilling step-by-step, a new mechanism that (a) trains smaller models that outperform LLMs, and (b) achieves so by leveraging less training data needed by finetuning or distillation. Our method extracts LLM rationales as additional supervision for training small models within a multi-task framework. We present three findings across 4 NLP benchmarks: First, compared to both finetuning and distillation, our mechanism achieves better performance with much fewer labeled/unlabeled training examples. Second, compared to few-shot prompted LLMs, we achieve better performance using substantially smaller model sizes. Third, we reduce both the model size and the amount of data required to outperform LLMs; our finetuned 770M T5 model outperforms the few-shot prompted 540B PaLM model using only 80% of available data on a benchmark, whereas standard finetuning the same T5 model struggles to match even by using 100% of the dataset. We release the code at: https://github.com/google-research/distilling-step-by-step .

研究动机与目标

  • 通过减少对巨型 LLMs 的依赖,激励部署实用、内存高效的模型。
  • 开发一种数据高效的训练范式,利用 LLM 推理作为小模型的监督。
  • 证明以推理为指导训练的小型模型在显著更少的数据和计算量下就能超越 LLMs。
  • 在多项 NLP 基准测试中展示数据和模型尺寸的缩减。

提出的方法

  • 使用少-shot Chain-of-Thought 提示,引导 LLM 生成带有推理的标签。
  • 在多任务设置中训练一个小型模型,使其同时预测标签和推理,从而在测试时实现仅标签的预测。
  • 使用任务前缀在 [label] 与 [rationale] 输出之间切换,使推理生成在训练时成为辅助监督。
  • 在不同数据情境(带标签和未带标签)下,与标准微调和标准蒸馏进行比较。
  • 在四个 NLP 基准测试上评估数据效率、模型尺寸和性能。

实验结果

研究问题

  • RQ1LLM 生成的推理是否能为训练较小的模型提供有用的监督,即在较少带标签或未带标签的数据下?
  • RQ2在数据和计算受限的设置下,较小且以推理为引导的模型是否能超越 LLMs 和传统基线?
  • RQ3多任务推理-标签训练与单任务推理或标签生成方法相比如何?
  • RQ4在何种数据量与模型尺寸阈值下,Distilling step-by-step 超越大型 LLM 的性能?
  • RQ5在该框架下,无标签数据增强是否能进一步提升性能?

主要发现

  • Distilling step-by-step 在所有四个数据集上,相较于标准微调,使用的带标签样本要少得多却获得更好的性能。
  • Distilling step-by-step 在同一基准上,使用更少的未标记数据就优于标准任务蒸馏。
  • 较小的模型(例如 220M T5)在若干任务上,使用极少量数据即可超越 540B PaLM 的 few-shot CoT 设置。
  • 该方法使得用最多数千倍更小的模型和更少的数据即可超越 LLMs。
  • 在推理和标签输出分离的多任务训练中,始终优于将推理和标签联合进行的单任务训练。
  • 未标记数据增强进一步提升性能,帮助缩小数据不足任务的差距。

阅读本论文

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

在 Nubint 中阅读本论文

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