@@ -37,9 +37,17 @@ Use the `to_maxtext.py` script to convert a Hugging Face model checkpoint into a
3737
3838``` bash
3939# Setup environment variables
40+ # -- Model configuration --
41+ # The MaxText model name. See `src/maxtext/configs/types.py` for `ModelName` for a
42+ # full list of supported models.
4043export MODEL=< HF_MODEL> # e.g. 'llama3.1-8b-Instruct'
44+
45+ # -- MaxText configuration --
46+ # The directory where the converted Orbax checkpoint will be stored (GCS bucket or local directory).
4147export BASE_OUTPUT_DIRECTORY=< CKPT_PATH> # e.g., gs://my-bucket/my-checkpoint-directory
42- export USE_PATHWAYS=0 # Set to 1 if you intend to use Pathways for training, 0 for McJAX
48+
49+ # Set to 1 if you intend to use Pathways for training, 0 for McJAX.
50+ export USE_PATHWAYS=0
4351```
4452
4553### Run Conversion
@@ -84,8 +92,17 @@ Use the `to_huggingface.py` script to convert a MaxText checkpoint into the Hugg
8492
8593``` bash
8694# Setup environment variables
95+ # -- Model configuration --
96+ # The MaxText model name. See `src/maxtext/configs/types.py` for `ModelName` for a
97+ # full list of supported models.
8798export MODEL=< MODEL_NAME> # e.g. 'qwen3-4b'
99+
100+ # The path to the MaxText compatible model checkpoint (Orbax format).
88101export MAXTEXT_CKPT_PATH=< CKPT_PATH> # e.g., gs://my-bucket/my-model-checkpoint/0/items
102+
103+ # -- MaxText configuration --
104+ # The directory where the converted Hugging Face checkpoint will be stored (GCS bucket,
105+ # local directory, or Hugging Face Hub path).
89106export BASE_OUTPUT_DIRECTORY=< HF_CKPT_PATH> # e.g., gs://my-bucket/my-checkpoint-directory
90107```
91108
@@ -125,8 +142,15 @@ To ensure the conversion was successful, you can use the [test script](https://g
125142
126143``` bash
127144# Setup environment variables
145+ # -- Model configuration --
146+ # The MaxText model name. See `src/maxtext/configs/types.py` for `ModelName` for a
147+ # full list of supported models.
128148export MODEL=< MODEL_NAME> # e.g. 'qwen3-4b'
149+
150+ # The path to the MaxText compatible model checkpoint (Orbax format).
129151export MAXTEXT_CKPT_PATH=< CKPT_PATH> # e.g., gs://my-bucket/my-model-checkpoint/0/items
152+
153+ # The path to the Hugging Face model checkpoint directory.
130154export HF_CKPT_PATH=< HF_CKPT_PATH> # e.g., gs://my-bucket/my-checkpoint-directory
131155
132156# Install PyTorch (in MaxText virtual environment)
0 commit comments