Skip to content

Commit cf9b093

Browse files
Merge pull request #4212 from huytransformer:htn/clarify-rl-checkpoint-env
PiperOrigin-RevId: 937063667
2 parents f535e70 + 0dee250 commit cf9b093

1 file changed

Lines changed: 5 additions & 6 deletions

File tree

  • docs/tutorials/posttraining

docs/tutorials/posttraining/rl.md

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ placeholders with your actual values.
6363
```bash
6464
# -- Model configuration --
6565
# The MaxText model name. See `src/maxtext/configs/types.py` for `ModelName` for a
66-
# full list of supported models.
66+
# full list of supported models. This value is case-sensitive.
6767
export MODEL=<MODEL_NAME> # e.g. 'llama3.1-8b-Instruct'
6868

6969
# -- MaxText configuration --
@@ -78,15 +78,14 @@ export BASE_OUTPUT_DIRECTORY=<GCS_BUCKET> # e.g., gs://my-bucket/maxtext-runs
7878
# Note: Kubernetes requires workload names to be valid DNS labels (lowercase, no underscores or periods).
7979
export RUN_NAME=<RUN_NAME>
8080

81-
# Number of accelerator chips per VM.
82-
# - TPU v5e (single host): 8
83-
# - TPU v5p (single host): 4
84-
# - TPU v6e (single host): 8
81+
# Number of accelerator chips per VM. For example, use 8 for a v5p-8 VM.
8582
export CHIPS_PER_VM=<CHIPS_PER_VM>
8683
```
8784

8885
## Get your model checkpoint
8986

87+
This section explains how to prepare your model checkpoint for use with MaxText. It sets `MAXTEXT_CKPT_PATH`, which is passed to `load_parameters_path` in the training command below.
88+
9089
### Option 1: Using an existing MaxText checkpoint
9190

9291
If you already have a MaxText-compatible model checkpoint, simply set the
@@ -98,7 +97,7 @@ export MAXTEXT_CKPT_PATH=<CKPT_PATH> # e.g., gs://my-bucket/my-model-checkpoint/
9897

9998
### Option 2: Converting from a Hugging Face checkpoint
10099

101-
Refer the steps in [Hugging Face to MaxText](hf-to-maxtext) to convert a hugging face checkpoint to MaxText. Make sure you have correct checkpoint files converted and saved. Similar to Option 1, set the following environment variable and move on to the next section.
100+
Refer to [Hugging Face to MaxText](hf-to-maxtext) to convert a Hugging Face checkpoint to MaxText format. After conversion finishes, set `MAXTEXT_CKPT_PATH` to the converted MaxText checkpoint path.
102101

103102
```bash
104103
export MAXTEXT_CKPT_PATH=<CKPT_PATH> # e.g., gs://my-bucket/my-model-checkpoint/0/items

0 commit comments

Comments
 (0)