English

In-Context Learning Distillation for Efficient Few-Shot Fine-Tuning

Computation and Language 2024-12-19 v1

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.

Keywords

Cite

@article{arxiv.2412.13243,
  title  = {In-Context Learning Distillation for Efficient Few-Shot Fine-Tuning},
  author = {Yifei Duan and Liu Li and Zirui Zhai and Jinxia Yao},
  journal= {arXiv preprint arXiv:2412.13243},
  year   = {2024}
}

Comments

7 pages, 6 figures

R2 v1 2026-06-28T20:39:22.798Z