I. Purpose Megatron-LM is NVIDIA's ongoing research project for large-scale Transformer model training. This repository contains two components: Megatron-LM and Megatron Core. Megatron-LM is a reference example that includes Megatron Core along with preconfigured training scripts, suitable for research teams, learning distributed training, and rapid experimentation. Megatron Core is a composable library that provides GPU-optimized building blocks for building custom training frameworks, suitable for framework developers and machine learning engineers building custom training pipelines.
II. Main Capabilities Megatron Core provides Transformer building blocks, advanced parallelism strategies (TP, PP, DP, EP, and CP), mixed precision support (FP16, BF16, FP8, and FP4), and model architectures. Megatron Bridge provides bidirectional conversion between Hugging Face and Megatron checkpoints, along with production-ready recipes for commonly used models.
According to official materials, the code can efficiently train models from 2B to 462B parameters on thousands of GPUs, reaching up to 47% model FLOP utilization (MFU) on H100 clusters. In the benchmark configuration, the vocabulary size is 131,072 tokens, the sequence length is 4,096 tokens, and the target parameter count is reached by varying the hidden layer size, number of attention heads, and number of layers; in terms of communication optimization, it supports DP (--overlap-grad-reduce, --overlap-param-gather), TP (--tp-comm-overlap), and PP overlap, which is enabled by default. Officially, it is stated that benchmarking of 462B parameter model training has been successfully conducted on 6,144 H100 GPUs, showing superlinear scaling, with MFU increasing from 41% to 47-48% as model size grows, and throughput includes all operations such as data loading, optimizer steps, communication, and logging, and it has checkpointing and fault tolerance capabilities. Note: The official description states that the performance results were not trained to convergence. The strong scaling test scaled the standard GPT-3 model (slightly over 175 billion parameters due to the larger vocabulary) from 96 H100 GPUs to 4,608, with a batch size of 1,152 sequences in all cases; communication becomes more noticeable at larger scales, and MFU drops from 47% to 42%.
-
Usage Can be installed from PyPI, or by cloning the source code and then installing. Building from source may consume a large amount of memory. If there is insufficient memory during building, the number of parallel compilation jobs can be limited by setting MAX_JOBS (for example: MAX_JOBS=4 uv pip install -e .). For NVIDIA GPU Cloud (NGC) container setup and all installation options, see the installation guide. For the first round of training, refer to the end-to-end training example and data preparation.
-
Updates and Ecosystem (based on official materials) 2026/05: The dev branch of Megatron Core includes a preliminary implementation of DeepSeek-V4, and Megatron Bridge provides conversion, inference, and pretraining recipes. 2026/04: Through the new Emerging-Optimizers library, emerging optimizers such as Muon are now supported in Megatron Core. 2026/03: A technical report on MoE training scaling was released; TII contributed the Falcon-H1 hybrid transformer-Mamba architecture and BitNet ternary quantization support; the Megatron Core roadmap was released; it was announced that the upcoming 0.17.0 release will drop support for Python 3.10, and downstream applications need to raise the minimum to 3.12 to maintain compatibility. 2026/01: Dynamic context parallelism achieved up to 1.48x speedup in variable-length sequence training. 2025/12: Megatron Core development moved to GitHub, with all development and CI conducted publicly. 2025/10: An early access development branch and the Megatron Bridge bidirectional converter were released. 2025/08: The MoE Q3-Q4 2025 roadmap was released; the GPT-OSS model integrated YaRN RoPE scaling, attention sinks, and custom activation functions, etc. 2025/06: The Megatron MoE model library was released, including best practices, optimized configurations, performance benchmarks, and checkpoint conversion tools for DeepSeek-V3, Mixtral, and Qwen3 MoE models.
-
Applicable Scenarios Suitable for research teams to learn and practice distributed training and conduct rapid experiments; also suitable for framework developers and ML engineers to build custom training pipelines based on Megatron Core, as well as for those who need to train large-parameter Transformer models on large-scale GPU clusters.Scenarios.
-
Limitations The current materials do not provide information such as fees, pricing, license terms, specific platform support scope (other than NVIDIA GPU-related descriptions), or performance data after training convergence. Official performance results are explicitly not trained to convergence. Building from source may consume a large amount of memory. Python 3.10 will be dropped in version 0.17.0, and downstream applications need to raise it to 3.12.