megatron-lm

Configure GPU cluster parallelism and manage Megatron-LM training workflows.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/tylertitsworth/skills --skill megatron-lm
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: megatron-lm
Source: https://github.com/tylertitsworth/skills/tree/main/megatron-lm
Command: npx skills add https://github.com/tylertitsworth/skills --skill megatron-lm

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Megatron-LM enables scalable training of transformer models at massive parameter counts across GPU clusters.

Core Features & Use Cases

  • Parallelism configuration for tensor, pipeline, context, and MoE experts.
  • Data loading, tokenization, and HuggingFace integration for large-scale training.
  • Checkpoint management and Megatron Bridge conversion to/from HuggingFace.
  • Use Cases: training Megatron-sized models, MoE training, conversion workflows.

Quick Start

Configure a multi-node GPU cluster with tensor, pipeline, and context parallelism, then run the Megatron-LM training script to start a scalable model training job.

Frequently Asked Questions about megatron-lm

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I configure tensor and pipeline parallelism for distributed transformer training?

To scale transformer training, you configure tensor, pipeline, sequence, context, and expert parallelism across a multi-node GPU cluster. This distributes massive parameter counts efficiently during the training process.

Can I convert HuggingFace checkpoints to Megatron format?

Yes, you can convert checkpoints between HuggingFace and Megatron formats using Megatron Bridge. This enables seamless integration for large-scale training workflows and model deployment.

Do I need NVIDIA GPUs with CUDA to run Megatron training?

Yes, NVIDIA GPUs with CUDA are required for Megatron training. The environment also needs PyTorch and Megatron Core, with optional Megatron Bridge support for checkpoint conversion.

What is the best way to train Mixture of Experts models across GPU clusters?

Training MoE models across GPU clusters requires configuring expert parallelism alongside tensor, pipeline, and context parallelism. This scales massive transformer models while managing mixed precision and data loading.

How does mixed precision work when training large transformer models?

Mixed precision in large transformer training optimizes GPU memory usage and computational speed across distributed clusters. It is managed natively during the scalable training process for models with massive parameter counts.

What are the limitations of using Megatron for transformer training?

Megatron training is limited to NVIDIA GPU clusters with CUDA and requires PyTorch, Megatron Core, and optional Megatron Bridge. It is designed for massive parameter scales and requires multi-node deployment infrastructure.