Demystifying Instruction Mixing for Fine-tuning Large Language Models
Renxi Wang, Haonan Li, Minghao Wu, Yuxia Wang, Xudong Han, Chiyu Zhang, Timothy Baldwin
TL;DR
This paper investigates how to mix instruction datasets for fine-tuning large language models, focusing on three instruction types: NLP tasks, coding, and general chat. It systematically analyzes eight mixing configurations and varying ratios and instance counts using LLaMA-2 7B and 13B, evaluating on NLP benchmarks, code generation, and alignment. The results show specialized datasets boost domain-specific performance, but naive mixtures can degrade other capabilities; coding data improves both coding and alignment, while NLP-task data can harm alignment when combined with other types. The findings highlight model size as a key factor in leveraging instruction diversity and provide a foundation for designing future instruction mixtures.
Abstract
Instruction tuning significantly enhances the performance of large language models (LLMs) across various tasks. However, the procedure to optimizing the mixing of instruction datasets for LLM fine-tuning is still poorly understood. This study categorizes instructions into three primary types: NLP downstream tasks, coding, and general chat. We explore the effects of instruction tuning on different combinations of datasets on LLM performance, and find that certain instruction types are more advantageous for specific applications but can negatively impact other areas. This work provides insights into instruction mixtures, laying the foundations for future research.
