# Megatron-LM

> NVIDIA's GPU-optimized library for training transformer models at scale

Source: https://talira.ai/catalog/megatron-lm-71m2gb8k
Every listing: https://talira.ai/catalog.md

- Kind: Open source
- Types: Library, Framework
- Categories: [ai / ml / distributed training](https://talira.ai/categories/ai/ml/distributed-training)
- Licence: BSD-3-Clause[^1]
- Pricing: Free and open source[^1]
- Free tier: yes[^1]
- Backed by: [NVIDIA](https://talira.ai/orgs/nvidia.md)
- Funding: public company (NASDAQ:NVDA)[^2]

Megatron-LM is NVIDIA's repository for training transformer models at scale on GPUs. It has two parts: Megatron Core, a composable library of GPU-optimized building blocks (transformer layers, tensor, pipeline, data, expert and context parallelism, mixed precision down to FP8) for building your own training framework, and Megatron-LM itself, a reference with Megatron Core and ready-made training scripts for research and learning distributed training. Megatron Core is published on PyPI as `megatron-core`, and Megatron Bridge converts checkpoints between Hugging Face and Megatron formats.

## Links

- GitHub: https://github.com/NVIDIA/Megatron-LM
- Docs: https://docs.nvidia.com/megatron-core/developer-guide/latest/

## Problems it solves

- pretrain a large language model across hundreds of GPUs
- split a model too big for one GPU across many with tensor and pipeline parallelism
- train a mixture-of-experts model efficiently on NVIDIA GPUs

## Features

- tensor, pipeline, data, expert and context parallelism
- mixed precision training with FP16, BF16 and FP8
- composable transformer building blocks in Megatron Core
- ready-made training scripts in Megatron-LM

## Trust

Overall: 0.77 out of 1.
Signals: maintenance 1.00, adoption 0.85, momentum 0.70, community 1.00, backing 0.55, extensibility 0.00.

- last commit 4 days ago
- 915 commits in the last 90 days
- latest release core_v0.20.1 10 days ago
- 18.5k GitHub stars
- 460 contributors
- backed by NVIDIA
- funding: public company (NASDAQ:NVDA)

## Alternatives

- [Colossal-AI](https://talira.ai/catalog/colossal-ai-gk5zdz5s.md): PyTorch library for distributed training, fine-tuning and inference of large AI models
- [DeepSpeed](https://talira.ai/catalog/deepspeed-s351xcrz.md): Deep learning optimization library for training and serving very large models
- [torchtitan](https://talira.ai/catalog/torchtitan-8k0bb5qf.md): A PyTorch-native platform for training generative AI models at scale
- [nanochat](https://talira.ai/catalog/nanochat-cm4xw7vw.md): The best ChatGPT that $100 can buy
- [MiniMind](https://talira.ai/catalog/minimind-7eb46pp5.md): Train a 64M-parameter language model from scratch in about two hours

## Sources

[^1]: https://github.com/NVIDIA/Megatron-LM/blob/main/LICENSE (checked 26 Nov 2026)
[^2]: https://investor.nvidia.com/home/default.aspx (checked 20 Nov 2026)
