distributed-llm-pretraining-torchtitan

Pretrain large language models with distributed TorchTitan pipelines across 8 to 512 GPUs.

Updated Apr 10, 2026
One-click install
npx skills add https://github.com/KarlinskyS/hermesSkills --skill distributed-llm-pretraining-torchtitan-karlinskys
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: distributed-llm-pretraining-torchtitan
Source: https://github.com/KarlinskyS/hermesSkills/tree/main/mlops/training/torchtitan
Command: npx skills add https://github.com/KarlinskyS/hermesSkills --skill distributed-llm-pretraining-torchtitan-karlinskys

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Training massive LLMs from scratch requires coordinated distributed execution, 4‑dimensional parallelism, and efficient checkpointing, which this Skill orchestrates end‑to‑end.

Core Features & Use Cases

  • Provides step‑by‑step guidance for installing TorchTitan and its dependencies.
  • Supports single‑node and multi‑node training with SLURM, including FSDP2, tensor, pipeline, and context parallelism.
  • Enables Float8/FP8 acceleration and seamless checkpoint conversion to HuggingFace formats.
  • Ideal for pretraining Llama 3.1, DeepSeek V3, or custom architectures on clusters ranging from 8 to 512 GPUs.

Quick Start

Use the TorchTitan skill to launch a distributed training job by supplying a TOML config file to the run_train.sh script.

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 at scale using distributed 4D parallelism?

Pretraining LLMs at scale with 4D parallelism requires coordinating FSDP2, tensor, pipeline, and context parallelism across 8 to 512+ GPUs. TorchTitan orchestrates this distributed execution end-to-end, supporting Llama 3.1, DeepSeek V3, and custom architectures on single-node or multi-node SLURM clusters.

What is the best way to set up distributed LLM pretraining with Float8 acceleration?

Setting up distributed LLM pretraining with Float8 acceleration requires PyTorch 2.6, TorchTitan 0.2, and optional torchao. You launch jobs by supplying a TOML config file to the run_train.sh script, enabling FP8 acceleration and seamless checkpoint conversion to HuggingFace formats.

Can I use TorchTitan for multi-node LLM pretraining on a SLURM cluster?

Yes, you can use TorchTitan for multi-node LLM pretraining on SLURM clusters. It supports both single-node and multi-node training configurations, scaling efficiently from 8 to 512+ GPUs while applying 4D parallelism and Float8 acceleration for massive models.

How do I convert distributed training checkpoints to HuggingFace formats?

Converting distributed training checkpoints to HuggingFace formats is handled seamlessly within the TorchTitan pretraining pipeline. After running distributed training jobs across multiple GPUs, the Skill provides checkpoint conversion to export model weights into standard HuggingFace formats.

Do I need PyTorch 2.6 to run distributed LLM pretraining with TorchTitan?

Yes, you need PyTorch 2.6 or higher to run distributed LLM pretraining with TorchTitan. The Skill also requires TorchTitan 0.2 or higher, and optionally requires torchao if you want to enable Float8 acceleration during large-scale model training.

When do I need 4D parallelism for large language model pretraining?

You need 4D parallelism for large language model pretraining when scaling massive architectures across 8 to 512+ GPUs. It combines FSDP2, tensor, pipeline, and context parallelism to coordinate distributed execution and memory management for training models like Llama and DeepSeek from scratch.