Skip to content

test(pp): add qwen3_5_moe PP and EP parity tests [3/4] - #3649

Open
athitten wants to merge 1 commit into
mainfrom
athitten/test/parallelism-qwen3-5-moe
Open

test(pp): add qwen3_5_moe PP and EP parity tests [3/4]#3649
athitten wants to merge 1 commit into
mainfrom
athitten/test/parallelism-qwen3-5-moe

Conversation

@athitten

@athitten athitten commented Aug 24, 2026

Copy link
Copy Markdown
Contributor

What

Two parity tests for Qwen3.5-MoE, plus the small config they run.

File What it does
L2_Parallelism_Qwen3_5MoE_PP2_Parity.sh Trains a tiny Qwen3.5-MoE twice — once on 1 GPU, once split over 2 with pipeline parallelism — and fails if the loss or gradient-norm curves drift apart.
L2_Parallelism_Qwen3_5MoE_EP2_Parity.sh Same for expert parallelism: 2 GPUs both times, once with all 8 experts on each rank, once with 4 per rank.
qwen3_5_moe_proxy.yaml A shrunk qwen3_5_35b_neat_packing.yaml (6 layers, 8 experts).

Why

Qwen3.5-MoE recipes ship pp_size 2–8 and ep_size 4–32. Nothing checked that splitting the pipeline or sharding the experts leaves the numbers unchanged. CP is already covered by the tests under tests/functional_tests/context_parallel/.

Nothing to stage

The shipped recipes are VLM, and there is no Qwen3.5 processor in TEST_DATA_DIR. So the proxy uses the text-only Qwen3_5MoeForCausalLM and generates its own tokens — no processor, no dataset, no tokenizer. Expert routing, expert sharding and the pipeline split all live in the text part, so they are covered. The vision tower is not.

Measured

Test Bounds Worst seen
PP2 loss 0.10, grad-norm 20% 0.034, 0.08%
EP2 loss 0.02, grad-norm 5% 0.00015, 0%

EP is tighter because both its runs are 2-rank and wrapped the same way, so only expert sharding differs. The PP baseline runs on 1 rank without FSDP, and that difference — not pipeline parallelism — is what widens its numbers.

🤖 Generated with Claude Code

@copy-pr-bot

copy-pr-bot Bot commented Aug 24, 2026

Copy link
Copy Markdown

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

@athitten

Copy link
Copy Markdown
Contributor Author

/ok to test dfa6927

@athitten
athitten force-pushed the athitten/test/parallelism-qwen3-5-moe branch from dfa6927 to 36e9b10 Compare August 27, 2026 17:03
@athitten athitten changed the title test(ep): add qwen3_5_moe expert-parallel parity test [3/4] test(pp): add qwen3_5_moe PP and EP parity tests [3/4] Aug 27, 2026
Qwen3.5-MoE recipes ship pp_size 2-8 and ep_size 4-32, and nothing checked that
splitting the pipeline or sharding the experts leaves the numbers unchanged.

Adds a small proxy config plus two tests that run it twice and compare the loss
and gradient-norm curves: PP2 against a single-rank baseline, and EP2 against a
2-rank data-parallel run.

The shipped recipes are VLM, but no Qwen3.5 processor is staged in CI, so the
proxy uses the text-only Qwen3_5MoeForCausalLM and generates its own tokens.
Nothing has to be staged to run these.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Signed-off-by: Abhishree <abhishreetm@gmail.com>
@athitten
athitten force-pushed the athitten/test/parallelism-qwen3-5-moe branch from 36e9b10 to e5042f1 Compare August 27, 2026 17:37
@athitten

Copy link
Copy Markdown
Contributor Author

/ok to test e5042f1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant