You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/tutorials/sft.md
+3-5Lines changed: 3 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -20,7 +20,7 @@ Supervised fine-tuning (SFT) is a process where a pre-trained large language mod
20
20
This tutorial demonstrates step-by-step instructions for setting up the environment and then training the Llama3.1 8B model on the [HuggingFaceH4/ultrachat_200k](https://huggingface.co/datasets/HuggingFaceH4/ultrachat_200k) dataset using SFT. If you wish to use a different dataset, you can [update the dataset configurations](https://github.com/AI-Hypercomputer/maxtext/blob/main/MaxText/configs/sft.yml).
21
21
22
22
We use [Tunix](https://github.com/google/tunix), a JAX-based library designed for post-training tasks, to perform SFT.
23
-
23
+
24
24
In this tutorial we use a single host TPU VM such as `v6e-8/v5p-8`. Let's get started!
25
25
26
26
## Setup virtual environment
@@ -44,18 +44,17 @@ bash setup.sh
44
44
45
45
## Run SFT
46
46
There are two scenarios supported for running SFT:
47
-
1.**Run SFT on Hugging Face checkpoint**
47
+
1.**Run SFT on Hugging Face checkpoint**
48
48
Download the checkpoint directly from Hugging Face and fine-tune it using SFT.
49
49
50
-
2.**Run SFT on MaxText checkpoint**
50
+
2.**Run SFT on MaxText checkpoint**
51
51
Use a checkpoint generated by MaxText and fine-tune it using SFT.
52
52
53
53
Choose the scenario that matches your workflow and follow the corresponding instructions below.
54
54
55
55
### Run SFT on Hugging Face checkpoint
56
56
* The script will first convert a Hugging Face checkpoint to a MaxText checkpoint.
57
57
* It then runs SFT on this converted checkpoint.
58
-
* After fine-tuning, the script converts the resulting checkpoint back to the Hugging Face format.
0 commit comments