In-Context Learning Distillation for Efficient Few-Shot Fine-Tuning
Yifei Duan, Liu Li, Zirui Zhai, Jinxia Yao

TL;DR
This paper introduces a knowledge distillation method for in-context learning that significantly reduces model size and memory usage while improving out-of-domain accuracy in natural language inference tasks.
Contribution
It presents a novel in-context learning distillation technique that enhances model efficiency and performance beyond traditional prompt-based fine-tuning methods.
Findings
Model size reduced from 2.5GB to 0.25GB.
Out-of-domain accuracy improved by nearly 50%.
Memory consumption decreased by up to 60%.
Abstract
We applied few-shot in-context learning on the OPT-1.3B model for the natural language inference task and employed knowledge distillation to internalize the context information, reducing model parameter from 1.3B to 125M and achieving a size reduction from 2.5GB to 0.25GB. Compared to using in-context learning alone on similarly sized models, this context distillation approach achieved a nearly 50% improvement in out-of-domain accuracy, demonstrating superior knowledge transfer capabilities over prompt-based methods. Furthermore, this approach reduced memory consumption by up to 60% while delivering a 20% improvement in out-of-domain accuracy compared to conventional pattern-based fine-tuning.
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsImage Processing Techniques and Applications
MethodsKnowledge Distillation
