Skip to content

[ci] feat: add GRPO Qwen3.5-35B Megatron vLLM nightly test for Ascend#6973

Open
chengminhua wants to merge 1 commit into
verl-project:mainfrom
chengminhua:add_qwen3_5_35b_ci
Open

[ci] feat: add GRPO Qwen3.5-35B Megatron vLLM nightly test for Ascend#6973
chengminhua wants to merge 1 commit into
verl-project:mainfrom
chengminhua:add_qwen3_5_35b_ci

Conversation

@chengminhua

@chengminhua chengminhua commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

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

  • Search for similar PRs. Paste at least one query link here: ...
  • Format the PR title as [{modules}] {type}: {description} (This will be checked by the CI)
    • {modules} include fsdp, 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
    • If this PR involves multiple modules, separate them with , like [megatron, fsdp, doc]
    • {type} is in feat, fix, refactor, chore, test
    • If this PR breaks any API (CLI arguments, config, function signature, etc.), add [BREAKING] to the beginning of the title.
    • Example: [BREAKING][fsdp, megatron] feat: dynamic batching

Test

For changes that can not be tested by CI (e.g., algorithm implementation, new model support), validate by experiment(s) and show results like training curve plots, evaluation results, etc.

API and Usage Example

Demonstrate how the API changes if any, and provide usage example(s) if possible.

# Add code snippet or script demonstrating how to use this

Design & Code Changes

Demonstrate the high-level design if this PR is complex, and list the specific changes.

Checklist Before Submitting

Important

Please check all the following items before requesting a review, otherwise the reviewer might deprioritize this PR for review.

@chengminhua chengminhua changed the title add new npu nightly script [ci] feat: add GRPO Qwen3.5-35B Megatron vLLM nightly test for Ascend Jul 8, 2026

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

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.

Suggested change
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

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

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.

Suggested change
LOG_DIR=/root/.cache/nightly_log/$SCRIPT_NAME
LOG_DIR=${HOME}/.cache/nightly_log/$SCRIPT_NAME

@wucong25 wucong25 added the Ascend label Jul 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants