skillfed

torchtitan

A PyTorch native platform for training generative AI models

torchtitan v0.2.2 95.2K downloads/30d#13,284 on PyPI5,623
Permissive license BSD 3-Clause License (c) Meta Platforms, Inc. and affiliates. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are… (full text in the JSON record) Active released

What it is and what it does

torchtitan is a minimal, clean-room implementation of PyTorch distributed training techniques designed specifically for large generative AI models. It provides a foundation for rapid experimentation with multi-dimensional parallelism (FSDP2, tensor parallel, pipeline parallel, context parallel), activation checkpointing, distributed checkpointing, and quantization methods like Float8 and MXFP8. The platform is built around Llama 3.1 model training but designed to be extensible for custom architectures.

The package handles the infrastructure complexity of large-scale training: it manages data loading with checkpointing, supports gradient accumulation, provides flexible learning rate scheduling, and integrates profiling and debugging tools. Training is configured via TOML files rather than code changes, keeping model definitions separate from parallelism logic. It integrates with TensorBoard and Weights & Biases for metrics logging and supports interoperable checkpoints that can be loaded directly into torchtune for fine-tuning.

Use it for:

  • Train Llama 3.1 models (8B, 70B, 405B) on multi-GPU clusters with composable parallelism strategies
  • Experiment with different distributed training techniques (FSDP, tensor parallelism, pipeline parallelism) on a single codebase
  • Implement custom generative AI model architectures using torchtitan's extension points and reusable components
  • Profile and debug large-scale training runs with CPU/GPU profiling, memory analysis, and Flight Recorder
  • Convert and checkpoint models in a format compatible with torchtune for downstream fine-tuning workflows

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

torchtitan is a PyTorch-native platform for training large generative AI models at scale, providing distributed training infrastructure with support for multiple parallelism techniques, checkpointing, and quantization.

Yes, if you are training large generative AI models on multi-GPU infrastructure and want a PyTorch-native, actively maintained platform with built-in support for modern distributed techniques. The low install friction and permissive license make it accessible. Not suitable if you need to train on older PyTorch versions, lack GPU hardware, or require a model zoo beyond Llama 3.1—consider it a specialized tool for large-scale LLM training rather than a general-purpose framework.

Install

torchtitan on PyPI

pip

pip install torchtitan

uv

uv add torchtitan

poetry

poetry add torchtitan

Installing torchtitan

Before you install

Low friction installation via pip or conda. The package is actively maintained with recent commits and a stable release cycle. Requires PyTorch nightly or a recent stable build, and Python 3.10 or later; nine runtime dependencies are standard ML/data-processing libraries.

License in practice

BSD 3-Clause permissive license allows commercial and private use with minimal restrictions; you must retain copyright notices and disclaimers in source and binary distributions.

Quickstart

pip install torchtitan

# Download Llama 3.1 tokenizer (requires HF token)
python scripts/download_hf_assets.py --repo_id meta-llama/Llama-3.1-8B --assets tokenizer --hf_token=YOUR_TOKEN

# Start training on 8 GPUs
CONFIG_FILE="./torchtitan/models/llama3/train_configs/llama3_8b_full_single_device.toml"
torchtitan train --config-file $CONFIG_FILE

Requires PyTorch nightly or recent stable build, Python 3.10+, and GPU hardware (NVIDIA or AMD). Llama model training requires access to Meta's model weights via Hugging Face.

Verify before relying

  • Whether the package works with older PyTorch stable releases or strictly requires nightly builds in practice
  • Specific GPU memory requirements for different model sizes (8B, 70B, 405B)
  • Whether AMD GPU support is production-ready or still experimental

Package facts

License BSD 3-Clause License (c) Meta Platforms, Inc. and affiliates. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are… (full text in the JSON record) (permissive)
Python support supports the current Python release (>=3.10)
Install friction low — pure-Python wheel
Runtime dependencies 9 — torchdata, datasets, tokenizers, tomli, fsspec, tyro, tensorboard, einops, pillow
Maintenance actively maintained — 175 days since the last release
Last repo commit
First released
Downloads 95,189/month — #13,284 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: torchtitan-0.2.2-py3-none-any.whl

Keywords: pytorch, training, llm

Tags

pytorch distributed training frameworklarge language model training platformtensor parallelism pipeline parallelismllama model training infrastructuremulti-gpu training orchestrationfsdp distributed traininggenerative ai model training
distributed-trainingllm-infrastructurepytorch-native

More Artificial Intelligence packages

Further reading