perf-hybrid-context-parallel

Configure and validate hierarchical context parallelism parameters in Megatron-Bridge.

852|445|Updated May 21, 2025
One-click install
npx skills add https://github.com/NVIDIA-NeMo/Megatron-Bridge --skill perf-hybrid-context-parallel
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: perf-hybrid-context-parallel
Source: https://github.com/NVIDIA-NeMo/Megatron-Bridge/tree/main/skills/perf-hybrid-context-parallel
Command: npx skills add https://github.com/NVIDIA-NeMo/Megatron-Bridge --skill perf-hybrid-context-parallel

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill provides guidance and configuration instructions for enabling hierarchical context parallelism in Megatron-Bridge, helping users scale model training efficiently.

Core Features & Use Cases

  • Configuration Guidance: Explains how to set context_parallel_size and hierarchical_context_parallel_sizes.
  • Validation & Constraints: Details the validation rules for hierarchical parallelism parameters and available code anchors.
  • Use Case: Use this Skill when scaling Megatron models beyond KV heads or troubleshooting OOM issues related to context parallelism; for example, deploying a large model with layered parallel splits.

Quick Start

Refer to the provided documentation and code snippets to activate hierarchical context parallelism in your Megatron-Bridge setup.

Frequently Asked Questions about perf-hybrid-context-parallel

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I configure hierarchical context parallelism in Megatron-Bridge?

To configure hierarchical context parallelism in Megatron-Bridge, set the `context_parallel_size` and `hierarchical_context_parallel_sizes` parameters. This Skill provides configuration guidance and validation rules to ensure correct parallelism setup and prevent training failures.

When do I need hierarchical context parallelism for transformer training?

You need hierarchical context parallelism when scaling Megatron models beyond KV heads or troubleshooting OOM issues related to context parallelism. It enables efficient scaling of large-scale transformer training workloads with layered parallel splits.

Why does context parallelism fail or cause training regressions in Megatron?

Context parallelism fails due to misconfigurations of hierarchical parallelism parameters and Transformer Engine version incompatibility. This Skill validates parameter constraints and provides code anchors to avoid these training regressions and failures.

Can I use hierarchical context parallelism without knowing Megatron's parallel setup?

No, using hierarchical context parallelism requires prior knowledge of Megatron's parallel setup and Transformer Engine version compatibility. This Skill targets model developers and system architects implementing large-scale transformer training.

What are the validation rules for hierarchical context parallelism parameters?

Validation rules for hierarchical context parallelism parameters govern the correct configuration of `context_parallel_size` and `hierarchical_context_parallel_sizes`. This Skill details these constraints and provides code anchors to ensure valid parameter combinations.