perf-hierarchical-context-parallel
CommunityEnable hierarchical CP for faster scale-out
System Documentation
What problem does it solve?
This Skill helps you correctly enable and validate hierarchical context parallelism (HCP) in Megatron-Bridge when using cp_comm_type="a2a+p2p", preventing misconfiguration that can cause OOM, regressions, or silently broken training.
Core Features & Use Cases
- Configuration recipe for HCP: Sets the required knobs (context_parallel_size, cp_comm_type, hierarchical_context_parallel_sizes, and Bridge PG mode) to match Megatron-LM expectations.
- Decision-aware setup guidance: Anchors the key guidance for hierarchical CP and points you to the internal docs/card for the “why” and selection logic.
- Pitfall prevention + verification checks: Provides concrete constraints (product and divisibility), explains common failure modes, and tells you how to verify group creation via logs.
Quick Start
Enable hierarchical context parallelism by setting model.context_parallel_size=4, model.cp_comm_type=a2a+p2p, model.hierarchical_context_parallel_sizes=[2,2], and dist.use_decentralized_pg=false, then launch a small multi-GPU run and confirm logs show HIERARCHICAL_CONTEXT_PARALLEL_GROUPS.
Dependency Matrix
Required Modules
None requiredComponents
Standard package💻 Claude Code Installation
Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.
Please help me install this Skill: Name: perf-hierarchical-context-parallel Download link: https://github.com/yo-steven/skills-exploration-20260522/archive/main.zip#perf-hierarchical-context-parallel Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
Agent Skills Search Helper
Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.