transformers
f2e79153 - Pick the expert-parallel strategy from `DistributedConfig.ep_strategy`

Commit
10 days ago
Pick the expert-parallel strategy from `DistributedConfig.ep_strategy` `ep_dispatch_experts` resolves at load to a registered experts style, `ep_<strategy>_experts`. Left as `None`, `ep_strategy` masks when the EP group shares one batch (`ep_size == tp_size`), where masking is the faster, and dispatches tokens otherwise; `"masked"` and `"dispatch"` force one, and any `EpDispatchExpertsParallel` style registered in `ALL_PARALLEL_STYLES` (such as a DeepEP one) is selected by its name. Masking without a shared batch is refused before anything is sharded. The mixin and FSDP treat every `EpDispatchExpertsParallel` style as token dispatch, so a registered one gets the same meshes and expert FSDP wrapping. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Parents
Loading