Megatron-LM and Megatron Core provide GPU-oriented building blocks and scripts for training transformer models at scale. They target research experimentation and custom large-model training frameworks.
Overview
Megatron-LM bundles Megatron Core with ready-made training scripts for teams that want an opinionated starting point for distributed transformer training. Megatron Core itself is a composable library of GPU-optimized modules, parallelism strategies, mixed-precision paths, and model architectures for engineers embedding training into their own stacks.
Megatron Core documents tensor, pipeline, data, expert, and context parallelism, along with precisions such as FP16, BF16, FP8, and FP4. Megatron Bridge is referenced for bidirectional checkpoint conversion between Hugging Face and Megatron formats. Install paths include PyPI packages or source builds, with NGC container images noted for NVIDIA environments.
Documentation walks through minimal multi-GPU sanity loops, larger example jobs such as LLaMA-scale training scripts, and preprocessing pipelines that tokenize JSONL into binary training shards. Performance summaries publish throughput figures for named models on NVIDIA systems under stated benchmark conditions.
The work is research and infrastructure oriented rather than an end-user application: you bring datasets, cluster hardware, and orchestration, then use Megatron APIs and scripts to run training and scaling experiments.
Key features
- Megatron Core composable training modules
- Megatron-LM reference training scripts
- TP, PP, DP, EP, and CP parallelism
- Mixed FP16, BF16, FP8, FP4 training
- Hugging Face checkpoint bridge tooling
- LLaMA-style example training scripts
- JSONL to binary data preprocessing
- Published GPU throughput benchmarks
Use cases
- Research teams learning distributed LLM training
- Custom frameworks built on Megatron Core
- Large transformer pretraining on NVIDIA GPUs
- Converting checkpoints with Megatron Bridge
- Validating multi-GPU training environments