Introduction
Supervised Fine-Tuning (SFT) is the foundational step in aligning base Large Language Models (LLMs) to follow human instructions. Traditionally, SFT relies on Cross-Entropy (CE) loss, which minimizes the difference between the model's output and the ground truth for every token in the dataset. However, this approach assumes all training samples are of high quality. In practice, popular SFT datasets like Alpaca or ShareGPT are often noisy, containing incorrect or incoherent pairs. CE loss forces the model to learn from this noise, often leading to performance degradation and overfitting.
Methodology: Preference-Oriented SFT (PoFT)
To address the limitations of standard SFT, we introduce Preference-oriented Supervised Fine-Tuning (PoFT). PoFT reframes SFT as a preference learning task. Instead of treating every sample equally, PoFT uses existing, well-aligned "teacher" models to establish a quality benchmark.
The Bradley-Terry Objective
The core of PoFT is the application of the Bradley-Terry ranking model. Rather than comparing a "chosen" response to a "rejected" one (as in Direct Preference Optimization), PoFT compares the target model to a set of aligned reference models (e.g., Zephyr, Llama-3-Instruct) on the same ground-truth data.
The preference score is defined as the log-likelihood of the response given the instruction, normalized by sequence length to prevent length bias. This setup introduces a dynamic gradient weighting mechanism: if the reference models assign a high likelihood to a sample (indicating high quality), the gradient weight for that sample increases. Conversely, if the reference models "dislike" the sample, its influence on the training process is diminished. This effectively creates a "soft" data filter integrated directly into the loss function.
Key Results and Insights
We validated PoFT using Mistral-7B and Llama-3-8B backbones across several datasets, including UltraChat200k, OpenHermes, and ShareGPT.
Stability Over Epochs
A significant advantage of PoFT is its stability over multiple training epochs. Standard SFT often suffers from performance drops as the model begins to overfit to the noise in the "long tail" of the dataset. PoFT, by implicitly filtering out low-quality data, maintains or even improves performance over extended training periods.
On the OpenHermes dataset, PoFT improved Mistral-7B’s average score on the Open LLM Leaderboard by 2.15 points and Llama-3-8B by 1.11 points compared to standard SFT. Furthermore, PoFT showed remarkable synergy with subsequent alignment steps like DPO, achieving a 27.83% win rate on AlpacaEval 2.0, significantly outperforming the SFT+DPO baseline.
Conclusion
PoFT represents a shift from token-level prediction to model-level preference in the initial stages of LLM alignment. By leveraging the knowledge of existing aligned models as a dynamic quality filter, PoFT overcomes the noise sensitivity of traditional Cross-Entropy loss. This approach provides a more robust and high-performing foundation for further alignment techniques like RLHF or DPO, ensuring that models prioritize high-quality instruction-following data during their initial training phase.
Summary updated