Skip to content

[megatron, ckpt] feat: add Qwen3.5 Megatron-FSDP SFT example#6352

Draft
conver334 wants to merge 6 commits into
verl-project:mainfrom
conver334:add-qwen35-mfsdp-sft-example-upstream-main
Draft

[megatron, ckpt] feat: add Qwen3.5 Megatron-FSDP SFT example#6352
conver334 wants to merge 6 commits into
verl-project:mainfrom
conver334:add-qwen35-mfsdp-sft-example-upstream-main

Conversation

@conver334

@conver334 conver334 commented May 14, 2026

Copy link
Copy Markdown
Contributor

What does this PR do?

Adds a GSM8K SFT example for Qwen3.5-35B-A3B with Megatron-FSDP on 32 GPUs.

The example documents the required latest Megatron-Bridge, Megatron-LM dev branch, and runtime Python package dependencies.

The required Megatron-FSDP support has already been merged into Megatron-LM dev branch (NVIDIA/Megatron-LM#4799) and Megatron-Bridge main (NVIDIA-NeMo/Megatron-Bridge#3746)

Checklist Before Starting

Design & Code Changes

  • Add examples/sft/gsm8k/run_qwen3_5_35b_mfsdp.sh.

Checklist Before Submitting

  • Read the Contribute Guide.
  • Applied pre-commit checks to the changed files and commit hook passed.
  • Added an example script under examples/sft/gsm8k.
  • Add unit or end-to-end test(s) to CI. Not feasible for this PR because the example requires 32 GPUs plus external Megatron-Bridge
    and Megatron-LM changes.
  • Request CI when ready.
  • Not related to the recipe submodule.

@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 shell script for running Qwen3.5-35B-A3B SFT using Megatron-FSDP on 32 GPUs, providing a comprehensive configuration for distributed training. Additionally, it updates the Megatron checkpoint manager to use default=str in json.dump when saving transformer configurations, ensuring that non-serializable objects do not cause errors during checkpointing. I have no feedback to provide.

Signed-off-by: conver334 <conver334@gmail.com>
@conver334 conver334 force-pushed the add-qwen35-mfsdp-sft-example-upstream-main branch from a35091e to 056baa3 Compare May 14, 2026 13:28
conver334 added 2 commits May 14, 2026 07:40
Signed-off-by: conver334 <conver334@gmail.com>
Set data.use_dynamic_bsz=True together with engine.use_remove_padding=True and model.use_remove_padding=True so the 32-GPU Qwen3.5 Megatron-FSDP SFT example runs in THD mode by default.

Signed-off-by: conver334 <conver334@gmail.com>
@conver334 conver334 force-pushed the add-qwen35-mfsdp-sft-example-upstream-main branch from 6deee1e to 838b782 Compare May 14, 2026 15:36
@conver334 conver334 marked this pull request as draft May 15, 2026 01:50
@ISEEKYAN ISEEKYAN changed the title [megatron, fsdp, ckpt] feat: add Qwen3.5 Megatron-FSDP SFT example [megatron, ckpt] feat: add Qwen3.5 Megatron-FSDP SFT example May 18, 2026
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