Dev & Engineering ✓ NVIDIA · Official megatron-bridgehierarchical-context-parallelcontext-parallelismdistributed-trainingtransformer-enginecudapytest

NeMo MBridge Hierarchical Context Parallelism

Enable, troubleshoot, and verify hierarchical context parallelism in Megatron-Bridge.

FollowSkills review · FSRS-2.0
Not recommended
51/ 100 5-point scale 2.6 / 5
Trust15 / 25 · 3.0/5

The skill only guides configuration and log inspection; no malware, credential handling, or covert exfiltration is evident. It discloses the MPU-path, TE-version, and process-group constraints. Points are deducted because execution confirmation, rollback, permission boundaries, and data-flow disclosure are incomplete, and the supplied license metadata is NOASSERTION.

Reliability8 / 20 · 2.0/5

Configuration constraints, pitfalls, and failure-log signals are broadly consistent, with diagnosable assertions and log criteria. Static review cannot establish that the commands run successfully; there is no dedicated Bridge end-to-end test, and dependency or abnormal-environment feedback is thin, so the score remains below the static ceiling.

Adaptability10 / 15 · 3.3/5

The audience, trigger terms, CP=4 example, and MPU-only boundary are clear, including the non-fit decentralized-PG path. Broader input boundaries, model-family coverage, and Chinese-language guidance are absent. Mainland-China reachability is not specifically assessed, but the core function does not depend on an overseas online service, so no major additional deduction is applied.

Convention9 / 15 · 3.0/5

The skill is readable and layered around enablement, code anchors, implementation mapping, pitfalls, and verification; card.yaml adds limitations, evidence, and follow-up work. It lacks the recommended Instructions and Examples sections, author/tags, explicit maintenance ownership, changelog, and a clear stable-version policy; the evaluation files record these omissions.

Effectiveness5 / 15 · 1.7/5

It directly supports the core task of supplying configuration, constraints, the TE requirement, and log proof, and the supplied evaluation report shows limited correctness and effectiveness results. However, there is only one positive task and no Bridge HCP end-to-end training validation, so practical correctness and marginal benefit over manual work still require review; the static score is therefore conservative.

Verifiability4 / 10 · 2.0/5

Megatron-Core and Bridge code paths, assertions, log criteria, validation statuses, and an evaluation task provide some traceability. The evidence is mainly repository-local, without independent reproduction, tests covering the key HCP path, or multi-source corroboration, so the score stays below the static ceiling.

Evidence confidence:Low Reviewed Jul 20, 2026 Reviewed revision 55f18499943e
The upstream repository has new commits since this review. The score still applies to the reviewed revision shown and may not cover the latest changes.
Before you use it
  • Do not use the decentralized-PG path when HCP is expected; the supplied evidence says it creates only flat CP groups.
  • Before execution, confirm the Transformer Engine version, the product of hierarchical sizes, sequence-length divisibility, and logs containing HIERARCHICAL_CONTEXT_PARALLEL_GROUPS.
  • No checked-in Bridge HCP end-to-end training test or formal recipe is provided; add validation and a rollback plan before production use.
  • The benchmark report and skill card provide publication evidence but do not replace independent reproduction; license metadata remains NOASSERTION.
See the full review method →

What does this skill do, and when should you use it?

This skill is for engineers extending context parallelism in Megatron-Bridge. It explains nested context-parallel process groups configured with cp_comm_type="a2a+p2p" and hierarchical_context_parallel_sizes. It covers configuration constraints, Megatron-Core and Bridge code anchors, Transformer Engine integration, failure modes, and log-based verification. Bridge currently supports hierarchical context parallelism only through MPU, and no dedicated end-to-end test is provided.

Provides a minimal Bridge override for context_parallel_size, cp_comm_type, hierarchical_context_parallel_sizes, and use_decentralized_pg; identifies validation, process-group initialization, and Transformer Engine attention integration points; documents product and sequence-length constraints, silent failure risks on older stacks, and log markers for confirming HCP activation; supplies a decentralized-PG unit-test command and a 4-GPU manual smoke-test command.

  1. A Megatron-Bridge engineer needs to scale context parallelism beyond KV heads using multi-level process groups.
  2. A distributed-training engineer is investigating OOM or a performance regression after changing CP configuration.
  3. A maintainer needs to validate that hierarchical_context_parallel_sizes matches context_parallel_size when using a2a+p2p.
  4. A test engineer needs to verify HCP activation through an existing unit test, a 4-GPU run, and initialization logs.

What are this skill's strengths and limitations?

Pros
  • Includes a directly usable Bridge configuration and verification commands.
  • States the product, sequence-length, and Transformer Engine version constraints explicitly.
  • Maps configuration and initialization code while documenting silent failure risks and log-based diagnosis.
Limitations
  • Bridge currently supports HCP only through MPU; decentralized PG leaves HCP unset.
  • There is no dedicated Bridge HCP end-to-end test or checked-in Bridge recipe exercising HCP directly.
  • Single-GPU load helpers clear hierarchical_context_parallel_sizes.
  • The manual smoke check requires 4 GPUs, and the skill provides no evidence of broader platform coverage.

How do you install this skill?

Install the specific skill with the skills CLI command documented in the repository README:

npx skills add nvidia/skills --skill nemo-mbridge-perf-hierarchical-context-parallel --yes

The README does not document a separate manual-copy procedure or other skill-specific installation path.

