Instructions file CodexOpenCode
AGENTS.md instructions for NVIDIA-NeMo/Megatron-Bridge, covering agents.md — megatron bridge, skills, boundaries, toolchain and code style.
Instructions file CodexOpenCode
AGENTS.md instructions for NVIDIA-NeMo/Megatron-Bridge, covering agents.md — megatron bridge, skills, boundaries, toolchain and code style.
Instructions file
Claude Code instructions for NVIDIA-NeMo/Megatron-Bridge, a project described as: Training library for Megatron-based models with bidirectional Hugging Face conversion capability.
Skill Claude CodeCodex
Guide for adding support for new LLM or VLM models in Megatron-Bridge. Covers bridge, provider, recipe, tests, docs, and examples.
Skill Claude CodeCodex
Dev environment setup for Megatron Bridge — container-based development, uv package management, lockfile regeneration, adding dependencies, Slurm container usage, and common build pitfalls.
Skill Claude CodeCodex
Bump a pinned dependency (TransformerEngine, Megatron-LM, NRX, etc.), regenerate the lockfile, open a PR, and drive it to green by attaching a watchdog to the "CICD NeMo" workflow and quarantining failing functional tests as flaky until the run is green.
Skill Claude CodeCodex
CI/CD reference for Megatron Bridge — pipeline structure, commit and PR workflow, CI failure investigation, and common failure patterns.
Skill Claude CodeCodex
Create or update concise, agent-readable Megatron Bridge model verification cards. Use when adding a model support card, auditing cross-model convergence comparability or verification coverage, recording conversion, deterministic inference, training, checkpoint resume, post-SFT export, performance, or weak-scaling…
Skill Claude CodeCodex
Code style and quality rules for Megatron Bridge — ruff configuration, naming conventions, type hints, mypy rules, docstrings, copyright headers, logging, and the code review checklist.
Skill Claude CodeCodex
Analyze and compare PyTorch CUDA memory snapshots produced by Megatron Bridge's ProfilingConfig(recordmemoryhistory=True). Replays the recorded allocation timeline to plot memory over time, compare two runs, and attribute peak memory to source code locations.
Skill Claude CodeCodex
Run Megatron-LM (MLM) and Megatron Bridge training with mock or real data. Covers correlation testing, available recipes, and multi-GPU examples.
Skill Claude CodeCodex
Convert single-node scripts to multi-node Slurm sbatch jobs and debug common multi-node failures. Covers srun-native vs uv run torch.distributed approaches, container setup, NCCL timeouts, OOM sizing for MoE models, and interactive allocation.
Skill Claude CodeCodex
Validate and use selective and full activation recompute in Megatron Bridge to reduce GPU memory usage at the cost of extra compute. Use for activation memory OOMs or regressions involving recomputegranularity, recomputenumlayers, recomputemodules, recomputemethod, selective recompute, full recompute, or activation…
Skill Claude CodeCodex
Validate and use CPU offloading in Megatron Bridge, including layer-level activation offloading and fractional optimizer state offloading with HybridDeviceOptimizer.
Skill Claude CodeCodex
Profile, validate, and use CUDA graph capture in Megatron Bridge, including local full-iteration graphs and Transformer Engine scoped graphs. Covers replay evidence, matched eager A/Bs, model-specific scopes, regressions, and failures.
Skill Claude CodeCodex
Validate and use MoE expert-parallel communication overlap in Megatron-Bridge, including overlapmoeexpertparallelcomm, delaywgradcompute, and flex dispatcher backends such as DeepEP and HybridEP.
Skill Claude CodeCodex
Operational guide for enabling hierarchical context parallelism in Megatron-Bridge, including config knobs, code anchors, pitfalls, and verification.
Skill Claude CodeCodex
Operational guide for enabling Megatron FSDP in Megatron-Bridge, including config knobs, code anchors, pitfalls, and verification.
Skill Claude CodeCodex
Techniques for reducing peak GPU memory in Megatron Bridge, including expandable segments, PEFT plus sequence-parallel input re-gather, parallelism resizing, activation recompute, CPU offloading constraints, and common OOM fixes. Use for GPU OOMs, inadequate memory headroom, LoRA or PEFT activation pressure, memory…
Skill Claude CodeCodex
MoE expert-parallel communication overlap in Megatron Bridge. Covers dispatch/combine overlap, flex dispatcher backends, and expert wgrad scheduling.
Skill Claude CodeCodex
Select and validate an MoE token dispatcher (alltoall, DeepEP, or HybridEP) for a fixed workload and runtime. Covers backend availability, topology, matched A/B evidence, routing semantics, and failure diagnosis. Use when choosing a dispatcher or tracing a regression or crash to the MoE dispatcher configuration.
Skill Claude CodeCodex
Representative, point-in-time MoE training playbooks by hardware and model family. Use them as candidate seeds, then revalidate the exact runtime, semantics, topology, and steady-state throughput.
Skill Claude CodeCodex
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.
Skill Claude CodeCodex
Evidence-gated workflow for MoE performance optimization in Megatron Bridge. Covers measurement contracts, the Three Walls framework, parallel folding, profiling, matched A/B tuning, and final validation. Use for full MoE throughput tuning or diagnosing a regression involving memory, communication, compute, or…
Skill Claude CodeCodex
Practical guidance for training MoE VLMs in Megatron Bridge. Compares FSDP and 3D-parallel approaches, using rounded lessons from Qwen3-VL, Qwen3-Next, and other multimodal experiments.