Mitigating Training Imbalance in LLM Fine-Tuning via Selective Parameter Merging
Yiming Ju, Ziyi Ni, Xingrun Xing, Zhixiong Zeng, hanyu Zhao, Siqi Fan, Zheng Zhang
TL;DR
Addressing training-order imbalance in supervised fine-tuning of LLMs, the paper demonstrates that sample position in the first epoch can strongly affect final losses. It proposes merging multiple SFT models trained with different data orders and introduces a parameter-selection merging strategy plus a resampling module. Across tasks including instruction-following, reasoning, and code generation on base models like Llama-2-7b, merged models consistently outperform single SFT, with resampling delivering additional gains of about 2 percentage points on average. The approach remains CPU-friendly and incurs no extra inference cost, offering a practical path to scaling robust SFT and motivating future work on larger models and multi-task merging.
Abstract
Supervised fine-tuning (SFT) is crucial for adapting Large Language Models (LLMs) to specific tasks. In this work, we demonstrate that the order of training data can lead to significant training imbalances, potentially resulting in performance degradation. Consequently, we propose to mitigate this imbalance by merging SFT models fine-tuned with different data orders, thereby enhancing the overall effectiveness of SFT. Additionally, we introduce a novel technique, "parameter-selection merging," which outperforms traditional weighted-average methods on five datasets. Further, through analysis and ablation studies, we validate the effectiveness of our method and identify the sources of performance improvements.
