Add MoE expert parallel training runtime#26
Merged
Conversation
Collaborator
Author
|
Tested on DP4, EP2 packed 32k sequences on 1 node and multinode DP4, EP4 packed 32k sequences |
Collaborator
Author
|
Currently rebasing on new GRPO main |
alay2shah
force-pushed
the
feature/expert-parallelism
branch
from
May 29, 2026 17:45
523bd13 to
fb0291a
Compare
alay2shah
marked this pull request as ready for review
May 29, 2026 22:35
EdoardoMosca
approved these changes
Jun 9, 2026
EdoardoMosca
left a comment
Collaborator
There was a problem hiding this comment.
Apologies for the delay, partially my fault that now you have merging conflict with main
The branch feels very clean and nicely structured
🟢 formatting and linting are good
🟢 ran non-GPU tests
given the PR size I tackled it with codex but everything it found are things that don't worry me
nit: manual_sharded_checkpoint_format was being removed from the Trainer/DPOConfig kwargs before validation ran, so invalid values were not caught. I applied a small fix. You can revert if you feel I'm being overconcerned
Pass the raw manual_sharded_checkpoint_format into MoE manual-sharded training validation before filtering Trainer args, so invalid values fail during setup instead of at checkpoint save time.
alay2shah
force-pushed
the
feature/expert-parallelism
branch
from
June 9, 2026 18:27
8747ba0 to
f178b7b
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR adds first-class MoE training support with an expert-parallel runtime, manual sharded checkpoint export, and a cleaned-up package structure rebased onto the current GRPO mainline.
Major changes:
data_loading,training,checkpointing,distribution,config,cli, andrl.training/, rollout/reward/env helpers underrl/, and user reward examples under repo-rootrewards/.Validation
uv run ruff check src testsuv run ruff format --check src testsuv run pre-commit run --all-filesuv run pytest tests/test_config_parsing.py tests/test_grpo_config.py tests/test_grpo_data.py tests/test_rewards_loader.py tests/test_vllm_server.py tests/test_rl_env_adapter.py tests/test_load_models.py tests/test_ray_cluster_support.py tests/test_training_configs.py tests/test_moe_ep_runtime.py tests/test_moe_losses.py tests/test_moe_trainers.py tests/test_sft_loss_masks.py tests/test_trainer_mixins.py->323 passed, 5 warnings in 52.33sNotes
The GPU e2e tests remain marked/skipped in local CPU-style test runs. Recent Slurm validation runs covered the DP4/EP2 and DP4/EP4 save paths before this final cleanup pass.