Operational guide for enabling hierarchical context parallelism in Megatron-Bridge, including config knobs, code anchors, pitfalls, and verification.
SkillScore100Maintained
Automatic
◆AI Engineer pack
Last verified 8/12/2026
What it changes
Passed 20 of 20 test cases with the skill, and 7 of 20 without it.
Without skill36%
With skill100%
Checks it passed that the model alone missed
Sets train.train_iters=2
Includes --nproc_per_node=4
Specifies cp_comm_type as 'a2a+p2p'
and 22 more in the full report
14 fixed8 passed either way0 still failing0 broke
Pass-rate lift
+64 pp
Tokens
+13%
Agent turns
0%
Response time
-61%
Model gemini-3.6-flashMeasured 8/12/2026v122 of 22 cases passed with skill · 20 comparable
Tokens, turns and time describe resource use, not a dollar price.
See it in action
One of 12 test cases the skill fixed. Same model, same prompt, with and without the skill.
1 of 12
Prompt
In Megatron-LM command line argument parsing (`arguments.py`), what specific assertion condition checks whether `a2a+p2p` mode is provided without defining sub-group sizes?
What was checked, without and with the skill
Checked
Without skill
With skill
States that hierarchical_context_parallel_sizes must not be None when a2a+p2p is in cp_comm_type
Missed
Passed
case-07 · gemini-3.6-flash · 8/12/2026 · answers are capped and redacted
What's inside
The instructions your model reads when the skill loads.
SKILL.md138 linessingle file
Hierarchical Context Parallel Skill
This skill covers hierarchical context parallelism: nested context-parallel process
groups used by cp_comm_type="a2a+p2p" and configured with
hierarchical_context_parallel_sizes.
For what hierarchical CP is, when to use it, and the decision tree
(a2a+p2p vs pure a2a vs p2p), see:
context_parallel_size: int = 1
"""Splits network input along sequence dimension across GPU ranks."""
hierarchical_context_parallel_sizes: Optional[list[int]] = None
"""Degrees of the hierarchical context parallelism. Users should provide a list to specify
the sizes for different levels. Taking the a2a+p2p cp comm type as example, it contains