torchtitan
PyTorch-native platform for large-scale generative AI pretraining with FSDP2, 4D parallelism, and float8.
About
PyTorch's own answer to large-scale pretraining infrastructure, torchtitan demonstrates how the framework's native distributed features compose: FSDP2 with per-parameter sharding, tensor parallel including an async variant, pipeline parallel, and context parallel for sequences up to one million tokens, all stackable into 4D parallelism with torch.compile support. Float8 and MXFP8 training paths target recent NVIDIA hardware including Blackwell GPUs, while distributed checkpointing, activation checkpointing, and Flight Recorder debugging cover the production concerns. Reference configurations train Llama 3.1 at 8B, 70B, and 405B, supervised fine-tuning on chat-formatted datasets is supported, and the accompanying paper was accepted to ICLR 2025. Installation comes from stable pip or conda builds, though the newest features track PyTorch nightly. The BSD-3-Clause license permits commercial use. With around 5,600 GitHub stars and an AMD-optimized fork released in late 2025, it functions less as a wrapper over someone else's stack and more as the place where PyTorch itself develops pretraining best practice.
Should you use torchtitan?
Pick it when
Pick it when you pretrain Llama-class models at 8B to 405B on recent NVIDIA GPUs and want PyTorch-native FSDP2, tensor, pipeline, and context parallelism with float8 and torch.compile, without another framework's abstractions.
Look elsewhere when
The newest features track PyTorch nightly, so expect churn, and it is built around pretraining. For LoRA or preference tuning use TRL or LLaMA-Factory; for proven Megatron and DeepSpeed recipes on Slurm clusters, use GPT-NeoX.
Alternatives to torchtitan
- GPT-NeoX
Mature Megatron and DeepSpeed recipes behind Pythia with AMD MI250X and Slurm support, but an older stack than native FSDP2.
- Megatron-LM
NVIDIA's own parallelism library with expert parallelism built in, but a separate framework under a custom NVIDIA license.
- MaxText
JAX and XLA counterpart that runs on TPUs as well as GPUs; choose it when your compute is Google Cloud TPU.
- LitGPT
Much simpler pretrain and finetune CLI for smaller runs, with FSDP but without 4D parallelism or float8 paths.
Reviews (0)
Leave a Review
No reviews yet. Be the first to review!
Details
- Category
- Model Training & Fine-Tuning
- Price
- Free
- Platform
- Local/Desktop
- Difficulty
- Advanced (4/5)
- License
- BSD-3-Clause
- Added
- Jul 29, 2026