Cache & Distil: Optimising API Calls to Large Language Models

Guillem Ramírez, Matthias Lindemann, Alexandra Birch, Ivan Titov
10/20/2023
cs.CLcs.LG

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

Abstract

Large-scale deployment of generative AI tools often depends on costly API calls to a Large Language Model (LLM) to fulfil user queries. To curtail the frequency of these calls, one can employ a smaller language model -- a student -- which is continuously trained on the responses of the LLM. This student gradually gains proficiency in independently handling an increasing number of user requests, a process we term neural caching. The crucial element in neural caching is a policy that decides which requests should be processed by the student alone and which should be redirected to the LLM, subsequently aiding the student's learning. In this study, we focus on classification tasks, and we consider a range of classic active learning-based selection criteria as the policy. Our experiments suggest that Margin Sampling and Query by Committee bring consistent benefits across tasks and budgets.

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. 3 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{ramrez2023cache,
  title  = {Cache & Distil: Optimising API Calls to Large Language Models},
  author = {Guillem Ramírez and Matthias Lindemann and Alexandra Birch and Ivan Titov},
  year   = {2023},
  eprint = {2310.13561},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2310.13561v1}
}

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/2310.13561.svg)](https://codeofpaper.com/paper/2310.13561)

Discussion