mlsanityData to 14 Oct 2026

Cache me if you Can: an Online Cost-aware Teacher-Student framework to Reduce the Calls to Large Language Models

arXiv 2310.13395 ↗First posted 20 Oct 2023cs.CLcited by 4

On the map: Knowledge distillation → Knowledge distillation for LLMs

Abstract (arXiv)

Prompting Large Language Models (LLMs) performs impressively in zero- and few-shot settings. Hence, small and medium-sized enterprises (SMEs) that cannot afford the cost of creating large task-specific training datasets, but also the cost of pretraining their own LLMs, are increasingly turning to third-party services that allow them to prompt LLMs. However, such services currently require a payment per call, which becomes a significant operating expense (OpEx). Furthermore, customer inputs are often very similar over time, hence SMEs end-up prompting LLMs with very similar instances. We propose a framework that allows reducing the calls to LLMs by caching previous LLM responses and using them to train a local inexpensive model on the SME side. The framework includes criteria for deciding when to trust the local model or call the LLM, and a methodology to tune the criteria and measure the tradeoff between performance and cost. For experimental purposes, we instantiate our framework with two LLMs, GPT-3.5 or GPT-4, and two inexpensive students, a k-NN classifier or a Multi-Layer Perceptron, using two common business tasks, intent recognition and sentiment analysis. Experimental results indicate that significant OpEx savings can be obtained with only slightly lower performance.

Key facts. Cited by 4 papers in the map (data through 14 Oct 2026). Placed in Knowledge distillation for LLMs, one of 12 directions in Knowledge distillation. Builds on 8 of its 15 references that are in the map. First posted on arXiv 20 Oct 2023.

Builds on

8 of 15 references.

References · 8

  1. 2022Training language models to follow instructions with human feedbackcited by 15,971
  2. 2015Distilling the Knowledge in a Neural Networkcited by 10,324
  3. 2019Sentence-BERT: Sentence Embeddings using Siamese BERT-Networkscited by 9,170
  4. 2019Optuna: A Next-generation Hyperparameter Optimization Frameworkcited by 2,501
  5. 2020Knowledge Distillation: A Surveycited by 1,603
  6. 2020Efficient Intent Detection with Dual Sentence Encoderscited by 433
  7. 2021Self-training Improves Pre-training for Few-shot Learning in Task-oriented Dialog Systemscited by 18
  8. 2021Task-adaptive Pre-training and Self-training are Complementary for Natural Language Understandingcited by 12

Built on by

Cited by year

Citing papers per year: 2024: 3; 2025: 1.

4 papers.

Similar, not cited

Close in wording, no citation either way

  1. 2023The economic trade-offs of large language models: A case study
  2. 2025From Large to Super-Tiny: End-to-End Optimization for Cost-Efficient LLMs
  3. 2025It Helps to Take a Second Opinion: Teaching Smaller LLMs to Deliberate Mutually via Selective Rationale Optimisation
  4. 2024Leveraging Zero-Shot Prompting for Efficient Language Model Distillation
  5. 2024PLaD: Preference-based Large Language Model Distillation with Pseudo-Preference Pairs
  6. 2025Small Models, Big Support: A Local LLM Framework for Educator-Centric Content Creation and Assessment with RAG and CAG
  7. 2024Empirical Guidelines for Deploying LLMs onto Resource-constrained Edge Devices
  8. 2023Batch Prompting: Efficient Inference with Large Language Model APIs