File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -31,7 +31,8 @@ export MODEL_NAME=${MODEL}-${MODEL_VARIATION}
3131# After downloading checkpoints, copy them to GCS bucket at $CHKPT_BUCKET \
3232# Please use seperate GCS paths for uploading open source model weights ($CHKPT_BUCKET) and MaxText compatible weights ($MODEL_BUCKET).
3333# Point these variables to a GCS bucket that you created.
34- export CHKPT_BUCKET=gs://${USER} -maxtext/chkpt/${MODEL} /${MODEL_VARIATION}
34+ # An example of CHKPT_BUCKET could be: gs://${USER}-maxtext/chkpt/${MODEL}/${MODEL_VARIATION}
35+ export CHKPT_BUCKET=$3
3536export MODEL_BUCKET=gs://${USER} -maxtext
3637
3738# Point `BASE_OUTPUT_DIRECTORY` to a GCS bucket that you created, this bucket will store all the files generated by MaxText during a run.
@@ -47,11 +48,6 @@ gcloud storage buckets create ${MODEL_BUCKET} --location=${BUCKET_LOCATION} || t
4748gcloud storage buckets create ${BASE_OUTPUT_DIRECTORY} --location=${BUCKET_LOCATION} || true
4849gcloud storage buckets create ${DATASET_PATH} --location=${BUCKET_LOCATION} || true
4950
50- # Copy the downloaded checkpoints to `CHKPT_BUCKET`.
51- # Gemma example: gsutil -m cp -r 7b ${CHKPT_BUCKET}
52- # Llama2 example: gsutil -m cp -r llama-2-7b ${CHKPT_BUCKET}
53- sudo gsutil -m cp -r $3 ${CHKPT_BUCKET}
54-
5551# Covert model checkpoints to MaxText compatible checkpoints.
5652if [ " $MODEL " == " gemma" ]; then
5753 CONVERT_CKPT_SCRIPT=" convert_gemma_chkpt.py"
Original file line number Diff line number Diff line change @@ -31,7 +31,8 @@ export MODEL_NAME=${MODEL}-${MODEL_VARIATION}
3131# After downloading checkpoints, copy them to GCS bucket at $CHKPT_BUCKET \
3232# Please use seperate GCS paths for uploading open source model weights ($CHKPT_BUCKET) and MaxText compatible weights ($MODEL_BUCKET).
3333# Point these variables to a GCS bucket that you created.
34- export CHKPT_BUCKET=gs://${USER} -maxtext/chkpt/${MODEL} /${MODEL_VARIATION}
34+ # An example of CHKPT_BUCKET could be: gs://${USER}-maxtext/chkpt/${MODEL}/${MODEL_VARIATION}
35+ export CHKPT_BUCKET=$3
3536export MODEL_BUCKET=gs://${USER} -maxtext
3637
3738# Point `BASE_OUTPUT_DIRECTORY` to a GCS bucket that you created, this bucket will store all the files generated by MaxText during a run.
@@ -41,7 +42,7 @@ export BASE_OUTPUT_DIRECTORY=gs://${USER}-runner-maxtext-logs
4142export DATASET_PATH=gs://${USER} -maxtext-dataset
4243
4344# Prepare C4 dataset for fine tuning: https://github.com/allenai/allennlp/discussions/5056
44- sudo gsutil -u $3 -m cp ' gs://allennlp-tensorflow-datasets/c4/en/3.0.1/*' ${DATASET_PATH} /c4/en/3.0.1/
45+ sudo gsutil -u $4 -m cp ' gs://allennlp-tensorflow-datasets/c4/en/3.0.1/*' ${DATASET_PATH} /c4/en/3.0.1/
4546
4647# We define `CONVERTED_CHECKPOINT` to refer to the checkpoint subdirectory.
4748export CONVERTED_CHECKPOINT=${MODEL_BUCKET} /${MODEL} /${MODEL_VARIATION} /${idx} /0/items
You can’t perform that action at this time.
0 commit comments