1717set -ex
1818
1919run_id=${1:- $(date +% Y-% m-% d-% H-% M-% S)}
20+ use_pathways=${2:- false}
2021MODEL_NAME=' gemma3-4b'
2122
2223# Non-Googlers please remember to point `BASE_OUTPUT_DIRECTORY` to the GCS paths where you have the scanned and unscanned checkpoints stored
@@ -31,15 +32,15 @@ python3 -m maxtext.inference.vllm_decode \
3132 vllm_hf_overrides=' {architectures: ["MaxTextForCausalLM"]}' \
3233 hbm_utilization_vllm=0.5 \
3334 prompt=' Suggest some famous landmarks in London.' \
34- use_chat_template=True scan_layers=false
35+ use_chat_template=True scan_layers=false enable_single_controller= ${use_pathways}
3536
3637# Step 2: Run RL on the converted checkpoint
3738python3 -m maxtext.trainers.post_train.rl.train_rl \
3839 base_output_directory=${BASE_OUTPUT_DIRECTORY} /rl \
3940 load_parameters_path=${SCANNED_CKPT_PATH} \
4041 run_name=${run_id} rl.loss_algo=' grpo' scan_layers=true \
4142 num_batches=5 batch_size=1 num_test_batches=5 \
42- model_name=${MODEL_NAME} enable_single_controller=True \
43+ model_name=${MODEL_NAME} enable_single_controller=${use_pathways} \
4344 checkpoint_storage_use_zarr3=False checkpoint_storage_use_ocdbt=False \
4445 rollout_tensor_parallelism=1 \
4546 vllm_hf_overrides=' {architectures: ["MaxTextForCausalLM"]}' \
@@ -53,5 +54,4 @@ python3 -m maxtext.inference.vllm_decode \
5354 vllm_hf_overrides=' {architectures: ["MaxTextForCausalLM"]}' \
5455 hbm_utilization_vllm=0.5 \
5556 prompt=' Suggest some famous landmarks in London.' \
56- use_chat_template=True scan_layers=true
57-
57+ use_chat_template=True scan_layers=true enable_single_controller=${use_pathways}
0 commit comments