What it does
The Alignment Handbook is a set of training recipes from Hugging Face. Alignment means shaping an AI model so it is more helpful and safe, by training it on examples and on human or AI preferences.
It includes scripts for further training a model on new text, teaching it to follow instructions, and preference methods like DPO and ORPO. Recipes reproduce models such as Zephyr 7B and SmolLM3.
Each recipe is a settings file that lists every option used for one training run.
Who it's for
Machine learning engineers and researchers who fine-tune open language models.
Can I use it without coding?
Developers only. It needs Python, a graphics card setup and machine learning experience. New to this? Start here.
Can I run it?
- Cost
- FreeNothing to pay or sign up for.
- Runs on
- Linux
- Computer
- Works best on a powerful computer or one with a graphics card (GPU)
- Privacy
- Runs on your own device: your data stays with you
- API key
- Not needed
Try it
Using Claude Code, Cursor or another AI coding assistant? Paste the prompt and it will walk you through the setup.New to this?
Before you install
- Only download from the official GitHub page. Copies with similar names exist for many popular projects.
- License (Apache-2.0): Permissive: free to use, change and share, including for business.
- More on staying safe
Where people are talking about it
- Technical report linked from the Alignment Handbook READMEResearch paper · Oct 2023