NVIDIA/Megatron-LM

Ongoing research training transformer models at scale

View on GitHub ↗Jump to charts ↓

Summary Information

Updated 40 minutes ago
Added to GitGenius on February 25th, 2026
Created on March 21st, 2019
Open Issues & Pull Requests: 1,196 (+1)
Number of forks: 4,396
Total Stargazers: 17,555 (+1)
Total Subscribers: 167 (+0)

Repository Insights (GitGenius)

Median issue/PR response: 4.5 days
Mean response time: 164.1 days
90th percentile: 550.1 days
Tracked items: 1,340

How this project is maintained

Around half of the issues opened in the past year never receive a reply. 94% of open issues come from outside the core team, so the backlog reflects real-world use rather than internal planning. Work labelled "enhancement" is answered fastest, typically in about 26 hours, while "module: documentation" waits about 7 months. 27% of tracked open issues have had no activity in three months. Only 3% of issues opened in the past year have been closed.

Charts & Analytics

Fetching additional details & charts...

Issue Activity (beta)

Open issues: 393
New in 7 days: 21
Closed in 7 days: 11
Avg open age: 163 days
Stale 30+ days: 239
Stale 90+ days: 143

Recent activity

Opened in 7 days: 19
Closed in 7 days: 11
Comments in 7 days: 13
Events in 7 days: 101

Top labels

  • community-request (523)
  • bug (432)
  • stale (301)
  • enhancement (235)
  • question (184)
  • module: moe (97)
  • waiting-on-customer (79)
  • waiting-on-maintainers (63)

Detailed Description

Megatron-LM is a GPU-optimized library developed by NVIDIA for training transformer models at scale, containing two complementary components. Megatron-LM serves as a reference implementation with pre-configured training scripts designed for research teams and quick experimentation with distributed training. Megatron Core is a composable library providing GPU-optimized building blocks for developers constructing custom training frameworks, offering transformer building blocks, advanced parallelism strategies including tensor parallelism, pipeline parallelism, data parallelism, expert parallelism, and context parallelism, along with mixed precision support for FP16, BF16, FP8, and FP4 formats.

The repository demonstrates substantial production capability, successfully training models ranging from 2 billion to 462 billion parameters across thousands of GPUs. Performance benchmarking on H100 clusters achieves up to 47 percent Model FLOP Utilization on weak scaling tests, with superlinear scaling improvements as model size increases from 41 percent to 47-48 percent MFU. Strong scaling tests of a 175 billion parameter GPT-3 model scale from 96 to 4,608 H100 GPUs while maintaining consistent batch sizes, demonstrating practical scalability for production workloads.

The codebase is written in Python and maintains active development with significant community engagement.

Recent developments highlight expanding model architecture support and optimization techniques. The repository includes initial DeepSeek-V4 implementation on the development branch, support for emerging optimizers through the Emerging-Optimizers library, Falcon-H1 hybrid transformer-Mamba architecture contributions from Technology Innovation Institute, and dynamic context parallelism achieving up to 1.48x speedup for variable-length sequence training. Megatron Bridge provides bidirectional checkpoint conversion between Hugging Face and Megatron formats with production-ready recipes for popular models.

Installation options include PyPI packages or source compilation, with documentation available through NVIDIA's official guides covering installation, first training runs, parallelism strategies, and contribution procedures. The development process moved to open GitHub in December 2025, enabling transparent community contributions and continuous integration in public view.

Benchmark configurations specify vocabulary size of 131,072 tokens and sequence length of 4,096 tokens with varied model dimensions to achieve target parameter counts. Communication optimizations include fine-grained overlapping for data parallelism, tensor parallelism, and pipeline parallelism. The codebase includes comprehensive checkpointing and fault tolerance mechanisms for production training pipelines. Upcoming releases will drop Python 3.10 support, requiring downstream applications to adopt Python 3.12 or later for compatibility with Megatron Core 0.17.0 and subsequent versions.