[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M79FDTY4Z0FZM1ABPQNDK3DX":3,"skill-same:01M79FDTY4Z0FZM1ABPQNDK3DX":69},{"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":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":25,"commitSha":26,"skillDirectory":27,"forksCount":14,"repositoryHtmlUrl":28,"repositoryHomepageUrl":6,"ownerHtmlUrl":29,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":30,"install":31,"resources":44},"01M79FDTY4Z0FZM1ABPQNDK3DX","nemo-mbridge-perf-megatron-fsdp",null,"Operational guide for enabling Megatron FSDP in Megatron-Bridge, including config knobs, code anchors, pitfalls, and verification.","Elogic360\u002Fsoftware-factory","Elogic360","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F156535519?v=4","01M74NH3F0RB13PWB7JZDE2V80","elogic360","01M74NH3FPC65082MDZVMFHDM3",0,"Apache-2.0","https:\u002F\u002Fgithub.com\u002FElogic360\u002Fsoftware-factory\u002Fblob\u002Fmain\u002Fskills\u002Fnvidia\u002Fnemo-mbridge-perf-megatron-fsdp\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: nemo-mbridge-perf-megatron-fsdp\ndescription: Operational guide for enabling Megatron FSDP in Megatron-Bridge, including config knobs, code anchors, pitfalls, and verification.\nlicense: Apache-2.0\nwhen_to_use: Using FSDP-based data parallelism instead of DDP, or tracing an OOM or regression to a FSDP config change; 'use_megatron_fsdp', 'data_parallel_sharding_strategy', 'sharded data parallel', 'Megatron FSDP'.\n---\n\n# Megatron FSDP Skill\n\nFor stable background and recommendation level, see:\n\n- @docs\u002Ftraining\u002Fmegatron-fsdp.md\n- @skills\u002Fnemo-mbridge-perf-megatron-fsdp\u002Fcard.yaml\n\n## Enablement\n\nMinimal Megatron FSDP override in Bridge:\n\n```python\ncfg.dist.use_megatron_fsdp = True\ncfg.ddp.use_megatron_fsdp = True\ncfg.ddp.data_parallel_sharding_strategy = \"optim_grads_params\"\ncfg.ddp.average_in_collective = False\ncfg.checkpoint.ckpt_format = \"fsdp_dtensor\"\n```\n\nExample recipe fixup:\n\n```python\ncfg = llama3_8b_pretrain_config()\ncfg.dist.use_megatron_fsdp = True\ncfg.ddp.use_megatron_fsdp = True\ncfg.ddp.data_parallel_sharding_strategy = \"optim_grads_params\"\ncfg.ddp.average_in_collective = False\ncfg.checkpoint.ckpt_format = \"fsdp_dtensor\"\ncfg.checkpoint.save = \"\u002Ftmp\u002Ffsdp_ckpts\"\ncfg.checkpoint.load = None\n```\n\nPerformance harness note:\n\n```bash\npython scripts\u002Fperformance\u002Flaunch.py --use_megatron_fsdp true\n```\n\n## Code Anchors\n\nBridge config definition:\n\n```148:154:src\u002Fmegatron\u002Fbridge\u002Ftraining\u002Fconfig.py\nuse_megatron_fsdp: bool = False\n\"\"\"Use Megatron's Fully Sharded Data Parallel. Cannot be used together with use_torch_fsdp2.\"\"\"\n\nuse_torch_fsdp2: bool = False\n\"\"\"Use the torch FSDP2 implementation. FSDP2 is not currently working with Pipeline Parallel.\nIt is still not in a stable release stage, and may therefore contain bugs or other\npotential issues.\"\"\"\n```\n\nBridge validation:\n\n```1533:1578:src\u002Fmegatron\u002Fbridge\u002Ftraining\u002Fconfig.py\nif self.dist.use_megatron_fsdp and self.dist.use_torch_fsdp2:\n    raise ValueError(...)\n...\nassert not self.dist.use_tp_pp_dp_mapping, \"use_tp_pp_dp_mapping is not supported with Megatron FSDP\"\n...\nassert self.checkpoint.ckpt_format == \"fsdp_dtensor\", (\n    \"Megatron FSDP only supports fsdp_dtensor checkpoint format\"\n)\n```\n\nRuntime wrapper selection:\n\n```217:243:src\u002Fmegatron\u002Fbridge\u002Fmodels\u002Fcommon\u002Funimodal.py\nif use_megatron_fsdp:\n    DP = FullyShardedDataParallel\nelif use_torch_fsdp2:\n    DP = TorchFullyShardedDataParallel\nelse:\n    DP = DistributedDataParallel\n...\nDP(\n    config=get_model_config(model_chunk),\n    ddp_config=ddp_config,\n    module=model_chunk,\n    ...\n    pg_collection=pg_collection,\n)\n```\n\nPerf harness overrides:\n\n```74:98:scripts\u002Fperformance\u002Futils\u002Foverrides.py\nrecipe.ddp.use_megatron_fsdp = True\nrecipe.ddp.data_parallel_sharding_strategy = \"optim_grads_params\"\nrecipe.ddp.keep_fp8_transpose_cache = False\nrecipe.ddp.average_in_collective = False\n...\nrecipe.checkpoint.load = None\n```\n\n## Pitfalls\n\n1. Public recipes often expose `use_megatron_fsdp` but still default to `ckpt_format=\"torch_dist\"`. If save\u002Fload is enabled, switch to `fsdp_dtensor`.\n2. `use_torch_fsdp2` exists, but on the validated branch Bridge still fails before training because `_ddp_wrap` passes `pg_collection`.\n3. CPU offloading is only valid when `pipeline_model_parallel_size == 1` and activation recomputation is disabled.\n4. Upstream warns that FSDP and TP\u002FCP can want different `CUDA_DEVICE_MAX_CONNECTIONS` settings on Hopper and earlier.\n5. Megatron FSDP and FSDP2 are mutually exclusive.\n\n## Verification\n\nUse the existing 2-GPU functional smoke test:\n\n```bash\nCUDA_VISIBLE_DEVICES=0,1 uv run python -m torch.distributed.run --nproc_per_node=2 \\\n  -m pytest tests\u002Ffunctional_tests\u002Ftraining\u002Ftest_megatron_fsdp.py::TestMegatronFSDP::test_fsdp_pretrain_basic -v -s\n```\n\nSuccess criteria:\n\n- Pytest reports `1 passed`\n- The log shows finite loss at the last iteration\n- The run finishes without a checkpoint format assertion\n","# Megatron FSDP Skill\n\nFor stable background and recommendation level, see:\n\n- @docs\u002Ftraining\u002Fmegatron-fsdp.md\n- @skills\u002Fnemo-mbridge-perf-megatron-fsdp\u002Fcard.yaml\n\n## Enablement\n\nMinimal Megatron FSDP override in Bridge:\n\n```python\ncfg.dist.use_megatron_fsdp = True\ncfg.ddp.use_megatron_fsdp = True\ncfg.ddp.data_parallel_sharding_strategy = \"optim_grads_params\"\ncfg.ddp.average_in_collective = False\ncfg.checkpoint.ckpt_format = \"fsdp_dtensor\"\n```\n\nExample recipe fixup:\n\n```python\ncfg = llama3_8b_pretrain_config()\ncfg.dist.use_megatron_fsdp = True\ncfg.ddp.use_megatron_fsdp = True\ncfg.ddp.data_parallel_sharding_strategy = \"optim_grads_params\"\ncfg.ddp.average_in_collective = False\ncfg.checkpoint.ckpt_format = \"fsdp_dtensor\"\ncfg.checkpoint.save = \"\u002Ftmp\u002Ffsdp_ckpts\"\ncfg.checkpoint.load = None\n```\n\nPerformance harness note:\n\n```bash\npython scripts\u002Fperformance\u002Flaunch.py --use_megatron_fsdp true\n```\n\n## Code Anchors\n\nBridge config definition:\n\n```148:154:src\u002Fmegatron\u002Fbridge\u002Ftraining\u002Fconfig.py\nuse_megatron_fsdp: bool = False\n\"\"\"Use Megatron's Fully Sharded Data Parallel. Cannot be used together with use_torch_fsdp2.\"\"\"\n\nuse_torch_fsdp2: bool = False\n\"\"\"Use the torch FSDP2 implementation. FSDP2 is not currently working with Pipeline Parallel.\nIt is still not in a stable release stage, and may therefore contain bugs or other\npotential issues.\"\"\"\n```\n\nBridge validation:\n\n```1533:1578:src\u002Fmegatron\u002Fbridge\u002Ftraining\u002Fconfig.py\nif self.dist.use_megatron_fsdp and self.dist.use_torch_fsdp2:\n    raise ValueError(...)\n...\nassert not self.dist.use_tp_pp_dp_mapping, \"use_tp_pp_dp_mapping is not supported with Megatron FSDP\"\n...\nassert self.checkpoint.ckpt_format == \"fsdp_dtensor\", (\n    \"Megatron FSDP only supports fsdp_dtensor checkpoint format\"\n)\n```\n\nRuntime wrapper selection:\n\n```217:243:src\u002Fmegatron\u002Fbridge\u002Fmodels\u002Fcommon\u002Funimodal.py\nif use_megatron_fsdp:\n    DP = FullyShardedDataParallel\nelif use_torch_fsdp2:\n    DP = TorchFullyShardedDataParallel\nelse:\n    DP = DistributedDataParallel\n...\nDP(\n    config=get_model_config(model_chunk),\n    ddp_config=ddp_config,\n    module=model_chunk,\n    ...\n    pg_collection=pg_collection,\n)\n```\n\nPerf harness overrides:\n\n```74:98:scripts\u002Fperformance\u002Futils\u002Foverrides.py\nrecipe.ddp.use_megatron_fsdp = True\nrecipe.ddp.data_parallel_sharding_strategy = \"optim_grads_params\"\nrecipe.ddp.keep_fp8_transpose_cache = False\nrecipe.ddp.average_in_collective = False\n...\nrecipe.checkpoint.load = None\n```\n\n## Pitfalls\n\n1. Public recipes often expose `use_megatron_fsdp` but still default to `ckpt_format=\"torch_dist\"`. If save\u002Fload is enabled, switch to `fsdp_dtensor`.\n2. `use_torch_fsdp2` exists, but on the validated branch Bridge still fails before training because `_ddp_wrap` passes `pg_collection`.\n3. CPU offloading is only valid when `pipeline_model_parallel_size == 1` and activation recomputation is disabled.\n4. Upstream warns that FSDP and TP\u002FCP can want different `CUDA_DEVICE_MAX_CONNECTIONS` settings on Hopper and earlier.\n5. Megatron FSDP and FSDP2 are mutually exclusive.\n\n## Verification\n\nUse the existing 2-GPU functional smoke test:\n\n```bash\nCUDA_VISIBLE_DEVICES=0,1 uv run python -m torch.distributed.run --nproc_per_node=2 \\\n  -m pytest tests\u002Ffunctional_tests\u002Ftraining\u002Ftest_megatron_fsdp.py::TestMegatronFSDP::test_fsdp_pretrain_basic -v -s\n```\n\nSuccess criteria:\n\n- Pytest reports `1 passed`\n- The log shows finite loss at the last iteration\n- The run finishes without a checkpoint format assertion\n",{"name":5,"license":15,"description":7,"when_to_use":24},"Using FSDP-based data parallelism instead of DDP, or tracing an OOM or regression to a FSDP config change; 'use_megatron_fsdp', 'data_parallel_sharding_strategy', 'sharded data parallel', 'Megatron FSDP'.","main","c475fc64e94e803b50d14a791dfee8853fbb2c5c","skills\u002Fnvidia\u002Fnemo-mbridge-perf-megatron-fsdp","https:\u002F\u002Fgithub.com\u002FElogic360\u002Fsoftware-factory","https:\u002F\u002Fgithub.com\u002FElogic360","2026-11-08 22:21:22",{"source":8,"skillName":5,"commands":32,"prompt":42,"zipAvailable":43},[33,36,39],{"tool":34,"command":35},"npx","npx skills add Elogic360\u002Fsoftware-factory --skill nemo-mbridge-perf-megatron-fsdp",{"tool":37,"command":38},"bunx","bunx skills add Elogic360\u002Fsoftware-factory --skill nemo-mbridge-perf-megatron-fsdp",{"tool":40,"command":41},"pnpm","pnpm dlx skills add Elogic360\u002Fsoftware-factory --skill nemo-mbridge-perf-megatron-fsdp","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FElogic360\u002Fsoftware-factory\u002Fblob\u002Fmain\u002Fskills\u002Fnvidia\u002Fnemo-mbridge-perf-megatron-fsdp\u002FSKILL.md",true,[45,51,55,59,63],{"path":46,"resourceType":47,"resourceTypeDesc":48,"sizeBytes":49,"sourceHtmlUrl":50},"BENCHMARK.md","REFERENCE","参考文档",4331,"https:\u002F\u002Fgithub.com\u002FElogic360\u002Fsoftware-factory\u002Fblob\u002Fmain\u002Fskills\u002Fnvidia\u002Fnemo-mbridge-perf-megatron-fsdp\u002FBENCHMARK.md",{"path":52,"resourceType":47,"resourceTypeDesc":48,"sizeBytes":53,"sourceHtmlUrl":54},"card.yaml",2108,"https:\u002F\u002Fgithub.com\u002FElogic360\u002Fsoftware-factory\u002Fblob\u002Fmain\u002Fskills\u002Fnvidia\u002Fnemo-mbridge-perf-megatron-fsdp\u002Fcard.yaml",{"path":56,"resourceType":47,"resourceTypeDesc":48,"sizeBytes":57,"sourceHtmlUrl":58},"evals\u002Fevals.json",1434,"https:\u002F\u002Fgithub.com\u002FElogic360\u002Fsoftware-factory\u002Fblob\u002Fmain\u002Fskills\u002Fnvidia\u002Fnemo-mbridge-perf-megatron-fsdp\u002Fevals\u002Fevals.json",{"path":60,"resourceType":47,"resourceTypeDesc":48,"sizeBytes":61,"sourceHtmlUrl":62},"skill-card.md",3760,"https:\u002F\u002Fgithub.com\u002FElogic360\u002Fsoftware-factory\u002Fblob\u002Fmain\u002Fskills\u002Fnvidia\u002Fnemo-mbridge-perf-megatron-fsdp\u002Fskill-card.md",{"path":64,"resourceType":65,"resourceTypeDesc":66,"sizeBytes":67,"sourceHtmlUrl":68},"skill.oms.sig","OTHER","其他",4825,"https:\u002F\u002Fgithub.com\u002FElogic360\u002Fsoftware-factory\u002Fblob\u002Fmain\u002Fskills\u002Fnvidia\u002Fnemo-mbridge-perf-megatron-fsdp\u002Fskill.oms.sig",[70,77,84,91,98,105],{"skillNo":71,"name":72,"nameZh":6,"description":73,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":74,"categories":75,"keywords":76,"publishedAt":19},"01M79G206MT3J6S0GY3C45P2KV","vss-summarize-video","Use to summarize a recorded video via the LVS summarization microservice (HITL-gated) with a VLM fallback. Not for report generation or live RTSP captioning.","https:\u002F\u002Fgithub.com\u002FElogic360\u002Fsoftware-factory\u002Fblob\u002Fmain\u002Fskills\u002Fnvidia\u002Fvss-summarize-video\u002FSKILL.md",[],[],{"skillNo":78,"name":79,"nameZh":6,"description":80,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":81,"categories":82,"keywords":83,"publishedAt":19},"01M79G1WN63PGRE8CKD47WEBQ5","vss-setup-video-analytics-api","Use to deploy the vss-video-analytics-api REST service standalone (config-source, data-log bind, Elasticsearch, optional Kafka). Not for full warehouse deploy.","https:\u002F\u002Fgithub.com\u002FElogic360\u002Fsoftware-factory\u002Fblob\u002Fmain\u002Fskills\u002Fnvidia\u002Fvss-setup-video-analytics-api\u002FSKILL.md",[],[],{"skillNo":85,"name":86,"nameZh":6,"description":87,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":88,"categories":89,"keywords":90,"publishedAt":19},"01M79G1S9F7VY3EF6H53PRP5AN","vss-setup-behavior-analytics","Use to deploy the vss-behavior-analytics service standalone (entrypoint, config-source, optional calibration). Not for the full warehouse deploy.","https:\u002F\u002Fgithub.com\u002FElogic360\u002Fsoftware-factory\u002Fblob\u002Fmain\u002Fskills\u002Fnvidia\u002Fvss-setup-behavior-analytics\u002FSKILL.md",[],[],{"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":19},"01M79G1N1S1Y27PFZPYMNK1MTQ","vss-search-archive","Use this skill to run top-level VSS fusion search on archived video, or to ingest video files \u002F RTSP streams for search. Do NOT use for ad-hoc visual Q&A (use vss-ask-video), live captioning (use vss-deploy-dense-captioning), or video summarization and reports (use vss-summarize-video).","https:\u002F\u002Fgithub.com\u002FElogic360\u002Fsoftware-factory\u002Fblob\u002Fmain\u002Fskills\u002Fnvidia\u002Fvss-search-archive\u002FSKILL.md",[],[],{"skillNo":99,"name":100,"nameZh":6,"description":101,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":102,"categories":103,"keywords":104,"publishedAt":19},"01M79G1H6WN0Q6C0VCAXCZX6B7","vss-query-analytics","Use this skill when reading video-analytics metrics, incidents, alerts, and sensor data via the VA-MCP server (port 9901). Not for live VLM or incident-range narrative reports.","https:\u002F\u002Fgithub.com\u002FElogic360\u002Fsoftware-factory\u002Fblob\u002Fmain\u002Fskills\u002Fnvidia\u002Fvss-query-analytics\u002FSKILL.md",[],[],{"skillNo":106,"name":107,"nameZh":6,"description":108,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":109,"categories":110,"keywords":111,"publishedAt":19},"01M79G1DYPNXQS7QHZ0AAF5FX5","vss-manage-video-io-storage","Use to call the VIOS REST API (sensor list, timelines, clip extraction, snapshots, add\u002Fdelete sensors and streams). Not for VLM inference or search.","https:\u002F\u002Fgithub.com\u002FElogic360\u002Fsoftware-factory\u002Fblob\u002Fmain\u002Fskills\u002Fnvidia\u002Fvss-manage-video-io-storage\u002FSKILL.md",[],[]]