Lattice
Skip to content

Megatron-LM

github.comlibraryself-hosted

Megatron-LM is a self-hosted library in the Fine-tuning & Training layer of the AI stack. Tensor and pipeline parallel training for multi-GPU clusters.

By Lattice editorial · Facts verified · method

licence
Apache-2.0
language
CUDA
cost
free

Use Megatron-LM when

Tensor and pipeline parallel pretraining at cluster scale.

Skip Megatron-LM when

You are fine-tuning rather than pretraining.

Produces the weights that layer 1 serves. — that is what this layer of the stack is answerable for. See the full Fine-tuning & Training section for the rest of the options.

Visit github.comCompare with another tool
Badge this entry
Lattice badge: Megatron-LM verified 2026-09
[![Megatron-LM on Lattice: verified 2026-09](https://lattice.kunjshah.in/fine-tuning/megatron-lm/badge.svg)](https://lattice.kunjshah.in/fine-tuning/megatron-lm)

Quick answers

Is Megatron-LM open source?
Yes. Megatron-LM is open source under the Apache-2.0 licence. It is free to use.
What are the alternatives to Megatron-LM?
The closest alternatives to Megatron-LM are DeepSpeed.

Reading on training

Alternatives to Megatron-LM

Listed as an alternative to

  • DeepSpeed

Also in training

  • Unsloth
  • Axolotl
  • LLaMA-Factory
  • PEFT
  • TRL
  • DeepSpeed
  • torchtune
  • Hugging Face TRL
  • Colab
  • Replicate
  • Weights & Biases Launch