技能创建器
skill-creator
创建、改进和评估自定义技能,把专业流程转化为可重复使用的 AI 能力。
megatron-lm【数据与研究】Verified operating guidance for Megatron-LM and Megatron Core installation, distributed training, model parallelism, data, checkpoints, inference, optional RL/multimodal workflows, and repository maintenance.
独立 GitHub 快照 · 自动分类 · 以原作者文档为准
Use this repo skill when a task names Megatron-LM, Megatron Core, megatron.core, megatron.training, pretrain_gpt.py, Megatron distributed checkpoints, TP/PP/CP/EP/FSDP, Megatron inference, ModelOpt, Megatron RL, or this repository's CI/test workflows.
For package use, the public install surface is:
uv pip install megatron-core
python -c "import megatron.core as m; print(m.__version__)"
For source-checkout development, use an isolated Python environment and install the checkout editable:
uv pip install -e .
python -m pip check
python -c "import megatron.core as m; print(m.__version__)"
For package/import/backend questions, run the bundled probe at sub-skills/install-and-environment/scripts/check_megatron_environment.py:
python sub-skills/install-and-environment/scripts/check_megatron_environment.py --check-cuda
A CPU import is not evidence for NCCL, multi-GPU training, CUDA graphs, FP8, TransformerEngine, ModelOpt, or H100/GB200 behavior. Optional dependency warnings are evidence to classify the workflow, not errors to hide.
| User intent | Read |
|---|---|
| Install, import, Torch/CUDA, container, optional extras, build failure | sub-skills/install-and-environment/SKILL.md |
TransformerConfig, GPT/Hybrid/Mamba model construction, TP/PP/CP/EP/DP/FSDP choice, process groups | sub-skills/core-models-and-parallelism/SKILL.md |
Pretraining, torch.distributed.run, SLURM, tokenizer/data preprocessing, cache, mock data | sub-skills/training-cli-and-data/SKILL.md |
Save/load/resume, torch_dist, fsdp_dtensor, safe loading, GPT↔Hybrid/HF conversion | sub-skills/checkpointing-and-conversion/SKILL.md |
Offline generation, MegatronLLM, coordinator mode, OpenAI-compatible server | sub-skills/inference-and-serving/SKILL.md |
| ModelOpt, GRPO/RL, VLM, multimodal, MIMO, optional post-training | sub-skills/post-training-rl-and-multimodal/SKILL.md |
| Unit/functional tests, recipes, golden drift, CI, linting, PRs, base image, nightly sync | sub-skills/testing-ci-and-maintenance/SKILL.md |
core-models-and-parallelism before finalizing a training, inference, checkpoint, or RL command.checkpointing-and-conversion before changing parallelism or loading optimizer state.install-and-environment; do not install all extras as a substitute for diagnosis.testing-ci-and-maintenance; dev is the default lane and LTS is opt-in only when explicitly requested.For a new task, preserve this order:
Ask or require explicit authorization before:
This graph distills public repository evidence into self-contained references and safe command renderers. It does not replace the Megatron-LM checkout for executing repo-owned training/tests, nor does it claim every model, accelerator, benchmark, or optional integration is verified. The source snapshot and known limitations are recorded in references/repo-provenance.md and references/troubleshooting.md.