Skip to main content
QUICK REVIEW

[Paper Review] Large Language Model Routing with Benchmark Datasets

Tal Shnitzer, Anthony Ou|arXiv (Cornell University)|Sep 27, 2023
Natural Language Processing TechniquesComputer Science8 citations
TL;DR

The paper learns to route among many open-source LLMs for a new task by converting benchmark data into per-model binary correctness predictors, enabling an efficient model selection strategy that often outperforms single-model baselines and reduces inference costs.

ABSTRACT

There is a rapidly growing number of open-source Large Language Models (LLMs) and benchmark datasets to compare them. While some models dominate these benchmarks, no single model typically achieves the best accuracy in all tasks and use cases. In this work, we address the challenge of selecting the best LLM out of a collection of models for new tasks. We propose a new formulation for the problem, in which benchmark datasets are repurposed to learn a "router" model for this LLM selection, and we show that this problem can be reduced to a collection of binary classification tasks. We demonstrate the utility and limitations of learning model routers from various benchmark datasets, where we consistently improve performance upon using any single model for all tasks.

Motivation & Objective

  • Formalize learning LLM strengths for downstream routing as a collection of binary classification problems.
  • Propose three routing scores (S1, S2, S3) that account for correctness predictors and out-of-distribution (OOD) dynamics.
  • Investigate routing performance on HELM and MixInstruct benchmarks across diverse tasks and domains.
  • Examine effects of OOD gap reduction and the potential of using smaller LLMs through routing.

Proposed method

  • Represent correctness of an LLM on an input as y(x,m) in {0,1} based on a thresholded performance metric.
  • Train a correctness predictor g_m for each LLM to estimate P(y=1|x) using embedding-based features and kNN classification.
  • Define routing scores S1, S2, S3 to compute an LLM selection score for a new task d': S1 uses predicted probability, S2 uses binary decisions, and S3 integrates an out-of-distribution accuracy p(d',m) with a meta-model of correctness.
  • Model p(d',m) as the probability that the binarized predictor is correct on task d', estimated via a task descriptor u(d) and a non-parametric regressor (Gaussian kernel).
  • Derive S3 as the expectation S3(m,d') = S2(m,d') p(d',m) + (1 - S2(m,d')) (1 - p(d',m)).
  • Compare routing strategies against baselines such as best model on average (BMA) and Oracle, and analyze the efficiency by reducing model calls at test time.
Figure 1: We learn the strengths of candidate LLMs (marked with corresponding colors) on various tasks (emojis: QA, reasoning, summarization, etc.) and domains (4 sections within each box: finance, legal, general knowledge, etc.) from benchmark datasets. We accomplish this by training a binary class
Figure 1: We learn the strengths of candidate LLMs (marked with corresponding colors) on various tasks (emojis: QA, reasoning, summarization, etc.) and domains (4 sections within each box: finance, legal, general knowledge, etc.) from benchmark datasets. We accomplish this by training a binary class

Experimental results

Research questions

  • RQ1Can benchmark-derived correctness predictors generalize to unseen tasks to reliably route among multiple LLMs?
  • RQ2Do routing scores S1, S2, and especially S3 improve task-specific model selection over using a single best model or log-likelihood-based scoring?
  • RQ3How does the OOD gap between benchmarks and new tasks affect routing performance, and can small amounts of in-distribution data improve routing?
  • RQ4What is the impact of routing through smaller LLMs on accuracy and cost across benchmarks like HELM and MixInstruct?

Key findings

  • Using correctness predictors, S3 with an estimated p(d',m) can outperform the best single model (BMA) and often pick smaller, cost-efficient models.
  • Oracle S3 (with true p) yields the highest accuracy, demonstrating the potential of this routing approach when access to true accuracy is available.
  • On HELM (29 datasets, 18 models), S3 achieves Acc. 0.694 and correlates strongly with task performance (Pearson 0.898, Spearman 0.727), outperforming S1 (0.662) and S2 (0.676).
  • S3 with true p improves Acc. to 0.735 and Pearson 0.944, Spearman 0.799, vs. BMA 0.688, Oracle 0.773.
  • Log-likelihood (LL) scoring also performs well but requires generating with all models, increasing cost.
  • MixInstruct results show our approach has competitive per-instance selection with substantial efficiency gains (fewer model calls).
  • Reducing the OOD gap with a small number of in-distribution samples improves routing for all scores, sometimes making S1 surpass S3 when enough in-distribution data is available.
Figure 2: Using $\min(\alpha n^{d^{\prime}},50)$ training samples from $d^{\prime}$ to reduce OOD gap.
Figure 2: Using $\min(\alpha n^{d^{\prime}},50)$ training samples from $d^{\prime}$ to reduce OOD gap.

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.