torchtitan logo

torchtitan

Free

A native PyTorch Library for large model training.

FreeFree tier
Type
Open Source

About torchtitan

torchtitan is a PyTorch native platform designed for rapid experimentation and large-scale training of generative AI models. It provides a minimal clean-room implementation of PyTorch native scaling techniques, offering flexible extension points for custom needs. The platform showcases the latest distributed training features, with built-in support for pretraining Llama 3.1 LLMs of various sizes. Key capabilities include multi-dimensional composable parallelisms (FSDP2, Tensor Parallel, Pipeline Parallel, Context Parallel), activation checkpointing, distributed checkpointing (including async), interoperable checkpoints that can be loaded into torchtune for fine-tuning, torch.compile support, Float8 and MXFP8 training, and Supervised Fine-Tuning (SFT). The codebase is designed to be easy to understand, use, and extend, with minimal model code changes required for parallelism.

Key Features

Multi-dimensional composable parallelisms (FSDP2, Tensor Parallel, Pipeline Parallel, Context Parallel)
Meta device initialization and per-op selective/full activation checkpointing
Distributed checkpointing including async checkpointing
Interoperable checkpoints loadable into torchtune for fine-tuning
torch.compile support
Float8 and MXFP8 training for dense and MoE models on Blackwell GPUs
Supervised Fine-Tuning (SFT) with chat-formatted datasets
DDP and HSDP support with TorchFT integration
Checkpointable data-loading with pre-configured C4 dataset

Pros & Cons

Pros
  • Clean, minimal codebase designed for easy understanding and extension
  • Minimal model code changes required when applying multi-dimensional parallelism
  • Showcases PyTorch's latest distributed training features
  • Interoperable checkpoints enable seamless transition to fine-tuning with torchtune
  • Active development with regular updates and community contributions
  • Open source with permissive license (MIT)
Cons
  • Under extensive development; latest features may require recent PyTorch nightly builds
  • Currently focused on Llama model architecture; adding new models requires manual effort
  • Documentation and tutorials are still evolving

Best For

Rapid experimentation and large-scale training of generative AI models (e.g., Llama 3.1)Research and development of new modeling architectures and infrastructure techniquesFine-tuning LLMs with custom datasetsDemonstrating and testing latest PyTorch distributed training features

FAQ

What is torchtitan?
torchtitan is a PyTorch native platform for rapid experimentation and large-scale training of generative AI models, providing a minimal implementation of PyTorch native scaling techniques.
What models does torchtitan support?
torchtitan currently supports pretraining Llama 3.1 LLMs of various sizes, with instructions available for adding new models.
Is torchtitan free and open source?
Yes, torchtitan is open source under the MIT license and available on GitHub.
What parallelism strategies are available?
torchtitan supports multi-dimensional composable parallelisms including FSDP2, Tensor Parallelism, Pipeline Parallelism, and Context Parallelism.