Skip to main content
Training & Fine-tuningScale / performance

Megatron-LM

NVIDIA / Megatron-LM

NVIDIA’s large-scale Transformer training framework with tensor, pipeline, sequence and context parallelism, FP8, MoE and distributed checkpointing.

18.4k stars 4761 forks Python Language NOASSERTION License Last push 2026-11-20

Why choose it

  • Designed for multi-node large-model training.
  • Parallelism strategies are configurable rather than ad hoc.
  • FP8, MoE and distributed checkpoints are supported.

Not for

You want to fine-tune a 7B model on one GPU.
You do not have a multi-GPU cluster and a training team.

Minimum setup

  1. Run a small single-node example first.
  2. Record the parallelism layout, global batch size and throughput.
  3. Scale to two nodes and check checkpoint resume.

Dependencies and cost

Check runtime, model weights and external service dependencies in the README.

License and usage boundaries

Code is NOASSERTION; model weights, training data and generated content may have separate terms — check each before commercial use.

Open source is not automatically commercial-use friendly: GPL / AGPL are copyleft; code, model and output licenses are separate. Read the LICENSE and model card before launch, and involve legal when needed.

Alternatives and neighbors

  • DeepSpeed — Scale / performance,Microsoft's large-model training library: ZeRO, offload, mixed precision and MoE training to make VRAM and throughput usable.
  • TorchTitan — Scale / performance,PyTorch's official large-model training recipe: tensor parallelism, pipeline parallelism, FSDP and distributed checkpoints, following the Llama 3 path.
  • Unsloth — Start here,Accelerated QLoRA/LoRA fine-tuning: Triton kernels cut VRAM use and training time for 7B–70B models.

Next steps

  • Open GitHub and read the README, LICENSE, latest release and issues first.
  • Make an onboarding checklist for deployment dependencies, VRAM, data, network and permissions.
  • Run a small sample first, then decide on production; never start with production data.

GitHub repository ↗ Docs ↗ Add to compare

Snapshot: stars / forks / language / license / pushed_at come from the GitHub API snapshot on 2026-11-20; later changes are not written back. Tags and “fit / not fit” are editorial judgments, not GitHub metadata.
No endorsement: this site only indexes and flags risks; it does not audit code, guarantee security or make license decisions for you. Review repository scripts and model weights yourself.