distributed-llm-pretraining-torchtitan

Enable PyTorch-native distributed LLM pretraining across multi-GPU clusters.

Updated Mar 25, 2026
One-click install
npx skills add https://github.com/afel6/scal-ai-pipeline --skill distributed-llm-pretraining-torchtitan-afel6
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: distributed-llm-pretraining-torchtitan
Source: https://github.com/afel6/scal-ai-pipeline/tree/main/hermes_skills_library/optional-skills/mlops/torchtitan
Command: npx skills add https://github.com/afel6/scal-ai-pipeline --skill distributed-llm-pretraining-torchtitan-afel6

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Enables end-to-end, PyTorch-native distributed pretraining for large language models so engineering teams can train models from 8 GPUs up to 512+ GPUs without manual orchestration of parallelism, checkpointing, and optimization trade-offs.

Core Features & Use Cases

  • Composable 4D parallelism: Orchestrates FSDP2, tensor parallelism, pipeline parallelism, and context parallelism for massive models.
  • Performance optimizations: Integrates Float8 support, torch.compile, and async checkpointing for H100-scale training speedups.
  • Operational workflows: Provides single-node and SLURM multi-node recipes, seed checkpointing for pipeline parallelism, and HuggingFace interoperability for export and conversion.
  • Use Case: Pretrain Llama 3.1 8B on 8 GPUs, scale to 70B on 256 GPUs, or run 405B 4D-parallel jobs across 512 GPUs with fault-tolerant checkpoints.

Quick Start

Launch a distributed pretraining run using the provided TorchTitan config and assets to pretrain your target model on the cluster.

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 run PyTorch LLM pretraining on 512 GPUs using 4D parallelism?▼

PyTorch LLM pretraining on 512 GPUs uses composable 4D parallelism, orchestrating FSDP2, tensor, pipeline, and context parallelism to scale models like Llama 3.1 405B across multi-GPU clusters without manual orchestration.

What is the best way to scale distributed training from 8 to 256 GPUs in PyTorch?▼

Scaling distributed training from 8 to 256 GPUs is handled natively by PyTorch using FSDP2 and tensor parallelism, allowing you to pretrain models like Llama 3.1 70B with fault-tolerant distributed checkpointing and SLURM multi-node launches.

Does PyTorch distributed training support Float8 and torch.compile for H100 optimizations?▼

PyTorch distributed training supports Float8 and torch.compile optimizations to deliver H100-scale training speedups, integrating torchao support to accelerate large language model pretraining across multi-GPU clusters.

Can I export HuggingFace models for distributed pretraining with FSDP2?▼

You can export HuggingFace models for distributed pretraining using built-in HuggingFace interoperability, enabling seamless conversion and export for PyTorch-native FSDP2 training workflows across multi-node clusters.

Do I need SLURM to launch multi-node distributed training for large language models?▼

You do not strictly need SLURM to launch multi-node distributed training for large language models, as PyTorch-native workflows provide both single-node and SLURM multi-node recipes for flexible cluster orchestration.

Why use async checkpointing during multi-GPU LLM pretraining?▼

Async checkpointing during multi-GPU LLM pretraining prevents training stalls by writing distributed checkpoints without blocking the compute pipeline, ensuring fault-tolerant recovery for 4D parallelism jobs across 512+ GPUs.