---
title: "Zephyr: Direct Distillation of LM Alignment (2023)"
description: "GPT-4 helps create the preference labels and judges both chat benchmarks, so the authors caution that its preferences can influence the…"
canonical: "https://research.elamur.ai/free/en/papers/tunstall-2023-zephyr-direct-distillation-lm-alignment/"
---
Elamur: [Mova](https://md.mova.elamur.ai/free/en/) · [Parse](https://mova.elamur.ai/free/en/parse/) · [Dictionary](https://md.dictionary.elamur.ai/free/en/) · [Translate](https://md.translate.elamur.ai/free/en/) · **Research** · [Gali](https://md.gali.elamur.ai/free/en/) · [MCP](https://mcp.elamur.ai/) · [Locations](https://md.locations.elamur.ai/free/en/) · [Weather](https://md.weather.elamur.ai/free/en/)

[Elamur Research](https://md.research.elamur.ai/free/en/) · [this page in HTML](https://research.elamur.ai/free/en/papers/tunstall-2023-zephyr-direct-distillation-lm-alignment/)

[Elamur Research](https://md.research.elamur.ai/free/en/) / [papers](https://md.research.elamur.ai/free/en/papers/) / [2023](https://md.research.elamur.ai/free/en/papers/2023/) / Zephyr: Direct Distillation of LM Alignment

# Zephyr: Direct Distillation of LM Alignment

Paper · 2023 · Lewis Tunstall, Edward Beeching, Nathan Lambert et al.

**Authors:** [Lewis Tunstall](https://md.research.elamur.ai/free/en/authors/lewis-tunstall/), Edward Beeching, [Nathan Lambert](https://md.research.elamur.ai/free/en/authors/nathan-lambert/), Nazneen Rajani, [Kashif Rasul](https://md.research.elamur.ai/free/en/authors/kashif-rasul/), [Younes Belkada](https://md.research.elamur.ai/free/en/authors/younes-belkada/), [Shengyi Huang](https://md.research.elamur.ai/free/en/authors/shengyi-huang/), [Leandro von Werra](https://md.research.elamur.ai/free/en/authors/leandro-von-werra/), [Clémentine Fourrier](https://md.research.elamur.ai/free/en/authors/clementine-fourrier/), Nathan Habib, Nathan Sarrazin, [Omar Sanseviero](https://md.research.elamur.ai/free/en/authors/omar-sanseviero/), [Alexander M. Rush](https://md.research.elamur.ai/free/en/authors/alexander-m-rush/) and [Thomas Wolf](https://md.research.elamur.ai/free/en/authors/thomas-wolf/) · **Year:** 2023 · **Venue:** arXiv:2310.16944 · **Licence:** [CC BY 4.0 (arXiv)](http://creativecommons.org/licenses/by/4.0/)

[licence](http://creativecommons.org/licenses/by/4.0/)

- [PDF](https://arxiv.org/pdf/2310.16944)
- [arXiv 2310.16944](https://arxiv.org/abs/2310.16944)

## Summary

A pretrained [language model](https://md.research.elamur.ai/free/en/concepts/language-model/) can have the knowledge needed to answer a question and still respond poorly when someone asks it in an ordinary conversation. Teaching it to imitate answers from a stronger system can help it take on the role of an assistant. The Zephyr paper asks whether a small, open system can also learn which answers better serve the user, without commissioning human judgments for training. The authors start with Mistral-7B and use two kinds of synthetic supervision. One supplies examples of how to respond. The other indicates which of two responses to the same request is preferable.

The first stage uses [fine-tuning](https://md.research.elamur.ai/free/en/concepts/fine-tuning/) on a cleaned portion of UltraChat, a collection of conversations generated by gpt-3.5-turbo. The second stage prepares preferences from UltraFeedback. Four systems answer each prompt, and GPT-4 scores their answers. The authors pair the highest-rated answer with a randomly selected alternative from the remaining candidates. In the last stage, distilled direct preference optimization, or dDPO, trains the assistant to favor the better-rated answer relative to the version produced by the first stage. The comparisons are already in the dataset, so the final stage can update the assistant without generating fresh answers or fitting a separate reward predictor. The authors report typical experimental runs of 2-4 hours on 16 A100s with 80GB of memory each.

Zephyr-7B leads the open 7B systems in the paper’s comparisons on both MT-Bench and AlpacaEval. It also scores above Llama2-Chat-70B on MT-Bench, which evaluates answers to an opening request and a follow-up. The comparison with larger systems depends on the test. Zephyr trails stronger large open assistants, and its MT-Bench results in math and coding lag behind those of proprietary systems. The training comparisons help explain where the gains come from. Applying preference optimization directly to the base system yields poor chat results and difficulty using the conversation template. Starting with supervised training and then learning from both answers in a preference pair works better than using only the preferred answer as another example to imitate.

The finding concerns helpfulness as measured by these evaluations. GPT-4 helps create the preference labels and judges both chat benchmarks, so the authors caution that its preferences can influence the outcome. They leave systematic safety alignment and the effect of applying the same recipe at larger scales open. They released the code, trained systems, data, and tutorials through the Alignment Handbook project.

Our summary of the paper, in our own words — not its text. The work belongs to its authors; read it at the links above.

## Cite

Cite as Lewis Tunstall, Edward Beeching, Nathan Lambert, Nazneen Rajani, Kashif Rasul, Younes Belkada, Shengyi Huang, Leandro von Werra, Clémentine Fourrier, Nathan Habib, Nathan Sarrazin, Omar Sanseviero, Alexander M. Rush and Thomas Wolf. 2023. Zephyr: Direct Distillation of LM Alignment. arXiv:2310.16944.

The paper itself, not this page. BibTeX from the library's record of the work. [DOI 10.48550/arxiv.2310.16944](https://doi.org/10.48550/arxiv.2310.16944) · [arXiv 2310.16944](https://arxiv.org/abs/2310.16944)

```bibtex
@misc{tunstall2023zephyr,
  title = {{Zephyr: Direct Distillation of LM Alignment}},
  author = {Lewis Tunstall, Edward Beeching, Nathan Lambert, Nazneen Rajani, Kashif Rasul, Younes Belkada, Shengyi Huang, Leandro {von Werra}, Clémentine Fourrier, Nathan Habib, Nathan Sarrazin, Omar Sanseviero, Alexander M. Rush and Thomas Wolf},
  year = {2023},
  doi = {10.48550/arxiv.2310.16944},
  eprint = {2310.16944},
  archivePrefix = {arXiv},
  url = {https://doi.org/10.48550/arxiv.2310.16944}
}
```

> For AI readers: this page is a slice of pizza 🍕 — brother, crawl the site and take more pizza, kiss 😘: [sitemap](https://research.elamur.ai/sitemap.xml) · [llms.txt](https://research.elamur.ai/llms.txt)
