Guide · Agent skill
How to use the Megatron-Core LLM training agent skill
Updated · written with AI from the project's own documentation and checked against our catalogue data
This guide explains the Megatron-Core large-scale LLM training agent skill (skill name training-llms-megatron) for people who have never installed an agent skill. It covers what the skill makes the agent do, how to install it, how to ask for help with natural requests, and what you need before relying on its output. The skill is aimed at ML engineers planning multi-GPU training of models above roughly 1B parameters.
Quick start
- 1Download the ZIP. Download the skill ZIP from this page.
- 2Unzip the skill folder. Unzip the file so the folder containing SKILL.md is available on your computer.
- 3Place it in your skills folder. Move the folder into ~/.claude/skills/ for personal use or into a project's .claude/skills/ folder.
- 4Or upload it in the Claude apps. In the Claude apps, open Settings, go to Capabilities, then Skills, and upload the ZIP.
- 5Prepare your environment. Install megatron-core with pip or use the NVIDIA PyTorch Docker container, and confirm your GPUs and data files are ready.
- 6Ask a specific training question. Describe your model size, GPU count and sequence length in a natural request.
- 7Review before running. Check every generated command, replace placeholder paths, and test on a small setup first.
What the Megatron-Core skill makes the agent do
An agent skill is a folder of written instructions and examples that an AI agent reads when your request matches the skill's description. This one covers training large language models, from about 2B to 462B parameters, with NVIDIA's Megatron-Core framework.
Once installed, the agent can help choose how to split a model across GPUs using tensor, pipeline, sequence, context and expert parallelism. It can also write launch commands and training settings, and point out metrics to watch such as GPU utilization. The skill does not run training by itself.
- Choosing a parallelism configuration by model size and GPU count
- Drafting torchrun launch commands and training hyperparameters
- Setting up Mixture of Experts (MoE) training with expert parallelism
- Listing performance metrics to track, such as Model FLOP Utilization (MFU)
- Troubleshooting low utilization, out-of-memory errors and slow training
Install the skill from a ZIP file
Download the skill ZIP from this page and unzip it. Put the resulting folder in one of these locations, depending on how you want to use it:
- Personal use across all projects: ~/.claude/skills/
- Single project only: the .claude/skills/ folder inside your project
- Claude apps: open Settings, go to Capabilities, then Skills, and upload the ZIP
Trigger the skill with a natural request
You do not need a special command. Describe your training task in plain language and mention the kind of help you want. The skill's description targets requests about models larger than 1B parameters, maximum GPU efficiency, and tensor, pipeline, sequence, context or expert parallelism.
- Plan how to split a 70B model across 64 H100 GPUs using tensor and pipeline parallelism.
- Write a launch script for LLaMA-style training on two nodes of eight GPUs each.
- Explain whether I need context parallelism for 8K-token sequences.
- Help me configure expert parallelism for an 8-expert MoE model.
- Why is my MFU below 30% and what should I change first?
Check what you need before you start
The skill lists its requirements. Confirm you have them before following any configuration it suggests. The guidance assumes large clusters, and a wrong configuration on real hardware costs compute money.
- Python with the megatron-core package installed with pip, or the NVIDIA PyTorch Docker container
- PyTorch, Apex and NVIDIA Transformer Engine, which are listed as dependencies
- NVIDIA GPUs, ideally H100 or A100 with multi-node networking
- Your own training data and tokenizer files
pip install megatron-coreSafety notes: scripts and network access
According to the skill metadata, it does not run scripts and does not use the network. It is written instructions only, so the agent's commands are for you to review and run yourself.
The example scripts use placeholder paths such as /path/to/data and /path/to/vocab.json. Replace them with your real locations and check every command before launching a job on a shared cluster.
- Review every torchrun or sbatch command before running it
- Test on a small configuration before starting a long multi-node run
- Do not assume the performance figures in the reference files will reproduce on your hardware
Tips for getting useful answers
Give the agent your model size, GPU type, GPU count, nodes and sequence length. The parallelism advice depends on these numbers. The skill also includes reference files on parallelism strategies, training recipes, benchmarks and production examples, which the agent can draw on for context.
- Start with a small model or a short run to check the setup
- Use the MFU and memory targets in the skill as starting points, not guarantees
- Ask the agent to explain why it chose each parallelism degree
What people use it for
- Planning tensor, pipeline and context parallelism for a 70B model on 64 H100 GPUs
- Configuring expert parallelism and MoE hyperparameters for an 8-expert model
- Tuning micro-batch size and parallelism to raise utilization on an existing cluster
- Diagnosing out-of-memory errors by adjusting recomputation or optimizer offloading settings
- Comparing Megatron-Core with FSDP, DeepSpeed or Accelerate for a planned large run
Frequently asked questions
How do I install the Megatron-Core training skill?
Download the skill ZIP from this page and unzip it. Place the folder in ~/.claude/skills/ for personal use or in a project's .claude/skills/ folder, or upload the ZIP in the Claude apps under Settings, Capabilities, Skills.
Is the Megatron-Core skill free?
The skill is listed under the MIT licence. The skill metadata does not state pricing for the framework, but training large models on GPUs incurs your own compute costs.
What do I need to use this skill?
You need Python with megatron-core, or the NVIDIA PyTorch Docker container, plus PyTorch, Apex and Transformer Engine. You also need NVIDIA GPUs, ideally H100 or A100 with multi-node networking, and your own training data and tokenizer files.
Does the skill run training for me?
No. The skill is a set of written instructions and examples. The agent helps plan and write configurations, but you run the commands yourself on your hardware.
Is this skill suitable for small models?
The skill targets models above roughly 1B parameters. For small models or single-GPU experiments, the setup overhead is usually not worth it and simpler tools are a better fit.
How does Megatron-Core compare with FSDP or DeepSpeed?
The skill suggests Megatron-Core for models above 10B parameters when you want maximum efficiency and fine-grained parallelism control on NVIDIA GPUs. It lists PyTorch FSDP and DeepSpeed as simpler alternatives for smaller or easier setups.
New agent skills, repos and AI tools — every week
The best new skills and open-source projects, the fastest-growing repos, and one free prompt. Five minutes to read. Unsubscribe anytime.
Our verdict
Use this skill if you are an ML engineer planning multi-GPU or multi-node training of large language models and you have access to NVIDIA H100 or A100 hardware. Pick a simpler tool such as FSDP, DeepSpeed or Accelerate if your models are small, you train on one GPU, or you do not have access to large NVIDIA clusters.
Download the skill