How do you use this skill?

Ask a compatible Agent Skills client to configure, troubleshoot, or verify Megatron-Bridge hierarchical context parallelism, including OOM or regression investigations. For a manual check, run:

CUDA_VISIBLE_DEVICES=0,1,2,3 uv run python -m torch.distributed.run --nproc_per_node=4 \
scripts/training/run_recipe.py \
--recipe llama32_1b_pretrain_config \
model.context_parallel_size=4 \
model.cp_comm_type=a2a+p2p \
"model.hierarchical_context_parallel_sizes=[2,2]" \
train.train_iters=2

Confirm that logs create HIERARCHICAL_CONTEXT_PARALLEL_GROUPS and that training completes at least one step. If only CONTEXT_PARALLEL_GROUP appears, HCP is inactive.

How does this skill compare with similar options?

The skill explicitly references a2a+p2p, pure a2a, and p2p as context-parallel communication options and points to a decision tree, but it does not provide complete performance comparison data.

FAQ

What must be configured for a2a+p2p?
hierarchical_context_parallel_sizes must be set, its product must equal context_parallel_size, and Transformer Engine must be version 1.12.0 or newer.
Why might HCP remain inactive after configuration?
With use_decentralized_pg=True, Bridge currently initializes flat CP groups and leaves HCP unset. Also inspect logs for HIERARCHICAL_CONTEXT_PARALLEL_GROUPS.
Does the skill include a complete automated test?
No dedicated Bridge HCP end-to-end test exists. The documented approach uses existing unit tests, log inspection, and a manual smoke run.

More skills from this repository

All from NVIDIA/skills

Dev & Engineering ✓ NVIDIA · Official

NeMo MBridge CUDA Graphs

Configure, validate, and benchmark CUDA Graph capture in Megatron Bridge to reduce host-driver overhead.

Dev & Engineering ✓ NVIDIA · Official

NeMo MBridge GPU Memory Tuning

Diagnose GPU OOMs in Megatron Bridge training and reduce fragmentation, activation, and PEFT memory usage.

Dev & Engineering ✓ NVIDIA · Official

NeMo MBridge Parallelism Strategy Guide

Choose, combine, and validate Megatron Bridge parallelism configurations.

Dev & Engineering ✓ NVIDIA · Official

Megatron-Bridge Communication Overlap Guide

Configure and verify TP, DP, and PP communication overlap in Megatron-Bridge training.

Dev & Engineering ✓ NVIDIA · Official

NeMo MBridge MoE Performance Workflow

Systematically diagnose and improve MoE training throughput in Megatron Bridge.

Dev & Engineering ✓ NVIDIA · Official

NeMo MBridge Long-Context MoE Training

Practical Megatron Bridge guidance for sizing parallelism, managing memory, and preserving throughput in long-context MoE training.

Dev & Engineering ✓ NVIDIA · Official

Megatron Bridge Activation Recompute

Trade extra compute for lower GPU activation memory in Megatron Bridge training.

Dev & Engineering ✓ NVIDIA · Official

NeMo MBridge MoE Expert-Parallel Overlap

Configure, validate, and troubleshoot MoE expert-parallel communication overlap in Megatron-Bridge.

Dev & Engineering ✓ NVIDIA · Official

NeMo MBridge Sequence Packing

Configure and validate sequence packing and long-context training in Megatron-Bridge.

Dev & Engineering ✓ NVIDIA · Official

Megatron FSDP Configuration and Performance Guide

Enable, troubleshoot, and verify Megatron FSDP in Megatron-Bridge.

Dev & Engineering ✓ NVIDIA · Official

NeMo MBridge Recipe Recommender

Recommends adjustable Megatron Bridge recipes for your model, GPU budget, and training goal.

Dev & Engineering ✓ NVIDIA · Official

NeMo AutoModel Distributed Training

Choose and configure multi-GPU and multi-node training strategies for NeMo AutoModel.

Dev & Engineering ✓ NVIDIA · Official

NeMo MBridge Training Resiliency

Configure fault recovery and hang detection for Megatron Bridge distributed training.

Dev & Engineering ✓ NVIDIA · Official

NeMo MBridge CPU Offload

Configure, validate, and troubleshoot CPU offloading in Megatron Bridge to relieve GPU memory pressure.

Dev & Engineering ✓ NVIDIA · Official

NeMo MBridge Training Guide

Run Megatron-LM and Megatron Bridge training and verify whether their loss curves match.

Dev & Engineering ✓ NVIDIA · Official

NeMo MBridge MoE VLM Training Guide

Guides FSDP and 3D-parallel choices and tuning for MoE vision-language model training.

Dev & Engineering ✓ NVIDIA · Official

NeMo MBridge MoE Communication Overlap

Tune expert-parallel communication and computation overlap in Megatron Bridge.

Automation & Ops ✓ NVIDIA · Official

Megatron-LM on SLURM

Launch, monitor, and troubleshoot multi-node Megatron-LM training on SLURM GPU clusters.

Dev & Engineering ✓ NVIDIA · Official

cuPyNumeric Migration Readiness

Assess whether NumPy code is ready to scale on GPUs before committing to a substantial cuPyNumeric port.

Dev & Engineering ✓ NVIDIA · Official

NeMo AutoModel Recipe Development

Build, modify, and validate NeMo AutoModel training and evaluation recipes.

Related skills