[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7CPXKDYYVRBCZCKZZP78TWS":3,"skill-same:01M7CPXKDYYVRBCZCKZZP78TWS":53},{"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":28,"repositoryHtmlUrl":29,"repositoryHomepageUrl":6,"ownerHtmlUrl":30,"ownerBlogUrl":6,"ownerDescription":31,"updatedAt":32,"install":33,"resources":46},"01M7CPXKDYYVRBCZCKZZP78TWS","nemo-mbridge-perf-moe-long-context",null,"Long-context MoE training guidance for Megatron Bridge. Covers CP sizing, selective recompute, dispatcher choices, and practical patterns from DSV3, Qwen3, and Qwen3-Next long-context experiments.","om-scogo\u002Fskillsh-scraper","om-scogo","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F160466840?v=4","01M79AWB6DFVCQ7RK70CS34B96","Om Achrekar","01M79AWB6ZM9SKR8KDH1WSSM22",0,"Apache-2.0","https:\u002F\u002Fgithub.com\u002Fom-scogo\u002Fskillsh-scraper\u002Fblob\u002Fmain\u002Fdata\u002Fskills\u002Fnvidia-skills\u002Fnemo-mbridge-perf-moe-long-context\u002FSkill.md",[],[],"2026-11-15 14:19:17",false,"---\nname: nemo-mbridge-perf-moe-long-context\ndescription: Long-context MoE training guidance for Megatron Bridge. Covers CP sizing, selective recompute, dispatcher choices, and practical patterns from DSV3, Qwen3, and Qwen3-Next long-context experiments.\nlicense: Apache-2.0\nwhen_to_use: Training MoE at long sequence lengths, or investigating a commit that caused long-context MoE OOM or degraded throughput; 'long context MoE', '128k tokens', 'CP sizing for long sequences', 'selective recompute long context', 'MoE long-context OOM'.\n---\n\n# MoE Long-Context Training\n\nStable docs: @docs\u002Ftraining\u002Fmoe-optimization.md\nCard: @skills\u002Fnemo-mbridge-perf-moe-long-context\u002Fcard.yaml\n\n## What Changes At Long Context\n\nOnce sequence length moves well past the 4K-class regime, attention memory and\nactivation residency become the dominant constraints. For MoE models, that\nusually means you need some combination of:\n\n- context parallelism\n- selective recompute\n- lower precision\n- CPU offload for optimizer state\n- a dispatcher and PP layout that do not waste the smaller remaining DP budget\n\n## Rounded Scaling Patterns\n\n### DSV3 on H100\n\nThe DSV3 long-context runs show a stable pattern:\n\n- selective recompute works better than full recompute once you move past the\n  shortest contexts\n- throughput stays in a fairly narrow band from mid-length through very long\n  contexts if CP is increased appropriately\n- the trade shifts from \"memory fit\" to \"GPU-count feasibility\" as CP grows\n\nIn other words, long context does not immediately collapse utilization if the\nlayout is chosen well, but it does consume the DP budget very quickly.\n\n### Qwen3-Next on GB200\n\nQwen3-Next behaves more like a memory-sensitive medium-scale model:\n\n- 8K and 32K remain practical with moderate CP\n- 64K is possible, but the throughput drop is noticeable and memory becomes\n  much tighter\n- pipeline layout and grouped-GEMM improvements matter almost as much as CP\n\n### Qwen3 235B on GB200\n\nQwen3 235B shows that long context can still be efficient on NVL72 systems when\nTP, CP, and HybridEP are coordinated. The best 128K-class configurations are\nnot just \"fit-only\" recipes; they can remain highly efficient if routing,\nparallelism, and recompute are balanced.\n\n## CP Sizing Rules Of Thumb\n\n1. **Start from a 4K shard target**: a good first guess is\n   `CP ~= seq_len \u002F 4096`, then round to a practical power-of-two layout.\n\n2. **Keep DP alive if possible**: long-context scaling becomes brittle once CP,\n   EP, TP, and PP together squeeze DP down to the floor.\n\n3. **Prefer selective recompute**: recompute modules such as `up_proj`, `norm`,\n   `moe`, `moe_act`, or `mlp` before reaching for full recompute.\n\n4. **Avoid SDPA-heavy recompute at very long context**: recomputing attention\n   internals can add a lot of work for less memory benefit than recomputing\n   smaller MoE and MLP-side modules.\n\n5. **Use TP as another lever on NVL72 systems**: GB200 and GB300 runs can\n   sometimes trade some CP for TP while still staying efficient.\n\n6. **Assume GBS will need to shrink**: as CP rises and DP falls, you may need\n   to reduce global batch size or accept higher GA.\n\n## Representative Config Families\n\n### DSV3 at 128K on H100\n\n```text\nTP=1  CP=32  EP=32  PP=8  VPP=4\nPrecision: FP8-class\nDispatcher: DeepEP\nRecompute: up_proj, norm, moe, mlp\nExtra memory help: optimizer CPU offload\n```\n\n### DSV3 at 256K on H100\n\n```text\nTP=1  CP=64  EP=32  PP=8  EDP=2  VPP=4\nPrecision: FP8-class\nDispatcher: DeepEP\nRecompute: up_proj, norm, moe, mlp\nExtra memory help: optimizer CPU offload\n```\n\n### Qwen3 235B at 128K on GB200\n\n```text\nTP=4  CP=4  EP=32  PP=4  VPP=12\nPrecision: BF16 or MXFP8\nDispatcher: HybridEP\nRecompute: moe_act, norm\nCUDA Graph: attn + moe_router + moe_preprocess\n```\n\n## Recompute And CUDA Graph Guidance\n\nFor long-context MoE training:\n\n- start with selective recompute\n- add CUDA graphs only after the shapes and routing path are stable\n- keep sequence length and MBS fixed when using CUDA graphs\n- if the run depends on highly dynamic batches, prefer eager execution\n\nUseful references:\n\n- @docs\u002Ftraining\u002Factivation-recomputation.md\n- @skills\u002Fnemo-mbridge-perf-cuda-graphs\u002FSKILL.md\n\n## Pitfalls\n\n1. **CP does not replace EP or PP**: it adds another dimension; it does not make\n   the others disappear.\n\n2. **A good 4K baseline can still be a bad long-context baseline**: routing mode,\n   recompute choice, and offload strategy often need to change.\n\n3. **GPU-count feasibility becomes the real constraint**: very long context can\n   look fine in a single recipe, then become impossible once EP and PP are added\n   honestly across the full model.\n\n4. **CUDA graphs need static shapes**: variable-length batches and opportunistic\n   padding strategies can silently break the path.\n\n5. **Container and kernel support matters more at 128K+**: long-context paths\n   tend to rely on newer kernels and bug fixes than short-context bring-up does.\n","# MoE Long-Context Training\n\nStable docs: @docs\u002Ftraining\u002Fmoe-optimization.md\nCard: @skills\u002Fnemo-mbridge-perf-moe-long-context\u002Fcard.yaml\n\n## What Changes At Long Context\n\nOnce sequence length moves well past the 4K-class regime, attention memory and\nactivation residency become the dominant constraints. For MoE models, that\nusually means you need some combination of:\n\n- context parallelism\n- selective recompute\n- lower precision\n- CPU offload for optimizer state\n- a dispatcher and PP layout that do not waste the smaller remaining DP budget\n\n## Rounded Scaling Patterns\n\n### DSV3 on H100\n\nThe DSV3 long-context runs show a stable pattern:\n\n- selective recompute works better than full recompute once you move past the\n  shortest contexts\n- throughput stays in a fairly narrow band from mid-length through very long\n  contexts if CP is increased appropriately\n- the trade shifts from \"memory fit\" to \"GPU-count feasibility\" as CP grows\n\nIn other words, long context does not immediately collapse utilization if the\nlayout is chosen well, but it does consume the DP budget very quickly.\n\n### Qwen3-Next on GB200\n\nQwen3-Next behaves more like a memory-sensitive medium-scale model:\n\n- 8K and 32K remain practical with moderate CP\n- 64K is possible, but the throughput drop is noticeable and memory becomes\n  much tighter\n- pipeline layout and grouped-GEMM improvements matter almost as much as CP\n\n### Qwen3 235B on GB200\n\nQwen3 235B shows that long context can still be efficient on NVL72 systems when\nTP, CP, and HybridEP are coordinated. The best 128K-class configurations are\nnot just \"fit-only\" recipes; they can remain highly efficient if routing,\nparallelism, and recompute are balanced.\n\n## CP Sizing Rules Of Thumb\n\n1. **Start from a 4K shard target**: a good first guess is\n   `CP ~= seq_len \u002F 4096`, then round to a practical power-of-two layout.\n\n2. **Keep DP alive if possible**: long-context scaling becomes brittle once CP,\n   EP, TP, and PP together squeeze DP down to the floor.\n\n3. **Prefer selective recompute**: recompute modules such as `up_proj`, `norm`,\n   `moe`, `moe_act`, or `mlp` before reaching for full recompute.\n\n4. **Avoid SDPA-heavy recompute at very long context**: recomputing attention\n   internals can add a lot of work for less memory benefit than recomputing\n   smaller MoE and MLP-side modules.\n\n5. **Use TP as another lever on NVL72 systems**: GB200 and GB300 runs can\n   sometimes trade some CP for TP while still staying efficient.\n\n6. **Assume GBS will need to shrink**: as CP rises and DP falls, you may need\n   to reduce global batch size or accept higher GA.\n\n## Representative Config Families\n\n### DSV3 at 128K on H100\n\n```text\nTP=1  CP=32  EP=32  PP=8  VPP=4\nPrecision: FP8-class\nDispatcher: DeepEP\nRecompute: up_proj, norm, moe, mlp\nExtra memory help: optimizer CPU offload\n```\n\n### DSV3 at 256K on H100\n\n```text\nTP=1  CP=64  EP=32  PP=8  EDP=2  VPP=4\nPrecision: FP8-class\nDispatcher: DeepEP\nRecompute: up_proj, norm, moe, mlp\nExtra memory help: optimizer CPU offload\n```\n\n### Qwen3 235B at 128K on GB200\n\n```text\nTP=4  CP=4  EP=32  PP=4  VPP=12\nPrecision: BF16 or MXFP8\nDispatcher: HybridEP\nRecompute: moe_act, norm\nCUDA Graph: attn + moe_router + moe_preprocess\n```\n\n## Recompute And CUDA Graph Guidance\n\nFor long-context MoE training:\n\n- start with selective recompute\n- add CUDA graphs only after the shapes and routing path are stable\n- keep sequence length and MBS fixed when using CUDA graphs\n- if the run depends on highly dynamic batches, prefer eager execution\n\nUseful references:\n\n- @docs\u002Ftraining\u002Factivation-recomputation.md\n- @skills\u002Fnemo-mbridge-perf-cuda-graphs\u002FSKILL.md\n\n## Pitfalls\n\n1. **CP does not replace EP or PP**: it adds another dimension; it does not make\n   the others disappear.\n\n2. **A good 4K baseline can still be a bad long-context baseline**: routing mode,\n   recompute choice, and offload strategy often need to change.\n\n3. **GPU-count feasibility becomes the real constraint**: very long context can\n   look fine in a single recipe, then become impossible once EP and PP are added\n   honestly across the full model.\n\n4. **CUDA graphs need static shapes**: variable-length batches and opportunistic\n   padding strategies can silently break the path.\n\n5. **Container and kernel support matters more at 128K+**: long-context paths\n   tend to rely on newer kernels and bug fixes than short-context bring-up does.\n",{"name":5,"license":15,"description":7,"when_to_use":24},"Training MoE at long sequence lengths, or investigating a commit that caused long-context MoE OOM or degraded throughput; 'long context MoE', '128k tokens', 'CP sizing for long sequences', 'selective recompute long context', 'MoE long-context OOM'.","main","8859218955d9504cd18b59e7892100718039d3b4","data\u002Fskills\u002Fnvidia-skills\u002Fnemo-mbridge-perf-moe-long-context",1,"https:\u002F\u002Fgithub.com\u002Fom-scogo\u002Fskillsh-scraper","https:\u002F\u002Fgithub.com\u002Fom-scogo","SDE-1 @ Scogo ","2026-07-18 12:22:46",{"source":8,"skillName":5,"commands":34,"prompt":44,"zipAvailable":45},[35,38,41],{"tool":36,"command":37},"npx","npx skills add om-scogo\u002Fskillsh-scraper --skill nemo-mbridge-perf-moe-long-context",{"tool":39,"command":40},"bunx","bunx skills add om-scogo\u002Fskillsh-scraper --skill nemo-mbridge-perf-moe-long-context",{"tool":42,"command":43},"pnpm","pnpm dlx skills add om-scogo\u002Fskillsh-scraper --skill nemo-mbridge-perf-moe-long-context","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fom-scogo\u002Fskillsh-scraper\u002Fblob\u002Fmain\u002Fdata\u002Fskills\u002Fnvidia-skills\u002Fnemo-mbridge-perf-moe-long-context\u002FSkill.md",true,[47],{"path":48,"resourceType":49,"resourceTypeDesc":50,"sizeBytes":51,"sourceHtmlUrl":52},"metadata.json","REFERENCE","参考文档",486,"https:\u002F\u002Fgithub.com\u002Fom-scogo\u002Fskillsh-scraper\u002Fblob\u002Fmain\u002Fdata\u002Fskills\u002Fnvidia-skills\u002Fnemo-mbridge-perf-moe-long-context\u002Fmetadata.json",[54,62,67,74,79,86],{"skillNo":55,"name":56,"nameZh":6,"description":57,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":58,"licenseFileUrl":6,"sourceHtmlUrl":59,"categories":60,"keywords":61,"publishedAt":19},"01M7D6MC9FAAEV4CMNYX8W7JTG","arxiv-search","Search arXiv physics, math, and computer science preprints using natural language queries. Powered by Valyu semantic search.","MIT","https:\u002F\u002Fgithub.com\u002Fom-scogo\u002Fskillsh-scraper\u002Fblob\u002Fmain\u002Fdata\u002Fskills\u002Fyorkeccak-scientific-skills\u002Farxiv-search\u002Fskills\u002Farxiv-search\u002FSKILL.md",[],[],{"skillNo":63,"name":56,"nameZh":6,"description":57,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":58,"licenseFileUrl":6,"sourceHtmlUrl":64,"categories":65,"keywords":66,"publishedAt":19},"01M7D6M85CKKN87TA98VCQV4H7","https:\u002F\u002Fgithub.com\u002Fom-scogo\u002Fskillsh-scraper\u002Fblob\u002Fmain\u002Fdata\u002Fskills\u002Fyorkeccak-scientific-skills\u002Farxiv-search\u002FSkill.md",[],[],{"skillNo":68,"name":69,"nameZh":6,"description":70,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":58,"licenseFileUrl":6,"sourceHtmlUrl":71,"categories":72,"keywords":73,"publishedAt":19},"01M7D4ZTCS4DR3CE4JY06X84T2","working-with-legacy-code","Safely change and test untested codebases using Feathers' \"Working Effectively with Legacy Code\". Use when the user mentions \"legacy code\", \"no tests\", \"untested codebase\", \"how do I test this\", \"seams\", \"characterization tests\", \"golden master\", \"sprout method\", \"afraid to change this code\", \"monster method\", \"dependency breaking\", or \"inherited a messy codebase\". Also trigger when changing code without tests safely, getting a class under test when constructors, statics, or singletons block it, adding features to tangled modules, or planning incremental test coverage for an old codebase. Covers the legacy-code change algorithm, seams, characterization tests, sprout\u002Fwrap, and dependency-breaking techniques. For refactoring code that already has tests, see refactoring-patterns. For day-to-day code quality, see clean-code.","https:\u002F\u002Fgithub.com\u002Fom-scogo\u002Fskillsh-scraper\u002Fblob\u002Fmain\u002Fdata\u002Fskills\u002Fwondelai-skills\u002Fworking-with-legacy-code\u002Fworking-with-legacy-code\u002FSKILL.md",[],[],{"skillNo":75,"name":69,"nameZh":6,"description":70,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":58,"licenseFileUrl":6,"sourceHtmlUrl":76,"categories":77,"keywords":78,"publishedAt":19},"01M7D4ZHZKJD2RSNGAF63V14P4","https:\u002F\u002Fgithub.com\u002Fom-scogo\u002Fskillsh-scraper\u002Fblob\u002Fmain\u002Fdata\u002Fskills\u002Fwondelai-skills\u002Fworking-with-legacy-code\u002FSkill.md",[],[],{"skillNo":80,"name":81,"nameZh":6,"description":82,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":58,"licenseFileUrl":6,"sourceHtmlUrl":83,"categories":84,"keywords":85,"publishedAt":19},"01M7D4ZB4CJBFW5JE67CPH2QRV","web-typography","Select, pair, and implement typefaces for web projects. Use when the user mentions \"font pairing\", \"which typeface\", \"line height\", \"responsive typography\", \"web font loading\", \"type hierarchy\", \"variable fonts\", \"FOUT\u002FFOIT\", \"typographic scale\", or \"the text is hard to read\". Also trigger when choosing between system fonts and web fonts, optimizing font-loading performance, or designing readable long-form content. Covers readability evaluation, CSS implementation, and performance optimization. For overall UI design systems, see refactoring-ui. For dramatic typographic experiences, see top-design.","https:\u002F\u002Fgithub.com\u002Fom-scogo\u002Fskillsh-scraper\u002Fblob\u002Fmain\u002Fdata\u002Fskills\u002Fwondelai-skills\u002Fweb-typography\u002Fweb-typography\u002FSKILL.md",[],[],{"skillNo":87,"name":81,"nameZh":6,"description":82,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":58,"licenseFileUrl":6,"sourceHtmlUrl":88,"categories":89,"keywords":90,"publishedAt":19},"01M7D4Z4MVYVY3NMJ18BNV6WNA","https:\u002F\u002Fgithub.com\u002Fom-scogo\u002Fskillsh-scraper\u002Fblob\u002Fmain\u002Fdata\u002Fskills\u002Fwondelai-skills\u002Fweb-typography\u002FSkill.md",[],[]]