Demonstration Distillation for Efficient In-Context Learning
Abstract
In-context learning (ICL) substantially amplifies the predictive capability of large language models (LLMs), where the prompt typically contains a few question-answer pairs termed demonstrations, and a final question. Although lengthy and information-rich demonstrations can improve performance, they also inflate the computational burdens and financial costs, sometimes even breaching the context limit of LLMs. Existing solutions, such as prompt selection or context compression, frequently neglect the presence of superfluous information within these elongated prompts. To bridge the gap, this paper introduces demonstration distillation, a novel paradigm that targets excising the redundant content in the prompt without sacrificing ICL efficacy. We propose a distillation framework, Distillist-Generalist-Specialist (DGS), as an automated solution without additional model training. DGS iteratively refines the demonstration with the aid of three LLM-powered agents, eliminating superfluous information while maintaining valuable knowledge. Evaluations on three diverse datasets—GSM8K, BoolQ, and MultiRC—reveal the robustness and effectiveness of DGS. Particularly, DGS realizes $1.5-2$, $3-6$, and $1.5-3$ distillation ratios without compromising ICL performance on the three datasets.
BibTeX
@misc{chen2024demonstration,
author = {Tong Chen and Qirun Dai and Zhijie Deng and Dequan Wang},
title = {{Demonstration Distillation for Efficient In-Context Learning}},
year = {2024},
url = {https://openreview.net/forum?id=Y8DClN5ODu},
howpublished = {OpenReview},
note = {Submitted to ICLR 2024},
}Ask Althea to put this paper to the test.
Loading related content...