Cost aware method speeds up evaluating large language model setups

Efficient Cost-Aware LLM Evaluation via Bayesian Bandit Gittins Indices

Machine LearningComputation and Language

Summary

Evaluating many versions of a large language model (LLM) on many test cases can be very expensive and slow. The authors came up with a smarter way called GittinsEval that decides which model setup to test next based on how promising it looks and how much it costs. This method can stop early when it’s confident enough, saving lots of work while still finding nearly the best model. Their approach is faster and uses less computation compared to other existing methods, especially when there are many tests or many model options.

What this means in practice

  • For machine learning engineers: Reduce time and cost for tuning LLM configurations by adaptively choosing which models to test next under budget constraints.
  • For ai platform operators: Accelerate LLM benchmarking by using cost-aware evaluation strategies that provide near-optimal selections with minimal resource use.

Authors

Qian Xie, Yueli He, Nairen Cao

Abstract

Exhaustively evaluating every candidate LLM configuration on every benchmark item to identify a high-performing one is costly. We formulate configuration selection as a cost-aware Bayesian bandit problem and propose GittinsEval, which draws on the Bayesian-optimal Gittins policy to determine which configuration to evaluate next and when to stop. We extend the policy with an anytime recommendation rule over both fully and partially evaluated configurations, using an LCB-style score to account for posterior uncertainty. GittinsEval is computationally efficient, requiring only lightweight online updates after offline precomputation. Across GSM8K, PIQA, AlpacaEval, and MMLU response matrices, GittinsEval is consistently competitive, with particularly strong gains over configuration-level Bayesian optimization on large-example benchmarks and over cost-unaware bandit baselines on large-candidate tasks. Crucially, GittinsEval often attains near-zero simple regret using only 1% to 2% of the exhaustive-evaluation cost; it also offers an adaptive stopping rule that typically triggers at 1% to 10%.