[ci] feat: add GRPO Qwen3.5-35B Megatron vLLM nightly test for Ascend#6973
[ci] feat: add GRPO Qwen3.5-35B Megatron vLLM nightly test for Ascend#6973chengminhua wants to merge 1 commit into
Conversation
There was a problem hiding this comment.
Code Review
This pull request introduces a new bash script run_grpo_qwen3_5_35b_megatron_npu.sh to run GRPO training with Qwen3.5-35B using Megatron on NPU. Feedback highlights two critical issues: first, the expert model parallel size (EP=8) is invalid for the calculated data parallel size (DP=4), which will trigger an assertion error; second, hardcoding /root as the log directory can lead to permission issues in non-root environments.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
| TP=${TP:-2} | ||
| PP=${PP:-2} | ||
| CP=${CP:-1} | ||
| EP=${EP:-8} |
There was a problem hiding this comment.
With n_devices_per_node=16 and trainer.nnodes=1, the total number of GPUs is 16. Given TP=2, PP=2, and CP=1, the data parallel size (DP) is calculated as:
DP = world_size / (TP * PP * CP) = 16 / (2 * 2 * 1) = 4.
In Megatron Core, the expert model parallel size (EP) must divide the data parallel size (DP). Since DP = 4, setting EP = 8 is invalid because 4 is not divisible by 8 (and EP cannot exceed DP). This will cause an assertion error at startup:
AssertionError: data_parallel_size (4) must be divisible by expert_model_parallel_size (8).
To fix this, EP should be set to 4 or less.
| EP=${EP:-8} | |
| EP=${EP:-4} |
| EXPERIMENT_NAME=${EXPERIMENT_NAME:-GRPO-Qwen3.5-35B-Megatron} | ||
|
|
||
| SCRIPT_NAME="$(basename -- "${BASH_SOURCE[0]}" .sh)" | ||
| LOG_DIR=/root/.cache/nightly_log/$SCRIPT_NAME |
There was a problem hiding this comment.
Hardcoding /root as the log directory can cause permission denied errors if the script is run in a non-root environment (e.g., standard CI runners or local development environments). It is safer and more consistent with MODEL_PATH (on line 6) to use ${HOME} instead.
| LOG_DIR=/root/.cache/nightly_log/$SCRIPT_NAME | |
| LOG_DIR=${HOME}/.cache/nightly_log/$SCRIPT_NAME |
What does this PR do?
Add a new nightly CI workflow for GRPO Qwen3.5-35B Megatron training on Ascend using the vLLM rollout backend.
Checklist Before Starting
[{modules}] {type}: {description}(This will be checked by the CI){modules}includefsdp,megatron,veomni,sglang,vllm,rollout,trainer,ci,training_utils,recipe,hardware,deployment,ray,worker,single_controller,misc,perf,model,algo,env,tool,ckpt,doc,data,cfg,reward,fully_async,one_step_off,like[megatron, fsdp, doc]{type}is infeat,fix,refactor,chore,test[BREAKING]to the beginning of the title.[BREAKING][fsdp, megatron] feat: dynamic batchingTest
API and Usage Example
# Add code snippet or script demonstrating how to use thisDesign & Code Changes
Checklist Before Submitting
Important
Please check all the following items before requesting a review, otherwise the reviewer might deprioritize this PR for review.
pre-commit install && pre-commit run --all-files --show-diff-on-failure --color=alwaysci-requestchannel in theverlSlack workspace. (If not accessible, please try the Feishu group (飞书群).)recipesubmodule, please also update the reference to the submodule commit viagit submodule update --remoteorcd recipe && git pull origin main.