Xwin-LM: Strong and Scalable Alignment Practice for LLMs

Bolin Ni, Jingcheng Hu, Yixuan Wei, Houwen Peng, Zheng Zhang, Gaofeng Meng, Han HuarXiv 2024 · DOI

Introduction

Aligning Large Language Models (LLMs) with human expectations—ensuring they are helpful, honest, and harmless—remains a significant challenge in AI development. While Reinforcement Learning from Human Feedback (RLHF) is the standard approach, it is often viewed as a "black art" due to its complexity and sensitivity to hyperparameters. Xwin-LM introduces a transparent, reproducible, and scalable alignment recipe that effectively bridges the gap between base model capabilities and human-aligned performance across scales from 7B to 70B parameters.

The Xwin-LM Alignment Pipeline

The authors developed Xwin-LM using a sequential four-step pipeline designed to maximize performance while maintaining computational efficiency:

  1. Supervised Fine-Tuning (SFT): The base Llama-2 model undergoes a "cold start" training phase using high-quality instruction-following data annotated by GPT-4.
  2. Reward Modeling (RM): The team trained Xwin-RM (at 7B, 13B, and 70B scales) to rank multiple responses to the same prompt, utilizing a new preference dataset called Xwin-Pair (~228k pairs ranked by GPT-4).
  3. Rejection Sampling (RS) Finetuning: For every prompt, the model generates 64 responses. The Reward Model selects the highest-quality response, and the model is then finetuned on these "best-of-64" samples to reinforce high-reward behavior.
  4. Direct Preference Optimization (DPO): To avoid the stability issues and compute overhead of Proximal Policy Optimization (PPO), the authors utilized DPO to directly optimize the policy using preferred and dispreferred response pairs.

Key Insights: Stability vs. Capability

A core finding of the Xwin-LM project is that RLHF (specifically RS and DPO) does not necessarily raise the model's "ceiling" of potential quality. Instead, its primary function is to improve stability.

Best-of-64 evaluation demonstrating that RLHF primarily improves model stability rather than peak capability.

As shown in the "Best-of-64" evaluations, even an SFT model can produce high-quality responses if sampled many times. However, in standard "Best-of-1" usage, the SFT model's performance is significantly lower. The alignment pipeline narrows this gap, making high-quality responses the consistent norm rather than a rare occurrence.

Other critical insights include:

  • The "Goldilocks" Dispreferred Sample: DPO performs best when the "bad" sample in a pair is a response the model might actually generate (e.g., a mid-ranked response) rather than a completely irrelevant one.
  • Quality Over Quantity: Data quality is paramount; GPT-4 generated responses consistently outperformed larger volumes of GPT-3.5 data.
  • RM Scalability: Larger Reward Models (70B) are significantly better at distinguishing subtle differences in response quality, which directly translates to superior final policy performance.

Results and Scalability

Xwin-LM achieved state-of-the-art performance for Llama-2-based models. The pipeline demonstrated remarkable scalability, with the 7B, 13B, and 70B models all following a consistent upward trajectory through the alignment stages.

Performance evolution of Xwin-LM models across alignment stages on AlpacaEval and MT-bench.

Xwin-LM-70B reached a 96.9% win rate on AlpacaEval, surpassing the original Llama-2-70b-chat (92.7%) and rivaling top-tier closed-source models. On the multi-turn MT-bench, the 70B model's score climbed steadily from 7.64 (SFT) to 7.90 (DPO).

Conclusion and Future Work

Xwin-LM provides a robust blueprint for LLM alignment. While the model achieves impressive benchmarks, the authors note that future work is needed to address persistent challenges like hallucinations and to further optimize multi-turn conversation capabilities beyond the current SFT baseline. Additionally, reducing reliance on GPT-4 as a judge remains a priority to mitigate potential evaluation biases.

Summary updated

BibTeX
@misc{ni2024xwin,
  author = {Bolin Ni and Jingcheng Hu and Yixuan Wei and Houwen Peng and Zheng Zhang and Gaofeng Meng and Han Hu},
  title = {{Xwin-LM: Strong and Scalable Alignment Practice for LLMs}},
  year = {2024},
  eprint = {2405.20335},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2405.20335},
}
Figure