[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7A9JTJYQCEE2Z34RHT6M28W":3,"skill-same:01M7A9JTJYQCEE2Z34RHT6M28W":73},{"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":30,"ownerHtmlUrl":31,"ownerBlogUrl":32,"ownerDescription":33,"updatedAt":34,"install":35,"resources":48},"01M7A9JTJYQCEE2Z34RHT6M28W","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.","themusebook\u002Fskills","themusebook","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F349927247?v=4","01M7A5C1RV5S3V5FF6ZACVDNRN","musebook","01M7A5C1SFC3KRZAXNN60XJ7KM",0,"Apache-2.0","https:\u002F\u002Fgithub.com\u002Fthemusebook\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fnvidia\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","1c523aba5cdf867a79f078847075492d7778092a","skills\u002Fnvidia\u002Fnemo-mbridge-perf-moe-long-context",1,"https:\u002F\u002Fgithub.com\u002Fthemusebook\u002Fskills","https:\u002F\u002Fskills.x402.wtf","https:\u002F\u002Fgithub.com\u002Fthemusebook","https:\u002F\u002Fmusebook.trade","The official Github of musebook","2026-11-02 23:42:26",{"source":8,"skillName":5,"commands":36,"prompt":46,"zipAvailable":47},[37,40,43],{"tool":38,"command":39},"npx","npx skills add themusebook\u002Fskills --skill nemo-mbridge-perf-moe-long-context",{"tool":41,"command":42},"bunx","bunx skills add themusebook\u002Fskills --skill nemo-mbridge-perf-moe-long-context",{"tool":44,"command":45},"pnpm","pnpm dlx skills add themusebook\u002Fskills --skill nemo-mbridge-perf-moe-long-context","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fthemusebook\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fnvidia\u002Fnemo-mbridge-perf-moe-long-context\u002FSKILL.md",true,[49,55,59,63,67],{"path":50,"resourceType":51,"resourceTypeDesc":52,"sizeBytes":53,"sourceHtmlUrl":54},"BENCHMARK.md","REFERENCE","参考文档",4357,"https:\u002F\u002Fgithub.com\u002Fthemusebook\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fnvidia\u002Fnemo-mbridge-perf-moe-long-context\u002FBENCHMARK.md",{"path":56,"resourceType":51,"resourceTypeDesc":52,"sizeBytes":57,"sourceHtmlUrl":58},"card.yaml",3531,"https:\u002F\u002Fgithub.com\u002Fthemusebook\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fnvidia\u002Fnemo-mbridge-perf-moe-long-context\u002Fcard.yaml",{"path":60,"resourceType":51,"resourceTypeDesc":52,"sizeBytes":61,"sourceHtmlUrl":62},"evals\u002Fevals.json",1601,"https:\u002F\u002Fgithub.com\u002Fthemusebook\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fnvidia\u002Fnemo-mbridge-perf-moe-long-context\u002Fevals\u002Fevals.json",{"path":64,"resourceType":51,"resourceTypeDesc":52,"sizeBytes":65,"sourceHtmlUrl":66},"skill-card.md",3922,"https:\u002F\u002Fgithub.com\u002Fthemusebook\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fnvidia\u002Fnemo-mbridge-perf-moe-long-context\u002Fskill-card.md",{"path":68,"resourceType":69,"resourceTypeDesc":70,"sizeBytes":71,"sourceHtmlUrl":72},"skill.oms.sig","OTHER","其他",4829,"https:\u002F\u002Fgithub.com\u002Fthemusebook\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fnvidia\u002Fnemo-mbridge-perf-moe-long-context\u002Fskill.oms.sig",[74,83,90,97,104,111],{"skillNo":75,"name":76,"nameZh":6,"description":77,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":78,"licenseFileUrl":79,"sourceHtmlUrl":80,"categories":81,"keywords":82,"publishedAt":19},"01M7AB34SPKVSDRRG009PM1CZH","youtube-clipper","YouTube 视频智能剪辑工具。下载视频和字幕，AI 分析生成精细章节（几分钟级别）， 用户选择片段后自动剪辑、翻译字幕为中英双语、烧录字幕到视频，并生成总结文案。 使用场景：当用户需要剪辑 YouTube 视频、生成短视频片段、制作双语字幕版本时。 关键词：视频剪辑、YouTube、字幕翻译、双语字幕、视频下载、clip video","MIT","https:\u002F\u002Fgithub.com\u002Fthemusebook\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fyoutube-clipper\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fthemusebook\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fyoutube-clipper\u002FSKILL.md",[],[],{"skillNo":84,"name":85,"nameZh":6,"description":86,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":78,"licenseFileUrl":6,"sourceHtmlUrl":87,"categories":88,"keywords":89,"publishedAt":19},"01M7AB18BH6N7KR7939HRNWVMQ","viem-integration","Integrate EVM blockchains using viem. Use when user says \"read blockchain data\", \"send transaction\", \"interact with smart contract\", \"connect to Ethereum\", \"use viem\", \"use wagmi\", \"wallet integration\", \"viem setup\", or mentions blockchain\u002FEVM development with TypeScript.","https:\u002F\u002Fgithub.com\u002Fthemusebook\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fviem-integration\u002FSKILL.md",[],[],{"skillNo":91,"name":92,"nameZh":6,"description":93,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":78,"licenseFileUrl":6,"sourceHtmlUrl":94,"categories":95,"keywords":96,"publishedAt":19},"01M7AB12GHGP48WCNXDQQ9222H","v4-security-foundations","Security-first Uniswap v4 hook development. Use when user mentions \"v4 hooks\", \"hook security\", \"PoolManager\", \"beforeSwap\", \"afterSwap\", or asks about V4 hook best practices, vulnerabilities, or audit requirements.","https:\u002F\u002Fgithub.com\u002Fthemusebook\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fv4-security-foundations\u002FSKILL.md",[],[],{"skillNo":98,"name":99,"nameZh":6,"description":100,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":78,"licenseFileUrl":6,"sourceHtmlUrl":101,"categories":102,"keywords":103,"publishedAt":19},"01M7AB0XM3PSR7V3Q2ZRR0Q0FB","v4-sdk-integration","App-layer SDK guide for building swap and liquidity experiences directly with the Uniswap v4 SDK. Use when user asks about \"v4 sdk\", \"uniswap v4\", \"v4 swap\", \"v4 liquidity\", \"PoolManager\", \"V4Planner\", \"StateView\", \"PositionManager\", \"pool state\", \"v4 position\", \"uniswap sdk\", or when building swap\u002Fliquidity UX directly with SDKs rather than via the Trading API.","https:\u002F\u002Fgithub.com\u002Fthemusebook\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fv4-sdk-integration\u002FSKILL.md",[],[],{"skillNo":105,"name":106,"nameZh":6,"description":107,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":78,"licenseFileUrl":6,"sourceHtmlUrl":108,"categories":109,"keywords":110,"publishedAt":19},"01M7AB0SGA93ASA588DJW4P9WT","v4-hook-generator","Generate Uniswap v4 hook contracts via OpenZeppelin MCP. Use when building custom swap logic, async swaps, hook-owned liquidity, custom curves, dynamic fees, MEV protection, limit orders, or oracle hooks.","https:\u002F\u002Fgithub.com\u002Fthemusebook\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fv4-hook-generator\u002FSKILL.md",[],[],{"skillNo":112,"name":113,"nameZh":6,"description":114,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":78,"licenseFileUrl":6,"sourceHtmlUrl":115,"categories":116,"keywords":117,"publishedAt":19},"01M7AAZYH75H4CS03WSW2EZ8DM","testing","For testing with Light Protocol programs and clients on localnet, devnet, and mainnet validation.","https:\u002F\u002Fgithub.com\u002Fthemusebook\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Ftesting\u002FSKILL.md",[],[]]