arXiv(opens in a new tab)Computer ScienceApr 2022Cited by 68 papers on PaperVantageClassic Paper

Manuscript Offprint

arXiv:2204.02311

PaLM: Scaling Language Modeling with Pathways

A. Chowdhery, Sharan Narang, Jacob Devlin, Maarten Bosma, Gaurav Mishra, Adam Roberts, P. Barham, Hyung Won Chung, Charles Sutton, Sebastian Gehrmann, P. Schuh, Kensen Shi, Sasha Tsvyashchenko, Joshua Maynez, Abhishek Rao, Parker Barnes, Yi Tay, Noam Shazeer, Vinodkumar Prabhakaran, Emily Reif, Nan Du, Ben Hutchinson, Reiner Pope, James Bradbury, Jacob Austin, M. Isard, Guy Gur-Ari, Pengcheng Yin, Toju Duke, Anselm Levskaya, S. Ghemawat, Sunipa Dev, H. Michalewski, Xavier García, Vedant Misra, Kevin Robinson, L. Fedus, Denny Zhou, Daphne Ippolito, D. Luan, Hyeontaek Lim, Barret Zoph, A. Spiridonov, Ryan Sepassi, David Dohan, Shivani Agrawal, Mark Omernick, Andrew M. Dai, Thanumalayan Sankaranarayana Pillai, Marie Pellat, Aitor Lewkowycz, Erica Moreira, R. Child, Oleksandr Polozov, Katherine Lee, Zongwei Zhou, Xuezhi Wang, Brennan Saeta, Mark Díaz, Orhan Firat, Michele Catasta, Jason Wei, K. Meier-Hellstern, D. Eck, J. Dean, Slav Petrov, Noah Fiedel

Abstract

Large language models have been shown to achieve remarkable performance across a variety of natural language tasks using few-shot learning, which drastically reduces the number of task-specific training examples needed to adapt the model to a particular application. To further our understanding of the impact of scale on few-shot learning, we trained a 540540-billion parameter, densely activated, Transformer language model, which we call Pathways Language Model (PaLM).

We trained PaLM on 61446144 TPU v4 chips using Pathways, a new ML system which enables highly efficient training across multiple TPU Pods. We demonstrate continued benefits of scaling by achieving state-of-the-art few-shot learning results on hundreds of language understanding and generation benchmarks. On a number of these tasks, PaLM 540B achieves breakthrough performance, outperforming the finetuned state-of-the-art on a suite of multi-step reasoning tasks, and outperforming average human performance on the recently released BIG-bench benchmark. A significant number of BIG-bench tasks showed discontinuous improvements from model scale, meaning that performance steeply increased as we scaled to our largest model. PaLM also has strong capabilities in multilingual tasks and source code generation, which we demonstrate on a wide array of benchmarks. We additionally provide a comprehensive analysis on bias and toxicity, and study the extent of training data memorization with respect to model scale. Finally, we discuss the ethical considerations related to large language models and discuss potential mitigation strategies.

Contents

1 Introduction

Over the last few years, very large neural networks trained for language understanding and generation have achieved astonishing results across a wide array of tasks. Many of these models, such as BERT (Devlin et al., 2019) and T5 (Raffel et al., 2020), are trained with encoder-only or encoder-decoder architectures using an infilling (“masked LM” or “span corruption”) pre-training objective on a large corpus of text, and are typically then adapted to one or more specific tasks through finetuning. Although these models have achieved near universal state of the art across thousands of natural language tasks, the downside is that they require a significant number of task-specific training examples to finetune the model. Additionally, at least a portion of the model parameters must be updated to fit the task, adding complexity from model finetuning and deployment.

GPT-3 (Brown et al., 2020) demonstrated that extremely large autoregressive language models (LMs) can be used for few-shot predictions, where the model is only given a natural language task description and (optionally) a handful of exemplars demonstrating how the task should be completed. This class of models is trained with a decoder-only architecture and a standard left-to-right language modeling objective on a large text corpus, where the objective is to predict the next token given the preceding tokens in the example. Few-shot evaluation has been shown to achieve very strong results without the need for large-scale task-specific data collection or model parameter updating.

Since GPT-3, a number of other large autoregressive language models have been developed which have continued to push the state of the art forward. The most powerful of these post-GPT-3 models are GLaM (Du et al., 2021), Gopher (Rae et al., 2021), Chinchilla (Hoffmann et al., 2022), Megatron–Turing NLG (Smith et al., 2022), and LaMDA (Thoppilan et al., 2022), all of which achieved few-shot state-of-the-art results on a significant number of tasks at the time of their release. Like GPT-3, these models are all variants of the Transformer architecture (Vaswani et al., 2017). The improvements in these models have primarily come from one or more of the following approaches: (1) scaling the size of the models in both depth and width; (2) increasing the number of tokens that the model was trained on; (3) training on cleaner datasets from more diverse sources; and (4) increasing model capacity without increasing the computational cost through sparsely activated modules.

In this work, we continue the scaling line of language modeling improvements and train a 540 billion parameter, densely activated, autoregressive Transformer on 780 billion tokens of high-quality text. This was achieved through the use of Pathways (Barham et al., 2022), a new ML system which enables highly efficient training of very large neural networks across thousands of accelerator chips, including those spanning multiple Tensor Processing Units (TPU) v4 Pods. This new model, called Pathways Language Model (PaLM), achieves state-of-the-art few-shot results across hundreds of natural language, code, and mathematical reasoning tasks. We achieve breakthrough performance on a number of these tasks.

