arXiv(opens in a new tab)cs.LGOct 2022Cited by 47 papers on PaperVantageClassic Paper

Manuscript Offprint

arXiv:2210.11416

Scaling Instruction-Finetuned Language Models

Hyung Won Chung, Le Hou, Shayne Longpre, Barret Zoph, Yi Tay, William Fedus, Yunxuan Li, Xuezhi Wang, Mostafa Dehghani, Siddhartha Brahma, Albert Webson, Shixiang Shane Gu, Zhuyun Dai, Mirac Suzgun, Xinyun Chen, Aakanksha Chowdhery, Alex Castro-Ros, Marie Pellat, Kevin Robinson, Dasha Valter, Sharan Narang, Gaurav Mishra, Adams Yu, Vincent Zhao, Yanping Huang, Andrew Dai, Hongkun Yu, Slav Petrov, Ed H. Chi, Jeff Dean, Jacob Devlin, Adam Roberts, Denny Zhou, Quoc V. Le, Jason Wei

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Abstract

Finetuning language models on a collection of datasets phrased as instructions has been shown to improve model performance and generalization to unseen tasks. In this paper we explore instruction finetuning with a particular focus on (1) scaling the number of tasks, (2) scaling the model size, and (3) finetuning on chain-of-thought data. We find that instruction finetuning with the above aspects dramatically improves performance on a variety of model classes (PaLM, T5, U-PaLM), prompting setups (zero-shot, few-shot, CoT), and evaluation benchmarks (MMLU, BBH, TyDiQA, MGSM, open-ended generation, RealToxicityPrompts). For instance, Flan-PaLM 540B instruction-finetuned on 1.8K tasks outperforms PaLM 540B by a large margin (+9.4% on average). Flan-PaLM 540B achieves state-of-the-art performance on several benchmarks, such as 75.2% on five-shot MMLU. We also publicly release Flan-T5 checkpoints, 1^{1} which achieve strong few-shot performance even compared to much larger models, such as PaLM 62B. Overall, instruction finetuning is a general method for improving the performance and usability of pretrained language models.

Instruction finetuning

Please answer the following question.

What is the boiling point of Nitrogen?

Chain-of-thought finetuning

Answer the following question by reasoning step-by-step.

The cafeteria had 23 apples. If they used 20 for lunch and bought 6 more, how many apples do they have?

-320.4F

Language model

Multi-task instruction finetuning (1.8K tasks)

Inference: generalization to unseen tasks

The cafeteria had 23 apples originally. They used 20 to make lunch. So they had 23 - 20 = 3. They bought 6 more apples, so they have 3+6=93 + 6 = 9.

Q: Can Geoffrey Hinton have a conversation with George Washington? Give the rationale before answering.

Geoffrey Hinton is a British-Canadian computer scientist born in 1947. George Washington died in 1799. Thus, they could not have had a conversation together. So the answer is "no".

Figure 1: We finetune various language models on 1.8K tasks phrased as instructions, and evaluate them on unseen tasks. We finetune both with and without exemplars (i.e., zero-shot and few-shot) and with and without chain-of-thought, enabling generalization across a range of evaluation scenarios.

∗^{*}Equal contribution. Correspondence: lehou@google.com.

†^{\dagger}Core contributor.

1^{1}Public checkpoints: https://github.com/google-research/t5x/blob/main/docs/models.md#flan-t5-checkpoints.

1 Introduction

An important goal of artificial intelligence is to develop models that can generalize to unseen tasks. In natural language processing (NLP), pretrained language models have made significant progress towards this goal, as they can perform tasks given natural language descriptions (Brown et al., 2020, inter alia). Further progress has been made by finetuning language models on a collection of tasks phrased as instructions, which enables models to respond better to instructions and reduces the need for few-shot exemplars (Ouyang et al., 2022; Wei et al., 2021; Sanh et al., 2021, inter alia).

In this paper we advance instruction finetuning in several ways. First, we study the impact of scaling on instruction finetuning. Our experiments show that instruction finetuning does scale well with the number of tasks and the size of the model. Their respective scaling behaviors suggest that future research should scale up the number of tasks and the size of the model even further. Second, we study the effect of finetuning on the ability of the models to perform reasoning tasks. Our experiments show that whereas prior instruction finetuning methods that do not include chain-of-thought (CoT; Wei et al., 2022b) severely degrade performance on CoT evaluations, adding just nine CoT datasets into the finetuning mixture enables better performance on all evaluations.

Based on these findings, we train Flan-PaLM by using a 540B-parameter model, increasing the number of finetuning tasks to 1.8K, and including CoT data. Flan-PaLM outperforms PaLM, achieving new state-of-the-art on several benchmarks. For instance, Flan-PaLM's improved reasoning abilities enable it to leverage CoT and self-consistency (Wang et al., 2022c) to achieve 75.2% on Massive Multi-task Language Understanding (MMLU; Hendrycks et al., 2020). Flan-PaLM also has improved multilingual abilities compared to PaLM, such as 14.9% absolute improvement on one-shot TyDiQA (Clark et al., 2020) and 8.1% on arithmetic reasoning in under-represented languages (Shi et al., 2022). In human rater evaluations, Flan-PaLM substantially outperforms PaLM on a challenging set of open-ended generation questions, suggesting improved usability. Moreover, we found that instruction finetuning also improves performance across several responsible AI evaluation benchmarks.

In addition, we also instruction-finetune Flan-T5 models (80M to 11B). These checkpoints have strong zero-shot, few-shot, and CoT abilities, outperforming prior public checkpoints such as T5 (Raffel et al., 2020). For example, Flan-T5 11B outperforms T5 11B by double-digit improvements and even outperforms PaLM 62B on some challenging BIG-Bench tasks (Srivastava et al., 2022). Overall, our results underscore how instruction finetuning can improve performance across a range of models, prompting setups, and evaluation tasks.

-Random25.0
-Average human rater34.5
May 2020GPT-3 5-shot43.9
Mar. 2022Chinchilla 5-shot67.6
Apr. 2022PaLM 5-shot69.3
Oct. 2022Flan-PaLM 5-shot72.2
Flan-PaLM 5-shot: CoT + SC75.2
-Average human expert89.8
Jun. 2023 forecast (Hypermind)73.2
Jun. 2024 forecast (Hypermind)75.0
Jun. 2023 forecast (Metaculus)82.7
Jun. 2024 forecast (Metaculus)87.6

Table 1: Average 5-shot MMLU scores (%) for 57 tasks with model and human accuracy comparisons (Hendrycks et al., 2020). Forecasts were made in July 2022 by competitive human forecasters, regarding a single model (Steinhardt, 2021); see https://prod.hypermind.com/ngdp/en/showcase2/showcase.html?sc=JSAI and https://www.metaculus.com/questions/11676/mmlu-sota-in-2023-2025/. CoT + SC: chain-of-thought prompting with self-consistency (Wang et al., 2022b).

References (91)

Cited by (47)