CLLGOct 20, 2023

Cache & Distil: Optimising API Calls to Large Language Models

arXiv:2310.13561v129 citationsh-index: 8
Originality Incremental advance
AI Analysis

This work addresses cost reduction for deploying generative AI tools, but it is incremental as it applies existing active learning methods to a known bottleneck.

The paper tackles the high cost of API calls to large language models (LLMs) by using a smaller student model trained on LLM responses, with a policy to decide which requests the student handles independently. Experiments on classification tasks show that Margin Sampling and Query by Committee policies consistently reduce API calls across different budgets.

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.

Foundations

The foundational work for this paper's niche, ranked by how specifically the neighbourhood builds on it — not by global fame.

Your Notes