Skip to main content
QUICK REVIEW

[Paper Review] Zephyr: Direct Distillation of LM Alignment

Lewis Tunstall, Edward Beeching|arXiv (Cornell University)|Oct 25, 2023
Topic ModelingComputer Science53 citations
TL;DR

Zephyr-7B aligns a small open LM using distilled supervised fine-tuning (dSFT) and distilled direct preference optimization (dDPO) from AI Feedback, achieving state-of-the-art 7B chat performance and competitive results with much larger models without human annotation.

ABSTRACT

We aim to produce a smaller language model that is aligned to user intent. Previous research has shown that applying distilled supervised fine-tuning (dSFT) on larger models significantly improves task accuracy; however, these models are unaligned, i.e. they do not respond well to natural prompts. To distill this property, we experiment with the use of preference data from AI Feedback (AIF). Starting from a dataset of outputs ranked by a teacher model, we apply distilled direct preference optimization (dDPO) to learn a chat model with significantly improved intent alignment. The approach requires only a few hours of training without any additional sampling during fine-tuning. The final result, Zephyr-7B, sets the state-of-the-art on chat benchmarks for 7B parameter models, and requires no human annotation. In particular, results on MT-Bench show that Zephyr-7B surpasses Llama2-Chat-70B, the best open-access RLHF-based model. Code, models, data, and tutorials for the system are available at https://github.com/huggingface/alignment-handbook.

Motivation & Objective

  • Aim to produce a smaller language model aligned to user intent.
  • Show that distillation from larger teachers plus AI-generated preferences can reach high alignment.
  • Demonstrate that dDPO on a 7B base can match or exceed 70B-parameter chat models on key benchmarks.
  • Provide open datasets, code, and a reproducible training recipe for alignment without human annotation.

Proposed method

  • Construct self-instruction style data (UltraChat) and apply distilled SFT (dSFT) on a 7B base.
  • Collect AI Feedback (AIF) using an ensemble of teacher completions and GPT-4 scoring (UltraFeedback) to produce preference data.
  • Apply distilled direct preference optimization (dDPO) with a reward model derived from the current and reference policies.
  • Train on 16 A100s with 80GB memory, using TRL, DeepSpeed ZeRO-3, and FlashAttention-2.
  • Initialize Zephyr-7B from a one-epoch dSFT model and fine-tune with three epochs of DPO.

Experimental results

Research questions

  • RQ1Can a small open LM be aligned to user intent through distillation without human annotation?
  • RQ2Does distilled direct preference optimization (dDPO) on AI-generated preferences achieve competitive alignment to larger, human-aligned models?
  • RQ3What is the impact of combining dSFT and dDPO on standard chat benchmarks for 7B models?
  • RQ4How does Zephyr-7B compare to open and proprietary chat models on MT-Bench, AlpacaEval, and Open LLM Leaderboard tasks?

Key findings

  • Zephyr-7B achieves new state-of-the-art among open 7B chat models on MT-Bench (7.34) and surpasses many open/open-contrast models on AlpacaEval (90.60% win rate).
  • Compared to larger open models, Zephyr-7B is competitive with Llama2-Chat-70B on MT-Bench and within two standard deviations on AlpacaEval.
  • dDPO substantially improves chat capabilities over dSFT alone, with ablations showing dDPO+ dSFT yielding the best overall performance across MT-Bench and AlpacaEval.
  • One epoch of DPO after an initial dSFT is beneficial; extended DPO after longer initial SFT can degrade downstream performance, indicating careful scheduling of alignment stages.
  • Zephyr-7B narrows the gap to proprietary models on some benchmarks, and can outperform Llama2-Chat-70B on MT-Bench while remaining open-source.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.