The key takeaways from this work are as follows:

  • Efficient scaling – We demonstrate the first large-scale use of Pathways (Barham et al., 2022) – a new ML system which enables training a single model across thousands or tens of thousands of accelerator chips in a highly efficient manner. With Pathways, we trained a 540540B parameter language model on 61446144 TPU v4 chips at efficiency levels that could not be reached before for models of this scale. Most previous large language models were either trained on a single TPU system (Du et al., 2021; Thoppilan et al., 2022) or used pipeline parallelism (Huang et al., 2019) to scale across GPU clusters (Smith et al., 2022) or multiple TPU v3 pods (Rae et al., 2021), with a maximum scale of 4096 TPU v3 chips. In Section 4, we describe how we were able to scale pipeline-free training of PaLM 540B to 6144 chips across two TPU v4 Pods while achieving very high efficiency of 46.2% in model FLOPs utilization (observed throughput relative to theoretical max throughput) and 57.8% in hardware FLOPs utilization.
  • Continued improvements from scaling – In Section 6, we evaluate PaLM across hundreds of natural language, code, and mathematical reasoning tasks, and achieve state-of-the-art results on the vast majority of these benchmarks, typically by significant margins. This critically demonstrates scaling improvements from large LMs have neither plateaued nor reached their saturation point. For instance, in Table 4 we present a new few-shot state of the art on 28 out of the 29 most widely evaluated English language understanding benchmarks, compared against the best per-task result from GLaM (Du et al., 2021), GPT-3 (Brown et al., 2020), Megatron–Turing NLG (Smith et al., 2022), Gopher (Rae et al., 2021), Chinchilla (Hoffmann et al., 2022), and LaMDA (Thoppilan et al., 2022).
  • Breakthrough capabilities – We demonstrate breakthrough capabilities in language understanding and generation across a number of difficult tasks. Specifically, Section 6.3 presents evaluation on a collection of reasoning tasks, which require multi-step mathematical or commonsense reasoning to produce the correct answer. Prior state-of-the-art results use a combination of task-specific finetuning, domain-specific architectures, and task-specific verifiers to achieve strong results. In this work, we demonstrate that when model scaling is combined with chain-of-thought prompting (Wei et al., 2022b), simple few-shot evaluation can outperform or match the finetuned state of the art on a wide array of reasoning tasks. In Section 6.2 we additionally highlight breakthrough performance on BIG-bench (BIG-bench collaboration, 2021), a recently released suite of 150150+ new language understanding and generation tasks, many of which are extremely difficult even for humans to correctly answer. In Figure 1 and Section 9, we demonstrate exploratory capabilities in PaLM’s ability to explicitly interpret and explain complex reasoning chains. Figure 1: These examples demonstrate exploratory capabilities in prompting PaLM to generate explanations using chain-of-thought prompting (Wei et al., 2022b). All examples were generated with greedy (1-best) decoding of PaLM 540B. The prompting was done with 2-shot exemplars, which are shown in Section 9, along with output on more examples using these same exemplars.
  • Discontinuous improvements – To better understand the scaling behavior, we present results at three different parameter scales: 8B, 62B, and 540B. Typically, scaling from 62B to 540B results in similar performance as scaling from 8B to 62B, which is consistent with the “power law” rule of thumb often observed in neural network scaling (Kaplan et al., 2020). However, for certain tasks, we observe discontinuous improvements, where scaling from 62B to 540B results in a drastic jump in accuracy compared to scaling from 8B to 62B. Such behavior is observed on roughly 25% of the BIG-bench tasks in Section 6.2. This suggests that new capabilities of large LMs can emerge when the model achieves sufficient scale, and that these capabilities continue to emerge beyond previously studied scales.
  • Multilingual understanding – Previous work on large language models have conducted limited evaluations in the multilingual domain. In this work, we conduct a more thorough evaluation of multilingual benchmarks including machine translation (Section 6.5), summarization (Section 6.6), and question answering (Section 6.7) in a wide variety of languages. Even with a relatively small proportion of non-English data (≈22%\approx 22\%) in the training corpus, few-shot evaluation results from the 540540B model are able to bridge the gap with prior finetuned state of the art in non-English summarization tasks and outperform prior state of the art in translation tasks. Further work is necessary to understand the impact of increasing the proportion of multilingual data on the English and multilingual tasks.
  • Bias and toxicity – We also evaluated model performance for distributional bias and toxicity, which resulted in several insights (Section 10). Firstly, for gender and occupation bias, we found that accuracy on the Winogender coreference task improves with model scale, and PaLM 540B sets a new state-of-the-art result in 1-shot and few-shot settings. Secondly, co-occurence analysis performed on race/religion/gender prompt continuation demonstrates the potential for the model to falsely affirm stereotypes, for instance, associating Muslims with terrorism, extremism, and violence. This behavior was consistent across model scales. Finally, toxicity analysis on prompt continuation tasks demonstrates a slightly higher overall toxicity level for the 62B and 540B model compared to the 8B model. However, the toxicity of the model-generated continuation correlates highly with the toxicity of the prompting text, whereas human-generation continuations do not have a strong toxicity correlation. This suggests that the model is more heavily influenced by the style of the prompt than would be the case for human-generated text. In future work, we plan to broaden these benchmarks to non-English languages and more exhaustively account for potential risks.

References (100)

Couldn't load all references. Reload the page to try again.

Cited by (68)