[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M71NVKTN4RA2X8F9XVCYMRY4":3,"skill-same:01M71NVKTN4RA2X8F9XVCYMRY4":90},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":39,"linkOnly":40,"markdownContent":41,"markdownBody":42,"frontMatter":43,"refName":45,"commitSha":46,"skillDirectory":47,"forksCount":14,"repositoryHtmlUrl":48,"repositoryHomepageUrl":49,"ownerHtmlUrl":50,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":51,"install":52,"resources":65},"01M71NVKTN4RA2X8F9XVCYMRY4","nemo-mbridge-perf-expert-parallel-overlap",null,"Validate and use MoE expert-parallel communication overlap in Megatron-Bridge, including overlap_moe_expert_parallel_comm, delay_wgrad_compute, and flex dispatcher backends such as DeepEP and HybridEP.","pattanation\u002FNorvik","pattanation","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F235419268?v=4","01M71M5THHYYB15ME8R2E4FCZG","Patta","01M71M5TJM1NDM992M8PDKYR2K",0,"Apache-2.0","https:\u002F\u002Fgithub.com\u002Fpattanation\u002FNorvik\u002Fblob\u002Fclaude\u002Finstall-gsd-build-foQdV\u002F.agents\u002Fskills\u002Fnemo-mbridge-perf-expert-parallel-overlap\u002FSKILL.md",[],[19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38],"perf","NeMo","expert","nemo mbridge perf expert parallel overlap","parallel","validate","config","dispatch","dispatcher","communication","change","moe","compute","combine","use","regression","bridge","latency","megatron","as","2026-11-10 10:56:23",false,"---\nname: nemo-mbridge-perf-expert-parallel-overlap\ndescription: Validate and use MoE expert-parallel communication overlap in Megatron-Bridge, including overlap_moe_expert_parallel_comm, delay_wgrad_compute, and flex dispatcher backends such as DeepEP and HybridEP.\nlicense: Apache-2.0\nwhen_to_use: Enabling EP overlap to hide dispatch\u002Fcombine latency, or tracing a throughput regression to an EP overlap config change; 'overlap_moe_expert_parallel_comm', 'delay_wgrad_compute', 'flex dispatcher', 'DeepEP overlap', 'HybridEP overlap'.\n---\n\n# MoE Expert-Parallel Overlap Skill\n\n## References\n\n- Stable docs: @docs\u002Ftraining\u002Fcommunication-overlap.md\n- Structured metadata: @skills\u002Fnemo-mbridge-perf-expert-parallel-overlap\u002Fcard.yaml\n\n## What It Is\n\nExpert-parallel (EP) overlap hides the cost of token dispatch\u002Fcombine all-to-all\ncommunication by running it concurrently with expert FFN compute. Optionally,\ndelayed expert weight-gradient computation (`delay_wgrad_compute`) provides\nadditional overlap by deferring wgrad to overlap with the next layer's forward.\n\nBridge supports two dispatcher paths:\n\n| Dispatcher | Backend | When to use |\n|---|---|---|\n| `alltoall` | Standard MoE all-to-all | Default, broadest compatibility |\n| `flex` | DeepEP or HybridEP | Higher overlap on Ampere\u002FHopper\u002FBlackwell |\n\n## Quick Decision\n\nUse EP overlap when:\n\n- the model is MoE with `EP > 1`\n- expert dispatch\u002Fcombine communication is a meaningful part of step time\n- you have memory headroom and are tuning for throughput\n\nPrefer:\n\n- `alltoall` dispatcher for the first rollout (broader compatibility)\n- `flex` + DeepEP\u002FHybridEP when running on supported GPUs and seeking\n  additional gains\n\nAvoid EP overlap when:\n\n- full activation recompute is enabled\n- `moe_shared_expert_overlap` is enabled\n- the run is still being brought up for correctness\n- PyTorch \u003C 2.6.0\n\nExpected outcome:\n\n- if all-to-all dispatch is a clear profile bottleneck, overlap can produce a\n  modest to meaningful speedup\n- if the run is tiny, communication-light, or dominated by another wall, the\n  gain may be negligible\n\n## Correctness-First alltoall Benchmark\n\nFor the plain EP-overlap isolation benchmark, keep flex dispatch and delayed\nwgrad disabled. The measured shape was Qwen3 MoE 30B-A3B SFT on 16 H100 GPUs:\n`EP=16`, `alltoall`, BF16, global batch size 1024, CUDA graphs disabled,\n`moe_permute_fusion=false`, measured over iterations 3-8.\n\nUse these overrides for the plain-overlap case:\n\n```bash\n--cuda_graph_impl none \\\n--moe_flex_dispatcher_backend None \\\n--moe_a2a_overlap false \\\ncomm_overlap.overlap_moe_expert_parallel_comm=true \\\ncomm_overlap.delay_wgrad_compute=false \\\nmodel.moe_shared_expert_overlap=false\n```\n\nDo not use `--moe_a2a_overlap true` for this isolation test: the performance\nharness helper enables both `overlap_moe_expert_parallel_comm` and\n`delay_wgrad_compute`, so it does not isolate plain EP overlap.\n\nSteady-window timing from that benchmark:\n\n| Case | Steady mean | Relative |\n|---|---:|---:|\n| no EP overlap | 41.25s | 1.000x |\n| EP overlap | 31.31s | 1.317x |\n| EP overlap plus `delay_wgrad_compute` | 31.20s | 1.322x |\n\nThis is evidence for enabling plain EP overlap on this inter-node all-to-all\nshape. It does not show a meaningful independent win from delayed wgrad, and it\ndoes not validate fused MoE permutation because that path was disabled for the\nruntime stack.\n\n## Enablement\n\n### alltoall dispatcher\n\n```python\ncfg.comm_overlap.overlap_moe_expert_parallel_comm = True\ncfg.comm_overlap.delay_wgrad_compute = False\ncfg.model.moe_shared_expert_overlap = False\n\ncfg.model.expert_model_parallel_size = 8\ncfg.model.num_moe_experts = 64\ncfg.model.moe_token_dispatcher_type = \"alltoall\"\ncfg.model.bf16 = True\ncfg.model.fp16 = False\n```\n\nEnable `delay_wgrad_compute=True` only after the plain overlap path is known to\nwork and its extra compatibility constraints have been checked.\n\n### flex dispatcher (DeepEP or HybridEP)\n\n```python\nfrom megatron.bridge.training.flex_dispatcher_backend import apply_flex_dispatcher_backend\n\ncfg.comm_overlap.overlap_moe_expert_parallel_comm = True\ncfg.comm_overlap.delay_wgrad_compute = True\ncfg.model.moe_shared_expert_overlap = False\n\napply_flex_dispatcher_backend(cfg.model, moe_flex_dispatcher_backend=\"deepep\")\n# or: apply_flex_dispatcher_backend(cfg.model, moe_flex_dispatcher_backend=\"hybridep\")\n```\n\n## Compatibility And Constraints\n\n- `expert_model_parallel_size > 1`\n- `num_moe_experts > 1`\n- `moe_token_dispatcher_type` must be `\"alltoall\"` or `\"flex\"`\n- `moe_shared_expert_overlap = False`\n- Base precision is BF16 or FP16\n- PyTorch `>= 2.6.0`\n- If `PP > 1`, `virtual_pipeline_model_parallel_size` must be set\n- `recompute_granularity != \"full\"`, `recompute_method = None`,\n  `recompute_num_layers = None`\n- `mtp_num_layers` must be `None` or `1`\n- `delay_wgrad_compute` requires `overlap_moe_expert_parallel_comm` as a\n  prerequisite\n- `delay_wgrad_compute` with `overlap_grad_reduce` requires TE >= 2.7.0\n- `delay_wgrad_compute` with `gradient_accumulation_fusion` requires TE >= 2.7.0\n- CUDA graph `attn` scope + `delay_wgrad_compute` requires TE >= 2.12.0,\n  `gradient_accumulation_fusion = True`, and no attention bias\n- DeepEP: Ampere, Hopper, B200, B300 GPUs only\n- HybridEP: Ampere, Hopper, B200, B300, GB200\u002FGB300 with NVL72\n\n## Minimal Working Config\n\n```python\ncfg.comm_overlap.overlap_moe_expert_parallel_comm = True\ncfg.comm_overlap.delay_wgrad_compute = False\ncfg.model.expert_model_parallel_size = 4\ncfg.model.num_moe_experts = 64\ncfg.model.moe_token_dispatcher_type = \"alltoall\"\ncfg.model.moe_shared_expert_overlap = False\ncfg.model.bf16 = True\n```\n\nUse this as the correctness-first starting point. Add delayed wgrad, flex\ndispatch, and CUDA-graph interactions only after the plain overlap path is\nknown to work.\n\n## Minimal Runnable Command\n\nPerformance harness example inside a Slurm allocation. Keep the model,\nparallelism, dispatcher, and runtime fixed, and vary only the two overlap\noverrides:\n\n```bash\nuv run python scripts\u002Fperformance\u002Frun_script.py \\\n  -m qwen \\\n  -mr qwen3_30b_a3b \\\n  --task pretrain \\\n  -g h100 \\\n  -c bf16 \\\n  -ng 16 \\\n  -gn 8 \\\n  --max_steps 8 \\\n  --cuda_graph_impl none \\\n  --moe_flex_dispatcher_backend None \\\n  --moe_a2a_overlap false \\\n  --tokenizer_type NullTokenizer \\\n  comm_overlap.overlap_moe_expert_parallel_comm=true \\\n  comm_overlap.delay_wgrad_compute=false \\\n  model.moe_shared_expert_overlap=false\n```\n\nDo not use `--moe_a2a_overlap true` when separating plain EP overlap from\ndelayed wgrad: the performance harness helper enables both\n`overlap_moe_expert_parallel_comm` and `delay_wgrad_compute`.\n\nUnit test verification:\n\n```bash\nuv run python -m pytest \\\n  tests\u002Funit_tests\u002Ftraining\u002Ftest_comm_overlap.py -k \"moe\" \\\n  tests\u002Funit_tests\u002Ftraining\u002Ftest_deepep.py -q\n```\n\n## Verification\n\n### Unit tests\n\n```bash\nuv run python -m pytest \\\n  tests\u002Funit_tests\u002Ftraining\u002Ftest_comm_overlap.py \\\n  tests\u002Funit_tests\u002Ftraining\u002Ftest_deepep.py -q\n```\n\n### Log checks\n\nAfter a successful run with EP overlap:\n\n1. Confirm no assertion errors during `CommOverlapConfig` finalization\n2. Confirm `overlap_moe_expert_parallel_comm` appears as `True` in the logged\n   config\n3. If using flex dispatcher, confirm `moe_token_dispatcher_type = \"flex\"` and\n   the correct backend in logs\n\n### Success criteria\n\n- Config validation passes for the selected dispatcher and overlap settings\n- Training runs complete without hangs or assertion failures\n- Throughput improves or at least does not regress for the target workload\n- Loss trajectory matches baseline (overlap should not affect convergence)\n\n## Code Anchors\n\n### Bridge overlap validation\n\n```470:505:src\u002Fmegatron\u002Fbridge\u002Ftraining\u002Fcomm_overlap.py\nif self.user_comm_overlap_cfg.overlap_moe_expert_parallel_comm is True:\n    assert model_cfg.expert_model_parallel_size > 1, ...\n    assert model_cfg.num_moe_experts > 1, ...\n    assert model_cfg.moe_token_dispatcher_type in [\"alltoall\", \"flex\"], ...\n    assert model_cfg.bf16 or model_cfg.fp16, ...\n    assert is_torch_min_version(\"2.6.0\"), ...\n    # ... PP + VPP check, recompute checks, shared_expert_overlap check ...\n```\n\n### Delayed wgrad validation\n\n```507:557:src\u002Fmegatron\u002Fbridge\u002Ftraining\u002Fcomm_overlap.py\nif self.user_comm_overlap_cfg.delay_wgrad_compute is True:\n    # TE version checks for overlap_grad_reduce and gradient_accumulation_fusion\n    # CUDA graph scope validations for delayed wgrad\n    assert overlap_moe_expert_parallel_comm, ...\n```\n\n### Flex-dispatcher activation\n\n```27:72:src\u002Fmegatron\u002Fbridge\u002Ftraining\u002Fflex_dispatcher_backend.py\ndef apply_flex_dispatcher_backend(...):\n    # GPU architecture check for DeepEP \u002F HybridEP\n    model_config.moe_token_dispatcher_type = \"flex\"\n    model_config.moe_flex_dispatcher_backend = moe_flex_dispatcher_backend\n    model_config.moe_shared_expert_overlap = False\n```\n\n### Perf harness override\n\n```149:156:scripts\u002Fperformance\u002Futils\u002Foverrides.py\ndef _set_moe_a2a_overlap_overrides(recipe, moe_a2a_overlap=False):\n    if moe_a2a_overlap:\n        recipe.comm_overlap.overlap_moe_expert_parallel_comm = True\n        recipe.comm_overlap.delay_wgrad_compute = True\n        recipe.model.moe_shared_expert_overlap = False\n```\n\n### Tests\n\n| File | Coverage |\n|---|---|\n| `tests\u002Funit_tests\u002Ftraining\u002Ftest_comm_overlap.py` | EP overlap validation, delayed wgrad, CUDA graph + wgrad interaction |\n| `tests\u002Funit_tests\u002Ftraining\u002Ftest_deepep.py` | DeepEP\u002FHybridEP helper activation and GPU gating |\n\n## Failure Diagnosis\n\n| Symptom | Likely Cause | How To Confirm | Fix |\n|---|---|---|---|\n| assert `expert_model_parallel_size > 1` | EP not configured | Check `expert_model_parallel_size` | Set EP > 1 |\n| assert `moe_token_dispatcher_type` | Wrong dispatcher | Check dispatcher type | Use `\"alltoall\"` or `\"flex\"` |\n| assert on BF16\u002FFP16 | Wrong precision | Check `bf16` and `fp16` | Set `bf16 = True` |\n| hang during training | PyTorch \u003C 2.6 | Check PyTorch version | Upgrade to >= 2.6.0 |\n| assert `virtual_pipeline_model_parallel_size` | PP > 1 without VPP | Check PP and VPP config | Set VPP when PP > 1 |\n| assert `recompute_granularity` | Full recompute enabled | Check recompute settings | Disable full recompute |\n| assert `overlap_moe_expert_parallel_comm required` | delayed wgrad without EP overlap | Check `delay_wgrad_compute` without overlap | Enable EP overlap first |\n| assert `gradient_accumulation_fusion` | CUDA graph + delayed wgrad | Check graph scope + wgrad settings | Enable `gradient_accumulation_fusion` |\n| assert on attention bias | CUDA graph attn + delayed wgrad + bias | Check `add_bias_linear` \u002F `add_qkv_bias` | Disable attention bias |\n| no throughput gain from flex dispatcher | `apply_flex_dispatcher_backend` not called | Check `moe_token_dispatcher_type` in logs | Call `apply_flex_dispatcher_backend(...)` |\n| DeepEP\u002FHybridEP silently skipped | Unsupported GPU | Check warning logs | Run on Ampere\u002FHopper\u002FBlackwell |\n\n## Known Limitations\n\n- Setting `moe_flex_dispatcher_backend` alone does not activate flex dispatch —\n  you must call `apply_flex_dispatcher_backend(...)`.\n- Public recipes are often conservative and leave MoE overlap disabled by\n  default.\n- End-to-end throughput gains have not yet been measured in a controlled Bridge\n  experiment for every model family. Code validation is stronger than a single\n  universal performance claim.\n- MoE overlap and shared-expert overlap are mutually exclusive.\n- CUDA graph plus delayed wgrad is a multi-constraint path that requires\n  careful TE version and scope validation.\n","# MoE Expert-Parallel Overlap Skill\n\n## References\n\n- Stable docs: @docs\u002Ftraining\u002Fcommunication-overlap.md\n- Structured metadata: @skills\u002Fnemo-mbridge-perf-expert-parallel-overlap\u002Fcard.yaml\n\n## What It Is\n\nExpert-parallel (EP) overlap hides the cost of token dispatch\u002Fcombine all-to-all\ncommunication by running it concurrently with expert FFN compute. Optionally,\ndelayed expert weight-gradient computation (`delay_wgrad_compute`) provides\nadditional overlap by deferring wgrad to overlap with the next layer's forward.\n\nBridge supports two dispatcher paths:\n\n| Dispatcher | Backend | When to use |\n|---|---|---|\n| `alltoall` | Standard MoE all-to-all | Default, broadest compatibility |\n| `flex` | DeepEP or HybridEP | Higher overlap on Ampere\u002FHopper\u002FBlackwell |\n\n## Quick Decision\n\nUse EP overlap when:\n\n- the model is MoE with `EP > 1`\n- expert dispatch\u002Fcombine communication is a meaningful part of step time\n- you have memory headroom and are tuning for throughput\n\nPrefer:\n\n- `alltoall` dispatcher for the first rollout (broader compatibility)\n- `flex` + DeepEP\u002FHybridEP when running on supported GPUs and seeking\n  additional gains\n\nAvoid EP overlap when:\n\n- full activation recompute is enabled\n- `moe_shared_expert_overlap` is enabled\n- the run is still being brought up for correctness\n- PyTorch \u003C 2.6.0\n\nExpected outcome:\n\n- if all-to-all dispatch is a clear profile bottleneck, overlap can produce a\n  modest to meaningful speedup\n- if the run is tiny, communication-light, or dominated by another wall, the\n  gain may be negligible\n\n## Correctness-First alltoall Benchmark\n\nFor the plain EP-overlap isolation benchmark, keep flex dispatch and delayed\nwgrad disabled. The measured shape was Qwen3 MoE 30B-A3B SFT on 16 H100 GPUs:\n`EP=16`, `alltoall`, BF16, global batch size 1024, CUDA graphs disabled,\n`moe_permute_fusion=false`, measured over iterations 3-8.\n\nUse these overrides for the plain-overlap case:\n\n```bash\n--cuda_graph_impl none \\\n--moe_flex_dispatcher_backend None \\\n--moe_a2a_overlap false \\\ncomm_overlap.overlap_moe_expert_parallel_comm=true \\\ncomm_overlap.delay_wgrad_compute=false \\\nmodel.moe_shared_expert_overlap=false\n```\n\nDo not use `--moe_a2a_overlap true` for this isolation test: the performance\nharness helper enables both `overlap_moe_expert_parallel_comm` and\n`delay_wgrad_compute`, so it does not isolate plain EP overlap.\n\nSteady-window timing from that benchmark:\n\n| Case | Steady mean | Relative |\n|---|---:|---:|\n| no EP overlap | 41.25s | 1.000x |\n| EP overlap | 31.31s | 1.317x |\n| EP overlap plus `delay_wgrad_compute` | 31.20s | 1.322x |\n\nThis is evidence for enabling plain EP overlap on this inter-node all-to-all\nshape. It does not show a meaningful independent win from delayed wgrad, and it\ndoes not validate fused MoE permutation because that path was disabled for the\nruntime stack.\n\n## Enablement\n\n### alltoall dispatcher\n\n```python\ncfg.comm_overlap.overlap_moe_expert_parallel_comm = True\ncfg.comm_overlap.delay_wgrad_compute = False\ncfg.model.moe_shared_expert_overlap = False\n\ncfg.model.expert_model_parallel_size = 8\ncfg.model.num_moe_experts = 64\ncfg.model.moe_token_dispatcher_type = \"alltoall\"\ncfg.model.bf16 = True\ncfg.model.fp16 = False\n```\n\nEnable `delay_wgrad_compute=True` only after the plain overlap path is known to\nwork and its extra compatibility constraints have been checked.\n\n### flex dispatcher (DeepEP or HybridEP)\n\n```python\nfrom megatron.bridge.training.flex_dispatcher_backend import apply_flex_dispatcher_backend\n\ncfg.comm_overlap.overlap_moe_expert_parallel_comm = True\ncfg.comm_overlap.delay_wgrad_compute = True\ncfg.model.moe_shared_expert_overlap = False\n\napply_flex_dispatcher_backend(cfg.model, moe_flex_dispatcher_backend=\"deepep\")\n# or: apply_flex_dispatcher_backend(cfg.model, moe_flex_dispatcher_backend=\"hybridep\")\n```\n\n## Compatibility And Constraints\n\n- `expert_model_parallel_size > 1`\n- `num_moe_experts > 1`\n- `moe_token_dispatcher_type` must be `\"alltoall\"` or `\"flex\"`\n- `moe_shared_expert_overlap = False`\n- Base precision is BF16 or FP16\n- PyTorch `>= 2.6.0`\n- If `PP > 1`, `virtual_pipeline_model_parallel_size` must be set\n- `recompute_granularity != \"full\"`, `recompute_method = None`,\n  `recompute_num_layers = None`\n- `mtp_num_layers` must be `None` or `1`\n- `delay_wgrad_compute` requires `overlap_moe_expert_parallel_comm` as a\n  prerequisite\n- `delay_wgrad_compute` with `overlap_grad_reduce` requires TE >= 2.7.0\n- `delay_wgrad_compute` with `gradient_accumulation_fusion` requires TE >= 2.7.0\n- CUDA graph `attn` scope + `delay_wgrad_compute` requires TE >= 2.12.0,\n  `gradient_accumulation_fusion = True`, and no attention bias\n- DeepEP: Ampere, Hopper, B200, B300 GPUs only\n- HybridEP: Ampere, Hopper, B200, B300, GB200\u002FGB300 with NVL72\n\n## Minimal Working Config\n\n```python\ncfg.comm_overlap.overlap_moe_expert_parallel_comm = True\ncfg.comm_overlap.delay_wgrad_compute = False\ncfg.model.expert_model_parallel_size = 4\ncfg.model.num_moe_experts = 64\ncfg.model.moe_token_dispatcher_type = \"alltoall\"\ncfg.model.moe_shared_expert_overlap = False\ncfg.model.bf16 = True\n```\n\nUse this as the correctness-first starting point. Add delayed wgrad, flex\ndispatch, and CUDA-graph interactions only after the plain overlap path is\nknown to work.\n\n## Minimal Runnable Command\n\nPerformance harness example inside a Slurm allocation. Keep the model,\nparallelism, dispatcher, and runtime fixed, and vary only the two overlap\noverrides:\n\n```bash\nuv run python scripts\u002Fperformance\u002Frun_script.py \\\n  -m qwen \\\n  -mr qwen3_30b_a3b \\\n  --task pretrain \\\n  -g h100 \\\n  -c bf16 \\\n  -ng 16 \\\n  -gn 8 \\\n  --max_steps 8 \\\n  --cuda_graph_impl none \\\n  --moe_flex_dispatcher_backend None \\\n  --moe_a2a_overlap false \\\n  --tokenizer_type NullTokenizer \\\n  comm_overlap.overlap_moe_expert_parallel_comm=true \\\n  comm_overlap.delay_wgrad_compute=false \\\n  model.moe_shared_expert_overlap=false\n```\n\nDo not use `--moe_a2a_overlap true` when separating plain EP overlap from\ndelayed wgrad: the performance harness helper enables both\n`overlap_moe_expert_parallel_comm` and `delay_wgrad_compute`.\n\nUnit test verification:\n\n```bash\nuv run python -m pytest \\\n  tests\u002Funit_tests\u002Ftraining\u002Ftest_comm_overlap.py -k \"moe\" \\\n  tests\u002Funit_tests\u002Ftraining\u002Ftest_deepep.py -q\n```\n\n## Verification\n\n### Unit tests\n\n```bash\nuv run python -m pytest \\\n  tests\u002Funit_tests\u002Ftraining\u002Ftest_comm_overlap.py \\\n  tests\u002Funit_tests\u002Ftraining\u002Ftest_deepep.py -q\n```\n\n### Log checks\n\nAfter a successful run with EP overlap:\n\n1. Confirm no assertion errors during `CommOverlapConfig` finalization\n2. Confirm `overlap_moe_expert_parallel_comm` appears as `True` in the logged\n   config\n3. If using flex dispatcher, confirm `moe_token_dispatcher_type = \"flex\"` and\n   the correct backend in logs\n\n### Success criteria\n\n- Config validation passes for the selected dispatcher and overlap settings\n- Training runs complete without hangs or assertion failures\n- Throughput improves or at least does not regress for the target workload\n- Loss trajectory matches baseline (overlap should not affect convergence)\n\n## Code Anchors\n\n### Bridge overlap validation\n\n```470:505:src\u002Fmegatron\u002Fbridge\u002Ftraining\u002Fcomm_overlap.py\nif self.user_comm_overlap_cfg.overlap_moe_expert_parallel_comm is True:\n    assert model_cfg.expert_model_parallel_size > 1, ...\n    assert model_cfg.num_moe_experts > 1, ...\n    assert model_cfg.moe_token_dispatcher_type in [\"alltoall\", \"flex\"], ...\n    assert model_cfg.bf16 or model_cfg.fp16, ...\n    assert is_torch_min_version(\"2.6.0\"), ...\n    # ... PP + VPP check, recompute checks, shared_expert_overlap check ...\n```\n\n### Delayed wgrad validation\n\n```507:557:src\u002Fmegatron\u002Fbridge\u002Ftraining\u002Fcomm_overlap.py\nif self.user_comm_overlap_cfg.delay_wgrad_compute is True:\n    # TE version checks for overlap_grad_reduce and gradient_accumulation_fusion\n    # CUDA graph scope validations for delayed wgrad\n    assert overlap_moe_expert_parallel_comm, ...\n```\n\n### Flex-dispatcher activation\n\n```27:72:src\u002Fmegatron\u002Fbridge\u002Ftraining\u002Fflex_dispatcher_backend.py\ndef apply_flex_dispatcher_backend(...):\n    # GPU architecture check for DeepEP \u002F HybridEP\n    model_config.moe_token_dispatcher_type = \"flex\"\n    model_config.moe_flex_dispatcher_backend = moe_flex_dispatcher_backend\n    model_config.moe_shared_expert_overlap = False\n```\n\n### Perf harness override\n\n```149:156:scripts\u002Fperformance\u002Futils\u002Foverrides.py\ndef _set_moe_a2a_overlap_overrides(recipe, moe_a2a_overlap=False):\n    if moe_a2a_overlap:\n        recipe.comm_overlap.overlap_moe_expert_parallel_comm = True\n        recipe.comm_overlap.delay_wgrad_compute = True\n        recipe.model.moe_shared_expert_overlap = False\n```\n\n### Tests\n\n| File | Coverage |\n|---|---|\n| `tests\u002Funit_tests\u002Ftraining\u002Ftest_comm_overlap.py` | EP overlap validation, delayed wgrad, CUDA graph + wgrad interaction |\n| `tests\u002Funit_tests\u002Ftraining\u002Ftest_deepep.py` | DeepEP\u002FHybridEP helper activation and GPU gating |\n\n## Failure Diagnosis\n\n| Symptom | Likely Cause | How To Confirm | Fix |\n|---|---|---|---|\n| assert `expert_model_parallel_size > 1` | EP not configured | Check `expert_model_parallel_size` | Set EP > 1 |\n| assert `moe_token_dispatcher_type` | Wrong dispatcher | Check dispatcher type | Use `\"alltoall\"` or `\"flex\"` |\n| assert on BF16\u002FFP16 | Wrong precision | Check `bf16` and `fp16` | Set `bf16 = True` |\n| hang during training | PyTorch \u003C 2.6 | Check PyTorch version | Upgrade to >= 2.6.0 |\n| assert `virtual_pipeline_model_parallel_size` | PP > 1 without VPP | Check PP and VPP config | Set VPP when PP > 1 |\n| assert `recompute_granularity` | Full recompute enabled | Check recompute settings | Disable full recompute |\n| assert `overlap_moe_expert_parallel_comm required` | delayed wgrad without EP overlap | Check `delay_wgrad_compute` without overlap | Enable EP overlap first |\n| assert `gradient_accumulation_fusion` | CUDA graph + delayed wgrad | Check graph scope + wgrad settings | Enable `gradient_accumulation_fusion` |\n| assert on attention bias | CUDA graph attn + delayed wgrad + bias | Check `add_bias_linear` \u002F `add_qkv_bias` | Disable attention bias |\n| no throughput gain from flex dispatcher | `apply_flex_dispatcher_backend` not called | Check `moe_token_dispatcher_type` in logs | Call `apply_flex_dispatcher_backend(...)` |\n| DeepEP\u002FHybridEP silently skipped | Unsupported GPU | Check warning logs | Run on Ampere\u002FHopper\u002FBlackwell |\n\n## Known Limitations\n\n- Setting `moe_flex_dispatcher_backend` alone does not activate flex dispatch —\n  you must call `apply_flex_dispatcher_backend(...)`.\n- Public recipes are often conservative and leave MoE overlap disabled by\n  default.\n- End-to-end throughput gains have not yet been measured in a controlled Bridge\n  experiment for every model family. Code validation is stronger than a single\n  universal performance claim.\n- MoE overlap and shared-expert overlap are mutually exclusive.\n- CUDA graph plus delayed wgrad is a multi-constraint path that requires\n  careful TE version and scope validation.\n",{"name":5,"license":15,"description":7,"when_to_use":44},"Enabling EP overlap to hide dispatch\u002Fcombine latency, or tracing a throughput regression to an EP overlap config change; 'overlap_moe_expert_parallel_comm', 'delay_wgrad_compute', 'flex dispatcher', 'DeepEP overlap', 'HybridEP overlap'.","claude\u002Finstall-gsd-build-foQdV","d86cd127f527124b5fd0fd0bc679a4d79b7d01d7",".agents\u002Fskills\u002Fnemo-mbridge-perf-expert-parallel-overlap","https:\u002F\u002Fgithub.com\u002Fpattanation\u002FNorvik","https:\u002F\u002Fnorvik-orpin.vercel.app","https:\u002F\u002Fgithub.com\u002Fpattanation","2026-07-17 11:17:04",{"source":8,"skillName":5,"commands":53,"prompt":63,"zipAvailable":64},[54,57,60],{"tool":55,"command":56},"npx","npx skills add pattanation\u002FNorvik --skill nemo-mbridge-perf-expert-parallel-overlap",{"tool":58,"command":59},"bunx","bunx skills add pattanation\u002FNorvik --skill nemo-mbridge-perf-expert-parallel-overlap",{"tool":61,"command":62},"pnpm","pnpm dlx skills add pattanation\u002FNorvik --skill nemo-mbridge-perf-expert-parallel-overlap","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fpattanation\u002FNorvik\u002Fblob\u002Fclaude\u002Finstall-gsd-build-foQdV\u002F.agents\u002Fskills\u002Fnemo-mbridge-perf-expert-parallel-overlap\u002FSKILL.md",true,[66,72,76,80,84],{"path":67,"resourceType":68,"resourceTypeDesc":69,"sizeBytes":70,"sourceHtmlUrl":71},"BENCHMARK.md","REFERENCE","参考文档",4054,"https:\u002F\u002Fgithub.com\u002Fpattanation\u002FNorvik\u002Fblob\u002Fclaude\u002Finstall-gsd-build-foQdV\u002F.agents\u002Fskills\u002Fnemo-mbridge-perf-expert-parallel-overlap\u002FBENCHMARK.md",{"path":73,"resourceType":68,"resourceTypeDesc":69,"sizeBytes":74,"sourceHtmlUrl":75},"card.yaml",7519,"https:\u002F\u002Fgithub.com\u002Fpattanation\u002FNorvik\u002Fblob\u002Fclaude\u002Finstall-gsd-build-foQdV\u002F.agents\u002Fskills\u002Fnemo-mbridge-perf-expert-parallel-overlap\u002Fcard.yaml",{"path":77,"resourceType":68,"resourceTypeDesc":69,"sizeBytes":78,"sourceHtmlUrl":79},"evals\u002Fevals.json",2093,"https:\u002F\u002Fgithub.com\u002Fpattanation\u002FNorvik\u002Fblob\u002Fclaude\u002Finstall-gsd-build-foQdV\u002F.agents\u002Fskills\u002Fnemo-mbridge-perf-expert-parallel-overlap\u002Fevals\u002Fevals.json",{"path":81,"resourceType":68,"resourceTypeDesc":69,"sizeBytes":82,"sourceHtmlUrl":83},"skill-card.md",4375,"https:\u002F\u002Fgithub.com\u002Fpattanation\u002FNorvik\u002Fblob\u002Fclaude\u002Finstall-gsd-build-foQdV\u002F.agents\u002Fskills\u002Fnemo-mbridge-perf-expert-parallel-overlap\u002Fskill-card.md",{"path":85,"resourceType":86,"resourceTypeDesc":87,"sizeBytes":88,"sourceHtmlUrl":89},"skill.oms.sig","OTHER","其他",4837,"https:\u002F\u002Fgithub.com\u002Fpattanation\u002FNorvik\u002Fblob\u002Fclaude\u002Finstall-gsd-build-foQdV\u002F.agents\u002Fskills\u002Fnemo-mbridge-perf-expert-parallel-overlap\u002Fskill.oms.sig",[91,99,106,113,139,163],{"skillNo":92,"name":93,"nameZh":6,"description":94,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":95,"categories":96,"keywords":97,"publishedAt":98},"01M73Z1NPMJ667E0DSPBS9FH0B","jetson-set-target","Switch the active Jetson target-platform pointer to an existing profile YAML. Use before customize\u002Fbuild\u002Fflash to change target; not for authoring profiles — use jetson-init-target instead.","https:\u002F\u002Fgithub.com\u002Fpattanation\u002FNorvik\u002Fblob\u002Fclaude\u002Finstall-gsd-build-foQdV\u002F.agents\u002Fskills\u002Fjetson-set-target\u002FSKILL.md",[],[],"2026-11-11 15:11:14",{"skillNo":100,"name":101,"nameZh":6,"description":102,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":103,"categories":104,"keywords":105,"publishedAt":98},"01M73YC29YWGCW521P7B0NM3HQ","earth2studio-data-fetch","Fetch weather\u002Fclimate data via Earth2Studio data sources for specific variables and times. Do NOT use for inference pipelines, model discovery, or installation.","https:\u002F\u002Fgithub.com\u002Fpattanation\u002FNorvik\u002Fblob\u002Fclaude\u002Finstall-gsd-build-foQdV\u002F.agents\u002Fskills\u002Fearth2studio-data-fetch\u002FSKILL.md",[],[],{"skillNo":107,"name":108,"nameZh":6,"description":109,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":110,"categories":111,"keywords":112,"publishedAt":98},"01M73YBNHMHFDFP83MAVGQQ92N","earth2studio-create-datasource","Create and validate Earth2Studio data source wrappers (DataSource, ForecastSource, DataFrameSource, ForecastFrameSource) from remote stores. Do NOT use for fetching data with existing sources, model inference, or installation tasks.","https:\u002F\u002Fgithub.com\u002Fpattanation\u002FNorvik\u002Fblob\u002Fclaude\u002Finstall-gsd-build-foQdV\u002F.agents\u002Fskills\u002Fearth2studio-create-datasource\u002FSKILL.md",[],[],{"skillNo":114,"name":115,"nameZh":6,"description":116,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":117,"sourceHtmlUrl":118,"categories":119,"keywords":120,"publishedAt":138},"01M71QDV4DM8T19HEHWATEF1K4","webapp-testing","Toolkit for interacting with and testing local web applications using Playwright. Supports verifying frontend functionality, debugging UI behavior, capturing browser screenshots, and viewing browser logs.","https:\u002F\u002Fgithub.com\u002Fpattanation\u002FNorvik\u002Fblob\u002Fclaude\u002Finstall-gsd-build-foQdV\u002F.agents\u002Fskills\u002Fwebapp-testing\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002Fpattanation\u002FNorvik\u002Fblob\u002Fclaude\u002Finstall-gsd-build-foQdV\u002F.agents\u002Fskills\u002Fwebapp-testing\u002FSKILL.md",[],[121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137],"webapp","testing","webapp testing","local","screenshots","for","applications","browser","ui","behavior","web","playwright","with","frontend","debugging","toolkit","logs","2026-11-10 13:02:02",{"skillNo":140,"name":141,"nameZh":6,"description":142,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":143,"sourceHtmlUrl":144,"categories":145,"keywords":146,"publishedAt":138},"01M71QDH2GGMXGA9105C9W1N7B","web-artifacts-builder","Suite of tools for creating elaborate, multi-component claude.ai HTML artifacts using modern frontend web technologies (React, Tailwind CSS, shadcn\u002Fui). Use for complex artifacts requiring state management, routing, or shadcn\u002Fui components - not for simple single-file HTML\u002FJSX artifacts.","https:\u002F\u002Fgithub.com\u002Fpattanation\u002FNorvik\u002Fblob\u002Fclaude\u002Finstall-gsd-build-foQdV\u002F.agents\u002Fskills\u002Fweb-artifacts-builder\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002Fpattanation\u002FNorvik\u002Fblob\u002Fclaude\u002Finstall-gsd-build-foQdV\u002F.agents\u002Fskills\u002Fweb-artifacts-builder\u002FSKILL.md",[],[147,131,148,149,150,151,152,153,154,155,156,157,126,158,159,134,160,33,161,162],"web artifacts builder","artifacts","artifacts builder","builder","multi","state","routing","state management","react","single-file","css","Tailwind","ui components","single","file","components",{"skillNo":164,"name":165,"nameZh":6,"description":166,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":167,"licenseFileUrl":168,"sourceHtmlUrl":169,"categories":170,"keywords":171,"publishedAt":138},"01M71QD9T2XC3EWMQNN9ACNWQ1","vueuse-functions","Apply VueUse composables where appropriate to build concise, maintainable Vue.js \u002F Nuxt features.","MIT","https:\u002F\u002Fgithub.com\u002Fpattanation\u002FNorvik\u002Fblob\u002Fclaude\u002Finstall-gsd-build-foQdV\u002F.agents\u002Fskills\u002Fvueuse-functions\u002FLICENSE.md","https:\u002F\u002Fgithub.com\u002Fpattanation\u002FNorvik\u002Fblob\u002Fclaude\u002Finstall-gsd-build-foQdV\u002F.agents\u002Fskills\u002Fvueuse-functions\u002FSKILL.md",[],[172,173,174,175,176,177,178,179,180,181,182,183,184,185],"vueuse","vueuse functions","functions","composables","project","nuxt","apply","github","concise","build","https","features","vue","js"]