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
Use the `to_huggingface.py` script to convert a MaxText checkpoint into the Hugging Face format. This is useful for sharing your models or integrating them with the Hugging Face ecosystem.
MaxText provides examples to work with [Common Crawl](https://commoncrawl.org/). The dataset is available in TFRecords format in a cloud bucket. MaxText provides scripts to copy the dataset to a Google Cloud Storage Bucket.
@@ -118,17 +106,35 @@ The above will download the c4 dataset to the GCS BUCKET.
118
106
119
107
## Sample Full Fine tuning script
120
108
121
-
Below is a sample training script for LLama2-7b on v6e-8 TPU VM.
109
+
Below is a sample training script with an existing MaxText checkpoint (Option 1: Using an existing MaxText checkpoint).
122
110
123
111
```sh
124
112
python3 -m MaxText.train \
125
113
src/MaxText/configs/base.yml \
126
-
run_name="llama2-finetune-maxtext" \
114
+
run_name=${RUN_NAME} \
127
115
base_output_directory=${BASE_OUTPUT_DIRECTORY} \
128
116
load_parameters_path=${MODEL_CKPT_PATH} \
129
-
model_name='llama2-7b' \
117
+
model_name=${MODEL_NAME} \
130
118
dataset_path=${DATASET_GCS_BUCKET} \
131
119
async_checkpointing=False \
120
+
tokenizer_path=${MODEL_TOKENIZER} \
121
+
hf_access_token=${HF_TOKEN} \
122
+
steps=10 per_device_batch_size=1
123
+
```
124
+
125
+
Below is a sample training script with a converted a Hugging Face checkpoint (Option 2: Converting a Hugging Face checkpoint).
0 commit comments