distributed-llm-pretraining-torchtitan

Configure torchtitan TOML files for distributed LLM pretraining with 4D parallelism.

Updated May 5, 2026
One-click install
npx skills add https://github.com/Z43L/zeus-agent --skill distributed-llm-pretraining-torchtitan-z43l
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: distributed-llm-pretraining-torchtitan
Source: https://github.com/Z43L/zeus-agent/tree/main/optional-skills/mlops/torchtitan
Command: npx skills add https://github.com/Z43L/zeus-agent --skill distributed-llm-pretraining-torchtitan-z43l

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill solves the problem of running efficient, large-scale distributed LLM pretraining by providing a practical, PyTorch-native setup for torchtitan 4D parallelism.

Core Features & Use Cases

  • Composable 4D parallelism: Uses FSDP2, Tensor Parallel (TP), Pipeline Parallel (PP), and Context Parallel (CP) together to scale pretraining across many GPUs.
  • Throughput-focused training recipes: Includes workflows for single-node runs, multi-node SLURM training, and enabling Float8 acceleration on H100-class hardware.
  • Distributed checkpointing and recovery: Guides fault-tolerant training using PyTorch Distributed Checkpoint (DCP), including seed checkpoint requirements for PP resumption.

Quick Start

Configure your training TOML config for your target model size and run training with torchtitan using the provided CONFIG_FILE with ./run_train.sh.

Frequently Asked Questions about distributed-llm-pretraining-torchtitan

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I pretrain LLMs with 4D parallelism using PyTorch?

Pretrain LLMs with 4D parallelism by using torchtitan to compose FSDP2, Tensor Parallel, Pipeline Parallel, and Context Parallel together. This scales distributed training across large GPU clusters natively within PyTorch.

Does torchtitan support multi-node distributed training on SLURM?

Yes, torchtitan supports multi-node distributed training on SLURM. It provides throughput-focused training recipes that manage scaling from single-node 8-GPU setups to larger SLURM-managed clusters for extensive LLM pretraining.

Can I enable Float8 acceleration for LLM pretraining on H100 GPUs?

Yes, you can enable Float8 acceleration for LLM pretraining on H100-class hardware. The torchtitan recipes include specific configurations to leverage Float8 for faster distributed training throughput.

How does distributed checkpointing work when resharding across parallelism modes?

Distributed checkpointing uses PyTorch Distributed Checkpoint to enable fault-tolerant training and recovery. It supports resharding across different parallelism modes and handles seed checkpoint requirements for Pipeline Parallel resumption.

What is the best way to start a single-node 8-GPU pretraining run?

Start single-node 8-GPU pretraining by configuring your training TOML config for the target model size and executing the run_train.sh launcher with torchrun. This applies the torchtitan composable 4D parallelism setup.

Why do I need a seed checkpoint for Pipeline Parallel resumption?

A seed checkpoint is required for Pipeline Parallel resumption to ensure correct distributed checkpointing and recovery. It allows PyTorch Distributed Checkpoint to properly restore state when resharding across parallelism modes.