arXiv(opens in a new tab)cs.LGApr 2021Cited by 44 papers on PaperVantageClassic Paper

Manuscript Offprint

arXiv:2104.10350

Carbon Emissions and Large Neural Network Training

David Patterson, Joseph Gonzalez, Quoc Le, Chen Liang, Lluis-Miquel Munguia, Daniel Rothchild, David So, Maud Texier, Jeff Dean

David Patterson1,2^{1,2}, Joseph Gonzalez2^{2}, Quoc Le1^{1}, Chen Liang1^{1}, Lluis-Miquel Munguia1^{1}, Daniel Rothchild2^{2}, David So1^{1}, Maud Texier1^{1}, and Jeff Dean1^{1}

{davidpatterson, qvl, crazydonkey, llmunguia, davidso, maudt, jeff}@google.com, {pattrsn, jegonzal, drothchild}@berkeley.edu

Abstract: The computation demand for machine learning (ML) has grown rapidly recently, which comes with a number of costs. Estimating the energy cost helps measure its environmental impact and finding greener strategies, yet it is challenging without detailed information.

We calculate the energy use and carbon footprint of several recent large models—T5, Meena, GShard, Switch Transformer, and GPT-3—and refine earlier estimates for the neural architecture search that found Evolved Transformer.

We highlight the following opportunities to improve energy efficiency and CO2CO_{2} equivalent emissions ( CO2eCO_{2}e):

  • Large but sparsely activated DNNs can consume <1/10th the energy of large, dense DNNs without sacrificing accuracy despite using as many or even more parameters.

  • Geographic location matters for ML workload scheduling since the fraction of carbon-free energy and resulting CO2eCO_{2}e vary ∼5X−10X\sim5X-10X, even within the same country and the same organization. We are now optimizing where and when large models are trained.

  • Specific datacenter infrastructure matters, as Cloud datacenters can be ~1.4-2X more energy efficient than typical datacenters, and the ML-oriented accelerators inside them can be ~2-5X more effective than off-the-shelf systems.

Remarkably, the choice of DNN, datacenter, and processor can reduce the carbon footprint up to ~100-1000X.

These large factors also make retroactive estimates of energy cost difficult. To avoid miscalculations, we believe ML papers requiring large computational resources should make energy consumption and CO2eCO_{2}e explicit when practical. We are working to be more transparent about energy use and CO2eCO_{2}e in our future research. To help reduce the carbon footprint of ML, we believe energy usage and CO2eCO_{2}e should be a key metric in evaluating models, and we are collaborating with MLPerf developers to include energy usage during training and inference in this industry standard benchmark.

1. Introduction

As ML models increase in scale, a general trend is that they become more accurate and more capable. However, larger models translate to greater computing demands and, by extension, greater energy demands. We focus on natural language processing (NLP) because it is important in Google products and because of the recent development of many large NLP models, e.g., T5 [Raf19], Meena [Adi20], GShard [Lep20], Switch Transformer [Fed21], and GPT-3 [Bro20]. Recent studies attempt to evaluate the environmental impact of this trend in NLP, which is difficult [Str19]. Here we investigate and share the estimates of the energy consumed and CO2e3CO_{2}e^{3} of these recent and large NLP models. We also reduce by 88X an earlier estimate of the CO2eCO_{2}e for the neural architecture search for Evolved Transformer [So19, Str19] by characterizing the actual search process on the hardware and datacenter on which it was performed (see Appendices C and D).

Our investigation into CO2eCO_{2}e revealed surprises and misunderstandings about the full Deep Neural Network (DNN) lifecycle, the datacenters and hardware that run them, the variations in energy mix, and the difficulty of assessing CO2eCO_{2}e accurately. Note that we are evaluating the CO2eCO_{2}e of operating computers and datacenters, but not fabricating and recycling them (see [Gup20] for the latter topic).

To make it easier for the ML community to understand the real impact of training and how to reduce it, we endorse prior calls for new publication norms for computationally intensive ML models:

1^{1} Google

2^{2} University of California, Berkeley

3^{3} “CO 2_{2}e” means CO 2_{2} equivalent emissions, accounting for carbon dioxide and all the other greenhouse gases as well: methane, nitrous oxide, ... (calculated from Equation A-1 in 40 Code of Federal Regulations 98). “CO 2_{2} emissions” is only carbon dioxide. tCO 2_{2}e stands for 1000 kg (metric ton) of CO 2_{2} equivalent emissions.

  1. We must assess CO2eCO_{2}e correctly, but it is hard to quantify precisely in part because all the required information is rarely reported or publicly available (e.g., datacenter, hardware, energy mix) and in part because it is hard to uncover important details afterwards (see Section 4.1). To make the carbon costs of training transparent, we encourage more researchers to measure energy usage and CO2eCO_{2}e—or to get a rough estimate using a tool like ML Emissions Calculator [Lac19] (Section 4.3)—and publish the data.

  2. We agree with [Str19, Sch20, Hen20] that efficiency should be an evaluation criterion for publishing ML research on computationally intensive models besides accuracy and related measures, since we need to encourage advances across the board as the most sustainable energy is the energy you don't use.

  3. And even if we could bring CO2eCO_{2}e to zero in cloud datacenters, reducing training time matters, both because “time is money,” and because cheaper training lets more people participate. Hence, we also second the recommendation of [Str19] for more researchers to publish the number of accelerators and their time to train computationally intensive models to inspire progress in reducing training costs. We believe such new incentives could lead to a virtuous cycle where ML practitioners compete to increase accuracy while lowering energy consumption and CO2eCO_{2}e that could bend the curve of ML carbon footprint growth for computationally intensive NLP models.

The following sections summarize the findings that led to these recommendations. They also document our CO2eCO_{2}e estimates, highlight recent advances that curb the CO2eCO_{2}e of ML, and estimate the CO2eCO_{2}e from training the five recent large NLP models mentioned above. We end by updating the results of [Str19] on the emissions of the Evolved Transformer neural architecture search and discussing common misperceptions.

We start with an overview of the carbon footprint over the DNN lifecycle and show ways to improve a concrete example by nearly two orders of magnitude.

References (42)

Cited by (44)