Optimising Calls to Large Language Models with Uncertainty-Based Two-Tier Selection

Guillem Ramírez, Alexandra Birch, Ivan Titov
5/3/2024
cs.CL

No confident code implementation found for this paper. 2 possible matches can be shown below.

Abstract

Researchers and practitioners operating on a limited budget face the cost-performance trade-off dilemma. The challenging decision often centers on whether to use a large LLM with better performance or a smaller one with reduced costs. This has motivated recent research in the optimisation of LLM calls. Either a cascading strategy is used, where a smaller LLM or both are called sequentially, or a routing strategy is used, where only one model is ever called. Both scenarios are dependent on a decision criterion which is typically implemented by an extra neural model. In this work, we propose a simpler solution; we use only the uncertainty of the generations of the small LLM as the decision criterion. We compare our approach with both cascading and routing strategies using three different pairs of pre-trained small and large LLMs, on nine different tasks and against approaches that require an additional neural model. Our experiments reveal this simple solution optimally balances cost and performance, outperforming existing methods on 25 out of 27 experimental setups.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. 2 weaker matches are hidden by default — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{ramrez2024optimising,
  title  = {Optimising Calls to Large Language Models with Uncertainty-Based Two-Tier Selection},
  author = {Guillem Ramírez and Alexandra Birch and Ivan Titov},
  year   = {2024},
  eprint = {2405.02134},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2405.02134v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2405.02134.svg)](https://codeofpaper.com/paper/2405.02134)

Discussion