MESS+: Energy-Optimal Inferencing in Language Model Zoos with Service Level Guarantees

Ryan Zhang, Herbert Woisetschläger, Shiqiang Wang, Hans-Arno Jacobsen

Here is a concise, engaging summary of the paper "MESS+: Energy-Optimal Inferencing in Language Model Zoos with Service Level Guarantees".

TL;DR

MESS+ is an online stochastic optimization algorithm that dynamically routes individual LLM inference requests to the most energy-efficient model in a "zoo" while strictly satisfying accuracy-based Service Level Agreements (SLAs). By balancing energy costs against predicted model performance on a per-request basis, it slashes energy consumption by up to 4.6× compared to always deploying the largest model.

What Problem Does This Paper Address?

The rapid proliferation of open-weight large language models (LLMs) like Llama, Mistral, and Granite has given rise to "model zoos"—repositories hosting diverse models of varying sizes and capabilities.

When deploying these models commercially, a fundamental tension arises:

  1. End-users demand high-quality, factually accurate outputs, typically governed by Service Level Agreements (SLAs).
  2. Inference providers face massive infrastructure and energy costs, making energy efficiency a top operational priority.

Currently, selecting which model to serve relies on static public leaderboards or educated guessing. There is a distinct lack of automated, dynamic routing mechanisms capable of evaluating the complexity of an incoming request and sending it to the smallest (and cheapest) model capable of satisfying the user's quality constraints.

Methods

The authors introduce MESS+ (Model Selection with Energy-optimal Service-level GuaranteeS), an online decision-making framework based on the Lyapunov drift-plus-penalty technique.

Key components of the methodology include:

  • Finite Horizon Adaptation: While traditional Lyapunov optimization assumes an infinite timeline, MESS+ adapts it to a finite number of requests ($T$), aligning with volume-based commercial SLAs.
  • Virtual Queues: MESS+ maintains a mathematical "virtual queue" that tracks cumulative SLA accuracy violations over time. If the system underperforms on recent requests, the queue grows, forcing the algorithm to prioritize higher-accuracy (larger) models for subsequent requests.
  • Per-Request Optimization: For every incoming request, the algorithm solves a low-complexity ($O(M)$, where $M$ is the number of models) linear search to pick the model that minimizes a weighted combination of energy cost and predicted SLA violation. A control parameter ($V$) allows providers to manually tune the trade-off between energy savings and strict accuracy.
  • Probabilistic Exploration: Because a request's true accuracy can't be known before running the LLM, MESS+ trains a lightweight fasttext linear classifier for each model to predict performance. It uses a decaying Bernoulli sampling strategy to occasionally query multiple models, gathering ground-truth data to update these predictors via Stochastic Gradient Descent (SGD).

Datasets

The framework was evaluated using two state-of-the-art language modeling tasks:

  • WMT14: A language translation dataset, evaluated using the BLEU-1 metric (SLA target $\alpha = 0.52$).
  • CNNDailyMail: A text summarization dataset, evaluated using the ROUGE-1 metric (SLA target $\alpha = 0.315$).

The experimental model zoo consisted of two distinct classes: TinyLlama 1.1B (representing small, low-energy models) and Llama-2 13B (representing large, high-accuracy models).

Key Insights and Ideas

  • The Non-Linear Cost of Quality: The authors discovered that moving from a "gold" SLA tier to a "platinum" tier (a mere 1% increase in target accuracy) required 1.9× more energy, illustrating how exponentially expensive the final increments of LLM performance can be.
  • Dynamic SLA Buffering: The control parameter $V$ acts as a business-logic dial. When $V$ is high, the system aggressively pursues energy efficiency; when $V$ is low, it plays it safe to protect accuracy. The optimal value of $V$ is inversely related to the strictness of the SLA ($\alpha$).
  • Exploration vs. Latency Trade-off: While more aggressive exploration (higher $c$ values) yields better accuracy predictors over time, it introduces a significant latency penalty during training phases because multiple models must be queried simultaneously.

Key Results

MESS+ successfully satisfies SLA constraints while achieving the lowest energy footprint among all compliant baselines.

Table 1: Comparison of baseline model selection strategies and MESS+ with V = 0.1 and c = 3. Our approach satisfies the SLA with requirement α while consuming the least energy among all compliant strategies.

As shown in Table 1:

  • vs. Largest Model (Llama-2 13B): MESS+ meets the SLA while reducing energy consumption by 3.5× on the translation task (WMT14) and 4.6× on the summarization task (CNNDailyMail).
  • vs. Constrained Random Selection: MESS+ achieves identical average accuracy over time but operates up to 2.5× more energy-efficiently than randomly picking a model that fits the SLA criteria.

Limitations and Future Work

  • Immediate Feedback Assumption: The current version of MESS+ assumes that the true accuracy of an LLM's output can be estimated or flagged immediately after generation to update the virtual queue. In real-world applications, ground-truth user feedback is often delayed or noisy.
  • Classifier Scalability: The current architecture trains a separate linear classifier for every model in the zoo. As model zoos scale to dozens or hundreds of models, managing these individual classifiers will introduce a computational bottleneck. The authors note that simplifying this approximation mechanism is a primary focus for future work.

Summary updated

Abstract

Open-weight large language model (LLM) zoos allow users to quickly integrate state-of-the-art models into systems. Despite increasing availability, selecting the most appropriate model for a given task still largely relies on public benchmark leaderboards and educated guesses. This can be unsatisfactory for both inference service providers and end users, where the providers usually prioritize cost efficiency, while the end users usually prioritize model output quality for their inference requests. In commercial settings, these two priorities are often brought together in Service Level Agreements (SLA). We present MESS+, an online stochastic optimization algorithm for energy-optimal model selection from a model zoo, which works on a per-inference-request basis. For a given SLA that requires high accuracy, we are up to 2.5x more energy efficient with MESS+ than with randomly selecting an LLM from the zoo while maintaining SLA quality constraints.
BibTeX
@misc{zhang2024mess,
  author = {Ryan Zhang and Herbert Woisetschläger and Shiqiang Wang and Hans-Arno Jacobsen},
  title = {{MESS+: Energy-Optimal Inferencing in Language Model Zoos with Service Level Guarantees}},
  year = {2024},
  eprint = {2411.00889},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2411.00889},
}
Figure