distributed-llm-pretraining-torchtitan

Distribute LLM pretraining across GPUs using PyTorch FSDP2, TP, PP, and CP.

Updated Apr 11, 2026
One-click install
npx skills add https://github.com/hhhi21g/HealthCenter --skill distributed-llm-pretraining-torchtitan-hhhi21g
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: distributed-llm-pretraining-torchtitan
Source: https://github.com/hhhi21g/HealthCenter/tree/main/.codex/skills/torchtitan
Command: npx skills add https://github.com/hhhi21g/HealthCenter --skill distributed-llm-pretraining-torchtitan-hhhi21g

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires torch>=2.6.0, torchtitan>=0.2.0, torchao>=0.5.0, and includes scripts (resource) and references (resource) and assets (resource) components.

What problem does it solve?

This Skill addresses the challenge of pretraining large language models (LLMs) at scale, enabling users to leverage PyTorch-native parallelism on high-performance GPUs like the H100.

Core Features & Use Cases

  • PyTorch-native Parallelism: Utilizes FSDP2, TP, PP, and CP for efficient LLM pretraining.
  • H100 GPU Support: Optimized for performance on NVIDIA H100 GPUs with Float8 support.
  • Custom Model Support: Allows pretraining of various LLMs like Llama, DeepSeek, and GPT-OSS.
  • Use Case: Pretrain a 405B model on 512 GPUs for large-scale LLM research and development.

Quick Start

Pretrain a Llama 3.1 8B model on 8 GPUs using the provided configuration file and scripts.

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 large language models using PyTorch-native parallelism on H100 GPUs?

Pretrain large language models on H100 GPUs by distributing the workload across PyTorch's FSDP2, Tensor Parallelism, Pipeline Parallelism, and Context Parallelism. It supports Float8 optimization and distributed checkpointing for efficient training at scale.

Can I use torchtitan to pretrain a 405B model on 512 GPUs?

Yes, torchtitan supports large-scale LLM pretraining for research and development. The framework is designed to handle pretraining custom models like Llama, DeepSeek, and GPT-OSS on up to 512 GPUs.

What parallelism strategies are supported for LLM pretraining with torchtitan?

Supported parallelism strategies include PyTorch-native FSDP2, Tensor Parallelism (TP), Pipeline Parallelism (PP), and Context Parallelism (CP). These strategies combine to efficiently distribute large-scale LLM pretraining across multiple GPUs.

Does PyTorch FSDP2 support Float8 optimization on H100 GPUs?

Yes, PyTorch FSDP2 is optimized for H100 GPUs with native support for Float8. This optimization reduces memory bandwidth and footprint, enabling efficient large-scale LLM pretraining.

What do I need to set up before starting LLM pretraining with torchtitan?

You need PyTorch 2.6.0 or later, torchtitan 0.2.0 or later, and torchao 0.5.0 or later. Once dependencies are met, you can use the provided configuration files and scripts to start pretraining models like Llama 3.1 8B on 8 GPUs.

Why use PyTorch-native parallelism over other distributed training frameworks for LLM pretraining?

PyTorch-native parallelism integrates FSDP2, TP, PP, and CP directly without external dependencies. This approach provides native distributed checkpointing and Float8 support tailored for H100 GPUs, streamlining large-scale LLM research.