Skip to main content
QUICK REVIEW

[Paper Review] Toward Sustainable GenAI using Generation Directives for Carbon-Friendly Large Language Model Inference

Baolin Li, Yankai Jiang|arXiv (Cornell University)|Mar 19, 2024
Topic ModelingComputer Science5 citations
TL;DR

Sprout introduces generation directives and a linear-programming optimizer to reduce carbon emissions in LLM inference by guiding generation length while preserving quality, achieving over 40% emission reductions in real-world tests with Llama2 13B.

ABSTRACT

The rapid advancement of Generative Artificial Intelligence (GenAI) across diverse sectors raises significant environmental concerns, notably the carbon emissions from their cloud and high performance computing (HPC) infrastructure. This paper presents Sprout, an innovative framework designed to address these concerns by reducing the carbon footprint of generative Large Language Model (LLM) inference services. Sprout leverages the innovative concept of "generation directives" to guide the autoregressive generation process, thereby enhancing carbon efficiency. Our proposed method meticulously balances the need for ecological sustainability with the demand for high-quality generation outcomes. Employing a directive optimizer for the strategic assignment of generation directives to user prompts and an original offline quality evaluator, Sprout demonstrates a significant reduction in carbon emissions by over 40% in real-world evaluations using the Llama2 LLM and global electricity grid data. This research marks a critical step toward aligning AI technology with sustainable practices, highlighting the potential for mitigating environmental impacts in the rapidly expanding domain of generative artificial intelligence.

Motivation & Objective

  • Motivate and quantify the environmental impact of GenAI inference and identify opportunities to reduce carbon emissions beyond model size reductions.
  • Introduce generation directives as a novel control mechanism to influence token generation and emissions.
  • Develop a system-wide optimizer that balances carbon savings with maintained generation quality under varying grid carbon intensities.
  • Prototype Sprout on Llama2 13B and real electricity grid data to demonstrate carbon reductions and maintain output quality.

Proposed method

  • Define generation directive levels that constrain or guide token generation during autoregressive LLM inference.
  • Formulate a linear programming optimization problem to minimize expected carbon emissions per inference by choosing directive-level probabilities across prompts.
  • Incorporate an offline quality evaluator using an auto-evaluation LLM to produce a quality-preference vector that constrains directive usage.
  • Implement an opportunistic offline quality assessment schedule that triggers evaluations under low-carbon-intensity periods to minimize added emissions.
  • Integrate Sprout with existing inference servers using system prompts for directives and logging via CarbonTracker to compute e and p vectors for the optimizer.
Figure 1: The auto-regressive generation process of generative language model inference.
Figure 1: The auto-regressive generation process of generative language model inference.

Experimental results

Research questions

  • RQ1How does the number of generated tokens influence the carbon footprint of LLM inference independently of model size?
  • RQ2Can generation directives steer token generation to reduce emissions without severely compromising generation quality across tasks?
  • RQ3Can a system-wide probabilistic directive policy approach approximate per-prompt optimal directives while remaining practical in high-throughput settings?
  • RQ4What is the effectiveness of a carbon-aware optimization that adapts to grid carbon intensity in maintaining quality under emissions constraints?

Key findings

  • Generation directives can reduce token generation length while maintaining high-quality outputs, enabling carbon savings.
  • Using a 13B model with concise directives (L1) can outperform smaller models (7B with baseline) in both carbon efficiency and correctness.
  • Sprout reduces inference emissions by over 40% in real-world evaluations using Llama2 13B and global electricity grid data.
  • The optimization problem is linear, allowing use of a HiGHS dual simplex solver to compute the system-wide directive probabilities.
  • Quality feedback is obtained offline via an auto-evaluation LLM, enabling constraint-based optimization without latency impact on online inference.
Figure 2: Two factors that impact a request’s carbon footprint during LLM inference: (a) the number of model parameters and (b) the number of generated tokens.
Figure 2: Two factors that impact a request’s carbon footprint during LLM inference: (a) the number of model parameters and (b) the number of generated tokens.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.