fix(e2e): Fix dataset path for multimodal SFT, RL parallelism, and LLaMA to_hf settings - #4941
fix(e2e): Fix dataset path for multimodal SFT, RL parallelism, and LLaMA to_hf settings#4941RexBearIU wants to merge 13 commits into
Conversation
There was a problem hiding this comment.
Code Review
This pull request updates several end-to-end TPU test scripts (Gemma 3, Gemma 4, and LLaMA 3.1) to adjust configurations, parallelism settings, batch sizes, and cleanup steps. Key feedback includes a recommendation to guard a recursive gcloud storage rm command in test_gemma3_multimodal_sft.sh to prevent accidental deletion of parent directories if ${run_id} is empty, and the removal of an unused vllm_additional_config parameter in test_gemma4_rl.sh.
| skip_jax_distributed_system=True | ||
|
|
||
| # Step 3: Run SFT on the MaxText checkpoint on ChartQA dataset | ||
| gcloud storage rm --recursive ${BASE_OUTPUT_DIRECTORY}/multimodal/sft/${run_id} || true |
There was a problem hiding this comment.
Running gcloud storage rm --recursive on a path that could potentially have an empty ${run_id} is dangerous, as it could result in the accidental deletion of the entire parent directory (${BASE_OUTPUT_DIRECTORY}/multimodal/sft/). It is highly recommended to guard this command with a check ensuring ${run_id} is non-empty.
| gcloud storage rm --recursive ${BASE_OUTPUT_DIRECTORY}/multimodal/sft/${run_id} || true | |
| if [ -n "${run_id}" ]; then gcloud storage rm --recursive ${BASE_OUTPUT_DIRECTORY}/multimodal/sft/${run_id} || true; fi |
| vllm_hf_overrides='{architectures: ["MaxTextForCausalLM"]}' \ | ||
| hbm_utilization_vllm=0.85 \ | ||
| vllm_additional_config='{"maxtext_config": {"model_name": "gemma4-26b", "log_config": "false", "prefuse_moe_weights": "true"}}' \ |
There was a problem hiding this comment.
The vllm_additional_config parameter is passed to vllm_decode.py here, but vllm_decode.py does not actually parse or use config.vllm_additional_config in either decode_with_vllm or decode_with_tunix. Passing this parameter is a no-op and should be removed to avoid confusion.
| vllm_hf_overrides='{architectures: ["MaxTextForCausalLM"]}' \ | |
| hbm_utilization_vllm=0.85 \ | |
| vllm_additional_config='{"maxtext_config": {"model_name": "gemma4-26b", "log_config": "false", "prefuse_moe_weights": "true"}}' \ | |
| vllm_hf_overrides='{architectures: ["MaxTextForCausalLM"]}' \ |
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
…and llama3.1 to_hf settings
7b4b03b to
437f71d
Compare
…face to prevent memory spike
…est_llama3.1_70b_to_hf.sh
…event thread concurrency memory spikes
Description
Fixes end-to-end TPU post-training test suite configurations:
Gemma-3-4B Multimodal SFT (
tests/end_to_end/tpu/gemma3/4b/test_gemma3_multimodal_sft.sh):export DATASET_PATH=${DATASET_PATH:-gs://maxtext-dataset}to point directly to GCS ChartQA parquet shards matchingtest_qwen3_multimodal_sft.sh.Gemma-4-26B RL (
tests/end_to_end/tpu/gemma4/26b/test_gemma4_rl.sh):ici_tensor_parallelism=4 ici_expert_parallelism=2andhbm_utilization_vllm=0.6for MoE sharding.train_micro_batch_size=4 rollout_micro_batch_size=8 ici_expert_parallelism=8 rollout_tensor_parallelism=4to fit the 8 trainer / 8 sampler device partition onv5p-32.vllm_additional_configto pass model name during Step 3 checkpoint decode.LLaMA-3.1-70B to HuggingFace (
tests/end_to_end/tpu/llama3.1/70b/test_llama3.1_70b_to_hf.sh):checkpoint_storage_concurrent_gb=80and--parallel_threads=1to optimize host RAM overhead during shard writing.Tests
test_gemma3_multimodal_sft.shon TPU v5p-8.test_gemma4_rl.shon TPU v5p-32.test_llama3.1_70b_to_hf.shSafeTensors unrolling on TPU v5p-8.Checklist
codespell,pylint,pyink).