mlsanityData to 14 Oct 2026

You Only Fine-tune Once: Many-Shot In-Context Fine-Tuning for Large Language Models

arXiv 2506.11103 ↗First posted 6 Jun 2025cs.CL cs.AIcited by 3

Not on the map. Why?

Abstract (arXiv)

Large language models (LLMs) possess a remarkable ability to perform in-context learning (ICL), which enables them to handle multiple downstream tasks simultaneously without requiring task-specific fine-tuning. Recent studies have shown that even moderately sized LLMs, such as Mistral 7B, Gemma 7B and Llama-3 8B, can achieve ICL through few-shot in-context fine-tuning of all tasks at once. However, this approach still lags behind dedicated fine-tuning, where a separate model is trained for each individual task. In this paper, we propose a novel approach, Many-Shot In-Context Fine-tuning (ManyICL), which significantly narrows this performance gap by extending the principles of ICL to a many-shot setting. To unlock the full potential of ManyICL and address the inherent inefficiency of processing long sequences with numerous in-context examples, we propose a novel training objective. Instead of solely predicting the final answer, our approach treats every answer within the context as a supervised training target. This effectively shifts the role of many-shot examples from prompts to targets for autoregressive learning. Through extensive experiments on diverse downstream tasks, including classification, summarization, question answering, natural language inference, and math, we demonstrate that ManyICL substantially outperforms zero/few-shot fine-tuning and approaches the performance of dedicated fine-tuning. Furthermore, ManyICL significantly mitigates catastrophic forgetting issues observed in zero/few-shot fine-tuning. The code will be made publicly available upon publication.

Key facts. Cited by 3 papers in the map (data through 14 Oct 2026). Builds on 42 of its 58 references that are in the map. First posted on arXiv 6 Jun 2025.

Builds on

42 of 58 references.

References · 42

  1. 2018BERT: Pre-training of Deep Bidirectional Transformers for Language Understandingcited by 40,399
  2. 2020Language Models are Few-Shot Learnerscited by 32,419
  3. 2023LLaMA: Open and Efficient Foundation Language Modelscited by 14,132
  4. 2024Qwen2.5 Technical Reportcited by 4,942
  5. 2018GLUE: A Multi-Task Benchmark and Analysis Platform for Natural Language Understandingcited by 4,899
  6. 2018Think you have Solved Question Answering? Try ARC, the AI2 Reasoning Challengecited by 4,886
  7. 2016SQuAD: 100,000+ Questions for Machine Comprehension of Textcited by 4,148
  8. 2019HellaSwag: Can a Machine Really Finish Your Sentence?cited by 4,100
  9. 2021Finetuned Language Models Are Zero-Shot Learnerscited by 3,780
  10. 2023Mistral 7Bcited by 3,164
  11. 2023GPQA: A Graduate-Level Google-Proof Q&A Benchmarkcited by 2,879
  12. 2017A Broad-Coverage Challenge Corpus for Sentence Understanding through Inferencecited by 2,682
30 more
  1. 2018Can a Suit of Armor Conduct Electricity? A New Dataset for Open Book Question Answeringcited by 2,164
  2. 2022Challenging BIG-Bench Tasks and Whether Chain-of-Thought Can Solve Themcited by 1,807
  3. 2021What Makes Good In-Context Examples for GPT-3?cited by 1,195
  4. 2022Super-NaturalInstructions: Generalization via Declarative Instructions on 1600+ NLP Taskscited by 868
  5. 2019Adversarial NLI: A New Benchmark for Natural Language Understandingcited by 807
  6. 2017Crowdsourcing Multiple Choice Science Questionscited by 765
  7. 2019Compressive Transformers for Long-Range Sequence Modellingcited by 726
  8. 2023An Empirical Study of Catastrophic Forgetting in Large Language Models During Continual Fine-tuningcited by 639
  9. 2021MetaICL: Learning to Learn In Contextcited by 454
  10. 2020Efficient Intent Detection with Dual Sentence Encoderscited by 433
  11. 2020TweetEval: Unified Benchmark and Comparative Evaluation for Tweet Classificationcited by 417
  12. 2019PAWS: Paraphrase Adversaries from Word Scramblingcited by 402
  13. 2021XL-Sum: Large-Scale Multilingual Abstractive Summarization for 44 Languagescited by 347
  14. 2024Long-context LLMs Struggle with Long In-context Learningcited by 286
  15. 2019Cosmos QA: Machine Reading Comprehension with Contextual Commonsense Reasoningcited by 285
  16. 2022Black-Box Tuning for Language-Model-as-a-Servicecited by 256
  17. 2019QASC: A Dataset for Question Answering via Sentence Compositioncited by 252
  18. 2023Parameter-Efficient Fine-Tuning Methods for Pretrained Language Models: A Critical Review and Assessmentcited by 230
  19. 2024Many-Shot In-Context Learningcited by 206
  20. 2018Hate Speech Dataset from a White Supremacy Forumcited by 198
  21. 2019DREAM: A Challenge Dataset and Models for Dialogue-Based Reading Comprehensioncited by 156
  22. 2021CrossFit: A Few-shot Learning Challenge for Cross-task Generalization in NLPcited by 142
  23. 2023Investigating the Catastrophic Forgetting in Multimodal Large Language Modelscited by 119
  24. 2019QuaRTz: An Open-Domain Dataset of Qualitative Relationship Questionscited by 89
  25. 2022Improving In-Context Few-Shot Learning via Self-Supervised Trainingcited by 57
  26. 2018QuaRel: A Dataset and Models for Answering Questions about Qualitative Relationshipscited by 46
  27. 2020"I'd rather just go to bed": Understanding Indirect Answerscited by 36
  28. 2018Identifying Well-formed Natural Language Questionscited by 29
  29. 2025Efficient Many-Shot In-Context Learning with Dynamic Block-Sparse Attentioncited by 12
  30. 2023Reliable and Interpretable Drift Detection in Streams of Short Textscited by 2

Built on by

Cited by year (2026 to 14 Oct)

Citing papers per year: 2025: 1; 2026: 2.

3 papers.