Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion src/megatron/bridge/models/conversion/auto_bridge.py
Original file line number Diff line number Diff line change
Expand Up @@ -835,7 +835,12 @@ def export_ckpt(
# Export ckpt performs on CPU
with temporary_distributed_context(backend="gloo"):
# Load the Megatron model
megatron_model = self.load_megatron_model(megatron_path, wrap_with_ddp=False)
# 'flex' dispatcher requires TPxEP > 1; fall back to 'alltoall'
megatron_model = self.load_megatron_model(
megatron_path,
wrap_with_ddp=False,
mp_overrides={"moe_token_dispatcher_type": "alltoall"},
)

# Save in HuggingFace format
self.save_hf_pretrained(
Expand Down