Skip to content

Commit 19f0345

Browse files
lewtuncmpatinoclaude
authored
Upgrade data mixer, deps, and scripts (#221)
* Fix unit test * Fix chat template tests * Remove deprecated test * up * Clean up * Refactor to the max * foo * Fix * Make orpo work * Fix CAI * Fix README * Fix slurm launcher * Fix configs * Fix smollm * Fix smollm1 and smollm2 * Fix tests * Fix stachat * Fix gemma * Fix mixtral * Fix * Fix tests * Update recipes with published checkpoints * Update news date in README 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]> --------- Co-authored-by: cmpatino <[email protected]> Co-authored-by: Claude <[email protected]>
1 parent c8f5bdf commit 19f0345

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

67 files changed

+1411
-2516
lines changed

.github/workflows/build_documentation.yml

Lines changed: 0 additions & 18 deletions
This file was deleted.

.github/workflows/build_pr_documentation.yml

Lines changed: 0 additions & 19 deletions
This file was deleted.

.github/workflows/tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,6 @@ jobs:
2626
- name: Install dependencies
2727
run: |
2828
python -m pip install --upgrade pip
29-
python -m pip install ".[dev, torch]"
29+
python -m pip install ".[dev]"
3030
- name: Run unit tests
3131
run: HF_TOKEN=$HF_TOKEN pytest -sv tests/

.github/workflows/upload_pr_documentation.yml

Lines changed: 0 additions & 16 deletions
This file was deleted.

CITATION.cff

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,4 +26,4 @@ authors:
2626
family-names: Wolf
2727
repository-code: 'https://github.com/huggingface/alignment-handbook'
2828
license: Apache-2.0
29-
version: 0.3.0.dev0
29+
version: 0.4.0.dev0

README.md

Lines changed: 17 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ However, we know from the [InstructGPT](https://huggingface.co/papers/2203.02155
1919
The Alignment Handbook aims to fill that gap by providing the community with a series of robust training recipes that span the whole pipeline.
2020

2121
## News 🗞️
22+
* **July 24, 2025**: We release the full [post-training recipe](recipes/smollm2/README.md) behind SmolLM3-3B: a state-of-the-art hybrid reasoning model 💭
2223
* **November 21, 2024**: We release the [recipe](recipes/smollm2/README.md) for fine-tuning SmolLM2-Instruct.
2324
* **August 18, 2024**: We release SmolLM-Instruct v0.2, along with the [recipe](recipes/smollm/README.md) to fine-tuning small LLMs 💻
2425
* **April 12, 2024**: We release Zephyr 141B (A35B), in collaboration with Argilla and Kaist AI, along with the recipe to fine-tune Mixtral 8x22B with ORPO 🪁
@@ -60,32 +61,35 @@ The initial release of the handbook will focus on the following techniques:
6061

6162
## Installation instructions
6263

63-
To run the code in this project, first, create a Python virtual environment using e.g. Conda:
64+
To run the code in this project, first, create a Python virtual environment using e.g. `uv`:
6465

6566
```shell
66-
conda create -n handbook python=3.10 && conda activate handbook
67+
uv venv handbook --python 3.11 && source handbook/bin/activate && uv pip install --upgrade pip
6768
```
6869

69-
Next, install PyTorch `v2.1.2` - the precise version is important for reproducibility! Since this is hardware-dependent, we
70-
direct you to the [PyTorch Installation Page](https://pytorch.org/get-started/locally/).
70+
> [!TIP]
71+
> To install `uv`, follow the [UV Installation Guide](https://docs.astral.sh/uv/getting-started/installation/).
72+
73+
Next, install PyTorch `v2.6.0`
74+
75+
```shell
76+
uv pip install torch==2.6.0 --index-url https://download.pytorch.org/whl/cu126
77+
```
78+
79+
Note that the precise version is important for reproducibility! Since this is hardware-dependent, we also direct you to the [PyTorch Installation Page](https://pytorch.org/get-started/locally/).
7180

7281
You can then install the remaining package dependencies as follows:
7382

7483
```shell
75-
git clone https://github.com/huggingface/alignment-handbook.git
76-
cd ./alignment-handbook/
77-
python -m pip install .
84+
uv pip install .
7885
```
7986

8087
You will also need Flash Attention 2 installed, which can be done by running:
8188

8289
```shell
83-
python -m pip install flash-attn --no-build-isolation
90+
uv pip install "flash-attn==2.7.4.post1" --no-build-isolation
8491
```
8592

86-
> **Note**
87-
> If your machine has less than 96GB of RAM and many CPU cores, reduce the `MAX_JOBS` arguments, e.g. `MAX_JOBS=4 pip install flash-attn --no-build-isolation`
88-
8993
Next, log into your Hugging Face account as follows:
9094

9195
```shell
@@ -106,7 +110,6 @@ You can now check out the `scripts` and `recipes` directories for instructions o
106110
├── LICENSE
107111
├── Makefile <- Makefile with commands like `make style`
108112
├── README.md <- The top-level README for developers using this project
109-
├── chapters <- Educational content to render on hf.co/learn
110113
├── recipes <- Recipe configs, accelerate configs, slurm scripts
111114
├── scripts <- Scripts to train and evaluate chat models
112115
├── setup.cfg <- Installation config (mostly used for configuring code quality & tests)
@@ -121,10 +124,10 @@ If you find the content of this repo useful in your work, please cite it as foll
121124

122125
```bibtex
123126
@software{Tunstall_The_Alignment_Handbook,
124-
author = {Tunstall, Lewis and Beeching, Edward and Lambert, Nathan and Rajani, Nazneen and Huang, Shengyi and Rasul, Kashif and Bartolome, Alvaro and M. Rush, Alexander and Wolf, Thomas},
127+
author = {Tunstall, Lewis and Beeching, Edward and Lambert, Nathan and Rajani, Nazneen and Huang, Shengyi and Rasul, Kashif and Bartolome, Alvaro, and Patiño, M. Carlos and M. Rush, Alexander and Wolf, Thomas},
125128
license = {Apache-2.0},
126129
title = {{The Alignment Handbook}},
127130
url = {https://github.com/huggingface/alignment-handbook},
128-
version = {0.3.0.dev0}
131+
version = {0.4.0.dev0}
129132
}
130133
```

chapters/en/_toctree.yml

Lines changed: 0 additions & 4 deletions
This file was deleted.

chapters/en/chapter0/introduction.mdx

Lines changed: 0 additions & 3 deletions
This file was deleted.

recipes/accelerate_configs/fsdp_qlora.yaml

Lines changed: 0 additions & 25 deletions
This file was deleted.

0 commit comments

Comments
 (0)