[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M71PJ7WFCPFMQFMB2R9DASBK":3,"skill-same:01M71PJ7WFCPFMQFMB2R9DASBK":96},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":17,"publishedAt":38,"linkOnly":39,"markdownContent":40,"markdownBody":41,"frontMatter":42,"refName":58,"commitSha":59,"skillDirectory":60,"forksCount":13,"repositoryHtmlUrl":61,"repositoryHomepageUrl":6,"ownerHtmlUrl":62,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":63,"install":64,"resources":77},"01M71PJ7WFCPFMQFMB2R9DASBK","distributed-llm-pretraining-torchtitan",null,"Provides PyTorch-native distributed LLM pretraining using torchtitan with 4D parallelism (FSDP2, TP, PP, CP). Use when pretraining Llama 3.1, DeepSeek V3, or custom models at scale from 8 to 512+ GPUs with Float8, torch.compile, and distributed checkpointing.","gjbvsjjvgm-sketch\u002FWORM_V2_SOVEREIGN","gjbvsjjvgm-sketch","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F278511911?v=4","01M71F3JXKZQ70H2KCHHTXKZDA","01M71PENEVFN19DBZFNHJPCHQ7",0,"MIT","https:\u002F\u002Fgithub.com\u002Fgjbvsjjvgm-sketch\u002FWORM_V2_SOVEREIGN\u002Fblob\u002Fmain\u002Fcore\u002Fhermes-agent\u002Foptional-skills\u002Fmlops\u002Ftorchtitan\u002FSKILL.md",[],[18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37],"distributed","torchtitan","Pretraining","distributed llm pretraining torchtitan","compile","orchestra","Distributed Training","pp","parallel","context","Model Architecture","at","native","FSDP2","architecture","when","pytorch","training","pipeline","model","2026-11-10 13:02:02",false,"---\nname: distributed-llm-pretraining-torchtitan\ndescription: Provides PyTorch-native distributed LLM pretraining using torchtitan with 4D parallelism (FSDP2, TP, PP, CP). Use when pretraining Llama 3.1, DeepSeek V3, or custom models at scale from 8 to 512+ GPUs with Float8, torch.compile, and distributed checkpointing.\nversion: 1.0.0\nauthor: Orchestra Research\nlicense: MIT\ndependencies: [torch>=2.6.0, torchtitan>=0.2.0, torchao>=0.5.0]\nmetadata:\n  hermes:\n    tags: [Model Architecture, Distributed Training, TorchTitan, FSDP2, Tensor Parallel, Pipeline Parallel, Context Parallel, Float8, Llama, Pretraining]\n\n---\n\n# TorchTitan - PyTorch Native Distributed LLM Pretraining\n\n## Quick start\n\nTorchTitan is PyTorch's official platform for large-scale LLM pretraining with composable 4D parallelism (FSDP2, TP, PP, CP), achieving 65%+ speedups over baselines on H100 GPUs.\n\n**Installation**:\n```bash\n# From PyPI (stable)\npip install torchtitan\n\n# From source (latest features, requires PyTorch nightly)\ngit clone https:\u002F\u002Fgithub.com\u002Fpytorch\u002Ftorchtitan\ncd torchtitan\npip install -r requirements.txt\n```\n\n**Download tokenizer**:\n```bash\n# Get HF token from https:\u002F\u002Fhuggingface.co\u002Fsettings\u002Ftokens\npython scripts\u002Fdownload_hf_assets.py --repo_id meta-llama\u002FLlama-3.1-8B --assets tokenizer --hf_token=...\n```\n\n**Start training on 8 GPUs**:\n```bash\nCONFIG_FILE=\".\u002Ftorchtitan\u002Fmodels\u002Fllama3\u002Ftrain_configs\u002Fllama3_8b.toml\" .\u002Frun_train.sh\n```\n\n## Common workflows\n\n### Workflow 1: Pretrain Llama 3.1 8B on single node\n\nCopy this checklist:\n\n```\nSingle Node Pretraining:\n- [ ] Step 1: Download tokenizer\n- [ ] Step 2: Configure training\n- [ ] Step 3: Launch training\n- [ ] Step 4: Monitor and checkpoint\n```\n\n**Step 1: Download tokenizer**\n\n```bash\npython scripts\u002Fdownload_hf_assets.py \\\n  --repo_id meta-llama\u002FLlama-3.1-8B \\\n  --assets tokenizer \\\n  --hf_token=YOUR_HF_TOKEN\n```\n\n**Step 2: Configure training**\n\nEdit or create a TOML config file:\n\n```toml\n# llama3_8b_custom.toml\n[job]\ndump_folder = \".\u002Foutputs\"\ndescription = \"Llama 3.1 8B training\"\n\n[model]\nname = \"llama3\"\nflavor = \"8B\"\nhf_assets_path = \".\u002Fassets\u002Fhf\u002FLlama-3.1-8B\"\n\n[optimizer]\nname = \"AdamW\"\nlr = 3e-4\n\n[lr_scheduler]\nwarmup_steps = 200\n\n[training]\nlocal_batch_size = 2\nseq_len = 8192\nmax_norm = 1.0\nsteps = 1000\ndataset = \"c4\"\n\n[parallelism]\ndata_parallel_shard_degree = -1  # Use all GPUs for FSDP\n\n[activation_checkpoint]\nmode = \"selective\"\nselective_ac_option = \"op\"\n\n[checkpoint]\nenable = true\nfolder = \"checkpoint\"\ninterval = 500\n```\n\n**Step 3: Launch training**\n\n```bash\n# 8 GPUs on single node\nCONFIG_FILE=\".\u002Fllama3_8b_custom.toml\" .\u002Frun_train.sh\n\n# Or explicitly with torchrun\ntorchrun --nproc_per_node=8 \\\n  -m torchtitan.train \\\n  --job.config_file .\u002Fllama3_8b_custom.toml\n```\n\n**Step 4: Monitor and checkpoint**\n\nTensorBoard logs are saved to `.\u002Foutputs\u002Ftb\u002F`:\n```bash\ntensorboard --logdir .\u002Foutputs\u002Ftb\n```\n\n### Workflow 2: Multi-node training with SLURM\n\n```\nMulti-Node Training:\n- [ ] Step 1: Configure parallelism for scale\n- [ ] Step 2: Set up SLURM script\n- [ ] Step 3: Submit job\n- [ ] Step 4: Resume from checkpoint\n```\n\n**Step 1: Configure parallelism for scale**\n\nFor 70B model on 256 GPUs (32 nodes):\n```toml\n[parallelism]\ndata_parallel_shard_degree = 32  # FSDP across 32 ranks\ntensor_parallel_degree = 8        # TP within node\npipeline_parallel_degree = 1      # No PP for 70B\ncontext_parallel_degree = 1       # Increase for long sequences\n```\n\n**Step 2: Set up SLURM script**\n\n```bash\n#!\u002Fbin\u002Fbash\n#SBATCH --job-name=llama70b\n#SBATCH --nodes=32\n#SBATCH --ntasks-per-node=8\n#SBATCH --gpus-per-node=8\n\nsrun torchrun \\\n  --nnodes=32 \\\n  --nproc_per_node=8 \\\n  --rdzv_backend=c10d \\\n  --rdzv_endpoint=$MASTER_ADDR:$MASTER_PORT \\\n  -m torchtitan.train \\\n  --job.config_file .\u002Fllama3_70b.toml\n```\n\n**Step 3: Submit job**\n\n```bash\nsbatch multinode_trainer.slurm\n```\n\n**Step 4: Resume from checkpoint**\n\nTraining auto-resumes if checkpoint exists in configured folder.\n\n### Workflow 3: Enable Float8 training for H100s\n\nFloat8 provides 30-50% speedup on H100 GPUs.\n\n```\nFloat8 Training:\n- [ ] Step 1: Install torchao\n- [ ] Step 2: Configure Float8\n- [ ] Step 3: Launch with compile\n```\n\n**Step 1: Install torchao**\n\n```bash\nUSE_CPP=0 pip install git+https:\u002F\u002Fgithub.com\u002Fpytorch\u002Fao.git\n```\n\n**Step 2: Configure Float8**\n\nAdd to your TOML config:\n```toml\n[model]\nconverters = [\"quantize.linear.float8\"]\n\n[quantize.linear.float8]\nenable_fsdp_float8_all_gather = true\nprecompute_float8_dynamic_scale_for_fsdp = true\nfilter_fqns = [\"output\"]  # Exclude output layer\n\n[compile]\nenable = true\ncomponents = [\"model\", \"loss\"]\n```\n\n**Step 3: Launch with compile**\n\n```bash\nCONFIG_FILE=\".\u002Fllama3_8b.toml\" .\u002Frun_train.sh \\\n  --model.converters=\"quantize.linear.float8\" \\\n  --quantize.linear.float8.enable_fsdp_float8_all_gather \\\n  --compile.enable\n```\n\n### Workflow 4: 4D parallelism for 405B models\n\n```\n4D Parallelism (FSDP + TP + PP + CP):\n- [ ] Step 1: Create seed checkpoint\n- [ ] Step 2: Configure 4D parallelism\n- [ ] Step 3: Launch on 512 GPUs\n```\n\n**Step 1: Create seed checkpoint**\n\nRequired for consistent initialization across PP stages:\n```bash\nNGPU=1 CONFIG_FILE=.\u002Fllama3_405b.toml .\u002Frun_train.sh \\\n  --checkpoint.enable \\\n  --checkpoint.create_seed_checkpoint \\\n  --parallelism.data_parallel_shard_degree 1 \\\n  --parallelism.tensor_parallel_degree 1 \\\n  --parallelism.pipeline_parallel_degree 1\n```\n\n**Step 2: Configure 4D parallelism**\n\n```toml\n[parallelism]\ndata_parallel_shard_degree = 8   # FSDP\ntensor_parallel_degree = 8       # TP within node\npipeline_parallel_degree = 8     # PP across nodes\ncontext_parallel_degree = 1      # CP for long sequences\n\n[training]\nlocal_batch_size = 32\nseq_len = 8192\n```\n\n**Step 3: Launch on 512 GPUs**\n\n```bash\n# 64 nodes x 8 GPUs = 512 GPUs\nsrun torchrun --nnodes=64 --nproc_per_node=8 \\\n  -m torchtitan.train \\\n  --job.config_file .\u002Fllama3_405b.toml\n```\n\n## When to use vs alternatives\n\n**Use TorchTitan when:**\n- Pretraining LLMs from scratch (8B to 405B+)\n- Need PyTorch-native solution without third-party dependencies\n- Require composable 4D parallelism (FSDP2, TP, PP, CP)\n- Training on H100s with Float8 support\n- Want interoperable checkpoints with torchtune\u002FHuggingFace\n\n**Use alternatives instead:**\n- **Megatron-LM**: Maximum performance for NVIDIA-only deployments\n- **DeepSpeed**: Broader ZeRO optimization ecosystem, inference support\n- **Axolotl\u002FTRL**: Fine-tuning rather than pretraining\n- **LitGPT**: Educational, smaller-scale training\n\n## Common issues\n\n**Issue: Out of memory on large models**\n\nEnable activation checkpointing and reduce batch size:\n```toml\n[activation_checkpoint]\nmode = \"full\"  # Instead of \"selective\"\n\n[training]\nlocal_batch_size = 1\n```\n\nOr use gradient accumulation:\n```toml\n[training]\nlocal_batch_size = 1\nglobal_batch_size = 32  # Accumulates gradients\n```\n\n**Issue: TP causes high memory with async collectives**\n\nSet environment variable:\n```bash\nexport TORCH_NCCL_AVOID_RECORD_STREAMS=1\n```\n\n**Issue: Float8 training not faster**\n\nFloat8 only benefits large GEMMs. Filter small layers:\n```toml\n[quantize.linear.float8]\nfilter_fqns = [\"attention.wk\", \"attention.wv\", \"output\", \"auto_filter_small_kn\"]\n```\n\n**Issue: Checkpoint loading fails after parallelism change**\n\nUse DCP's resharding capability:\n```bash\n# Convert sharded checkpoint to single file\npython -m torch.distributed.checkpoint.format_utils \\\n  dcp_to_torch checkpoint\u002Fstep-1000 checkpoint.pt\n```\n\n**Issue: Pipeline parallelism initialization**\n\nCreate seed checkpoint first (see Workflow 4, Step 1).\n\n## Supported models\n\n| Model | Sizes | Status |\n|-------|-------|--------|\n| Llama 3.1 | 8B, 70B, 405B | Production |\n| Llama 4 | Various | Experimental |\n| DeepSeek V3 | 16B, 236B, 671B (MoE) | Experimental |\n| GPT-OSS | 20B, 120B (MoE) | Experimental |\n| Qwen 3 | Various | Experimental |\n| Flux | Diffusion | Experimental |\n\n## Performance benchmarks (H100)\n\n| Model | GPUs | Parallelism | TPS\u002FGPU | Techniques |\n|-------|------|-------------|---------|------------|\n| Llama 8B | 8 | FSDP | 5,762 | Baseline |\n| Llama 8B | 8 | FSDP+compile+FP8 | 8,532 | +48% |\n| Llama 70B | 256 | FSDP+TP+AsyncTP | 876 | 2D parallel |\n| Llama 405B | 512 | FSDP+TP+PP | 128 | 3D parallel |\n\n## Advanced topics\n\n**FSDP2 configuration**: See [references\u002Ffsdp.md](references\u002Ffsdp.md) for detailed FSDP2 vs FSDP1 comparison and ZeRO equivalents.\n\n**Float8 training**: See [references\u002Ffloat8.md](references\u002Ffloat8.md) for tensorwise vs rowwise scaling recipes.\n\n**Checkpointing**: See [references\u002Fcheckpoint.md](references\u002Fcheckpoint.md) for HuggingFace conversion and async checkpointing.\n\n**Adding custom models**: See [references\u002Fcustom-models.md](references\u002Fcustom-models.md) for TrainSpec protocol.\n\n## Resources\n\n- GitHub: https:\u002F\u002Fgithub.com\u002Fpytorch\u002Ftorchtitan\n- Paper: https:\u002F\u002Farxiv.org\u002Fabs\u002F2410.06511\n- ICLR 2025: https:\u002F\u002Ficlr.cc\u002Fvirtual\u002F2025\u002Fposter\u002F29620\n- PyTorch Forum: https:\u002F\u002Fdiscuss.pytorch.org\u002Fc\u002Fdistributed\u002Ftorchtitan\u002F44\n\n","# TorchTitan - PyTorch Native Distributed LLM Pretraining\n\n## Quick start\n\nTorchTitan is PyTorch's official platform for large-scale LLM pretraining with composable 4D parallelism (FSDP2, TP, PP, CP), achieving 65%+ speedups over baselines on H100 GPUs.\n\n**Installation**:\n```bash\n# From PyPI (stable)\npip install torchtitan\n\n# From source (latest features, requires PyTorch nightly)\ngit clone https:\u002F\u002Fgithub.com\u002Fpytorch\u002Ftorchtitan\ncd torchtitan\npip install -r requirements.txt\n```\n\n**Download tokenizer**:\n```bash\n# Get HF token from https:\u002F\u002Fhuggingface.co\u002Fsettings\u002Ftokens\npython scripts\u002Fdownload_hf_assets.py --repo_id meta-llama\u002FLlama-3.1-8B --assets tokenizer --hf_token=...\n```\n\n**Start training on 8 GPUs**:\n```bash\nCONFIG_FILE=\".\u002Ftorchtitan\u002Fmodels\u002Fllama3\u002Ftrain_configs\u002Fllama3_8b.toml\" .\u002Frun_train.sh\n```\n\n## Common workflows\n\n### Workflow 1: Pretrain Llama 3.1 8B on single node\n\nCopy this checklist:\n\n```\nSingle Node Pretraining:\n- [ ] Step 1: Download tokenizer\n- [ ] Step 2: Configure training\n- [ ] Step 3: Launch training\n- [ ] Step 4: Monitor and checkpoint\n```\n\n**Step 1: Download tokenizer**\n\n```bash\npython scripts\u002Fdownload_hf_assets.py \\\n  --repo_id meta-llama\u002FLlama-3.1-8B \\\n  --assets tokenizer \\\n  --hf_token=YOUR_HF_TOKEN\n```\n\n**Step 2: Configure training**\n\nEdit or create a TOML config file:\n\n```toml\n# llama3_8b_custom.toml\n[job]\ndump_folder = \".\u002Foutputs\"\ndescription = \"Llama 3.1 8B training\"\n\n[model]\nname = \"llama3\"\nflavor = \"8B\"\nhf_assets_path = \".\u002Fassets\u002Fhf\u002FLlama-3.1-8B\"\n\n[optimizer]\nname = \"AdamW\"\nlr = 3e-4\n\n[lr_scheduler]\nwarmup_steps = 200\n\n[training]\nlocal_batch_size = 2\nseq_len = 8192\nmax_norm = 1.0\nsteps = 1000\ndataset = \"c4\"\n\n[parallelism]\ndata_parallel_shard_degree = -1  # Use all GPUs for FSDP\n\n[activation_checkpoint]\nmode = \"selective\"\nselective_ac_option = \"op\"\n\n[checkpoint]\nenable = true\nfolder = \"checkpoint\"\ninterval = 500\n```\n\n**Step 3: Launch training**\n\n```bash\n# 8 GPUs on single node\nCONFIG_FILE=\".\u002Fllama3_8b_custom.toml\" .\u002Frun_train.sh\n\n# Or explicitly with torchrun\ntorchrun --nproc_per_node=8 \\\n  -m torchtitan.train \\\n  --job.config_file .\u002Fllama3_8b_custom.toml\n```\n\n**Step 4: Monitor and checkpoint**\n\nTensorBoard logs are saved to `.\u002Foutputs\u002Ftb\u002F`:\n```bash\ntensorboard --logdir .\u002Foutputs\u002Ftb\n```\n\n### Workflow 2: Multi-node training with SLURM\n\n```\nMulti-Node Training:\n- [ ] Step 1: Configure parallelism for scale\n- [ ] Step 2: Set up SLURM script\n- [ ] Step 3: Submit job\n- [ ] Step 4: Resume from checkpoint\n```\n\n**Step 1: Configure parallelism for scale**\n\nFor 70B model on 256 GPUs (32 nodes):\n```toml\n[parallelism]\ndata_parallel_shard_degree = 32  # FSDP across 32 ranks\ntensor_parallel_degree = 8        # TP within node\npipeline_parallel_degree = 1      # No PP for 70B\ncontext_parallel_degree = 1       # Increase for long sequences\n```\n\n**Step 2: Set up SLURM script**\n\n```bash\n#!\u002Fbin\u002Fbash\n#SBATCH --job-name=llama70b\n#SBATCH --nodes=32\n#SBATCH --ntasks-per-node=8\n#SBATCH --gpus-per-node=8\n\nsrun torchrun \\\n  --nnodes=32 \\\n  --nproc_per_node=8 \\\n  --rdzv_backend=c10d \\\n  --rdzv_endpoint=$MASTER_ADDR:$MASTER_PORT \\\n  -m torchtitan.train \\\n  --job.config_file .\u002Fllama3_70b.toml\n```\n\n**Step 3: Submit job**\n\n```bash\nsbatch multinode_trainer.slurm\n```\n\n**Step 4: Resume from checkpoint**\n\nTraining auto-resumes if checkpoint exists in configured folder.\n\n### Workflow 3: Enable Float8 training for H100s\n\nFloat8 provides 30-50% speedup on H100 GPUs.\n\n```\nFloat8 Training:\n- [ ] Step 1: Install torchao\n- [ ] Step 2: Configure Float8\n- [ ] Step 3: Launch with compile\n```\n\n**Step 1: Install torchao**\n\n```bash\nUSE_CPP=0 pip install git+https:\u002F\u002Fgithub.com\u002Fpytorch\u002Fao.git\n```\n\n**Step 2: Configure Float8**\n\nAdd to your TOML config:\n```toml\n[model]\nconverters = [\"quantize.linear.float8\"]\n\n[quantize.linear.float8]\nenable_fsdp_float8_all_gather = true\nprecompute_float8_dynamic_scale_for_fsdp = true\nfilter_fqns = [\"output\"]  # Exclude output layer\n\n[compile]\nenable = true\ncomponents = [\"model\", \"loss\"]\n```\n\n**Step 3: Launch with compile**\n\n```bash\nCONFIG_FILE=\".\u002Fllama3_8b.toml\" .\u002Frun_train.sh \\\n  --model.converters=\"quantize.linear.float8\" \\\n  --quantize.linear.float8.enable_fsdp_float8_all_gather \\\n  --compile.enable\n```\n\n### Workflow 4: 4D parallelism for 405B models\n\n```\n4D Parallelism (FSDP + TP + PP + CP):\n- [ ] Step 1: Create seed checkpoint\n- [ ] Step 2: Configure 4D parallelism\n- [ ] Step 3: Launch on 512 GPUs\n```\n\n**Step 1: Create seed checkpoint**\n\nRequired for consistent initialization across PP stages:\n```bash\nNGPU=1 CONFIG_FILE=.\u002Fllama3_405b.toml .\u002Frun_train.sh \\\n  --checkpoint.enable \\\n  --checkpoint.create_seed_checkpoint \\\n  --parallelism.data_parallel_shard_degree 1 \\\n  --parallelism.tensor_parallel_degree 1 \\\n  --parallelism.pipeline_parallel_degree 1\n```\n\n**Step 2: Configure 4D parallelism**\n\n```toml\n[parallelism]\ndata_parallel_shard_degree = 8   # FSDP\ntensor_parallel_degree = 8       # TP within node\npipeline_parallel_degree = 8     # PP across nodes\ncontext_parallel_degree = 1      # CP for long sequences\n\n[training]\nlocal_batch_size = 32\nseq_len = 8192\n```\n\n**Step 3: Launch on 512 GPUs**\n\n```bash\n# 64 nodes x 8 GPUs = 512 GPUs\nsrun torchrun --nnodes=64 --nproc_per_node=8 \\\n  -m torchtitan.train \\\n  --job.config_file .\u002Fllama3_405b.toml\n```\n\n## When to use vs alternatives\n\n**Use TorchTitan when:**\n- Pretraining LLMs from scratch (8B to 405B+)\n- Need PyTorch-native solution without third-party dependencies\n- Require composable 4D parallelism (FSDP2, TP, PP, CP)\n- Training on H100s with Float8 support\n- Want interoperable checkpoints with torchtune\u002FHuggingFace\n\n**Use alternatives instead:**\n- **Megatron-LM**: Maximum performance for NVIDIA-only deployments\n- **DeepSpeed**: Broader ZeRO optimization ecosystem, inference support\n- **Axolotl\u002FTRL**: Fine-tuning rather than pretraining\n- **LitGPT**: Educational, smaller-scale training\n\n## Common issues\n\n**Issue: Out of memory on large models**\n\nEnable activation checkpointing and reduce batch size:\n```toml\n[activation_checkpoint]\nmode = \"full\"  # Instead of \"selective\"\n\n[training]\nlocal_batch_size = 1\n```\n\nOr use gradient accumulation:\n```toml\n[training]\nlocal_batch_size = 1\nglobal_batch_size = 32  # Accumulates gradients\n```\n\n**Issue: TP causes high memory with async collectives**\n\nSet environment variable:\n```bash\nexport TORCH_NCCL_AVOID_RECORD_STREAMS=1\n```\n\n**Issue: Float8 training not faster**\n\nFloat8 only benefits large GEMMs. Filter small layers:\n```toml\n[quantize.linear.float8]\nfilter_fqns = [\"attention.wk\", \"attention.wv\", \"output\", \"auto_filter_small_kn\"]\n```\n\n**Issue: Checkpoint loading fails after parallelism change**\n\nUse DCP's resharding capability:\n```bash\n# Convert sharded checkpoint to single file\npython -m torch.distributed.checkpoint.format_utils \\\n  dcp_to_torch checkpoint\u002Fstep-1000 checkpoint.pt\n```\n\n**Issue: Pipeline parallelism initialization**\n\nCreate seed checkpoint first (see Workflow 4, Step 1).\n\n## Supported models\n\n| Model | Sizes | Status |\n|-------|-------|--------|\n| Llama 3.1 | 8B, 70B, 405B | Production |\n| Llama 4 | Various | Experimental |\n| DeepSeek V3 | 16B, 236B, 671B (MoE) | Experimental |\n| GPT-OSS | 20B, 120B (MoE) | Experimental |\n| Qwen 3 | Various | Experimental |\n| Flux | Diffusion | Experimental |\n\n## Performance benchmarks (H100)\n\n| Model | GPUs | Parallelism | TPS\u002FGPU | Techniques |\n|-------|------|-------------|---------|------------|\n| Llama 8B | 8 | FSDP | 5,762 | Baseline |\n| Llama 8B | 8 | FSDP+compile+FP8 | 8,532 | +48% |\n| Llama 70B | 256 | FSDP+TP+AsyncTP | 876 | 2D parallel |\n| Llama 405B | 512 | FSDP+TP+PP | 128 | 3D parallel |\n\n## Advanced topics\n\n**FSDP2 configuration**: See [references\u002Ffsdp.md](references\u002Ffsdp.md) for detailed FSDP2 vs FSDP1 comparison and ZeRO equivalents.\n\n**Float8 training**: See [references\u002Ffloat8.md](references\u002Ffloat8.md) for tensorwise vs rowwise scaling recipes.\n\n**Checkpointing**: See [references\u002Fcheckpoint.md](references\u002Fcheckpoint.md) for HuggingFace conversion and async checkpointing.\n\n**Adding custom models**: See [references\u002Fcustom-models.md](references\u002Fcustom-models.md) for TrainSpec protocol.\n\n## Resources\n\n- GitHub: https:\u002F\u002Fgithub.com\u002Fpytorch\u002Ftorchtitan\n- Paper: https:\u002F\u002Farxiv.org\u002Fabs\u002F2410.06511\n- ICLR 2025: https:\u002F\u002Ficlr.cc\u002Fvirtual\u002F2025\u002Fposter\u002F29620\n- PyTorch Forum: https:\u002F\u002Fdiscuss.pytorch.org\u002Fc\u002Fdistributed\u002Ftorchtitan\u002F44\n\n",{"name":5,"author":43,"license":14,"version":44,"metadata":45,"description":7,"dependencies":54},"Orchestra Research","1.0.0",{"hermes":46},{"tags":47},[28,24,48,31,49,50,51,52,53,20],"TorchTitan","Tensor Parallel","Pipeline Parallel","Context Parallel","Float8","Llama",[55,56,57],"torch>=2.6.0","torchtitan>=0.2.0","torchao>=0.5.0","main","6746276ba18cb774853eb61b3b9399658bc9bc5c","core\u002Fhermes-agent\u002Foptional-skills\u002Fmlops\u002Ftorchtitan","https:\u002F\u002Fgithub.com\u002Fgjbvsjjvgm-sketch\u002FWORM_V2_SOVEREIGN","https:\u002F\u002Fgithub.com\u002Fgjbvsjjvgm-sketch","2026-04-28 17:01:03",{"source":8,"skillName":5,"commands":65,"prompt":75,"zipAvailable":76},[66,69,72],{"tool":67,"command":68},"npx","npx skills add gjbvsjjvgm-sketch\u002FWORM_V2_SOVEREIGN --skill distributed-llm-pretraining-torchtitan",{"tool":70,"command":71},"bunx","bunx skills add gjbvsjjvgm-sketch\u002FWORM_V2_SOVEREIGN --skill distributed-llm-pretraining-torchtitan",{"tool":73,"command":74},"pnpm","pnpm dlx skills add gjbvsjjvgm-sketch\u002FWORM_V2_SOVEREIGN --skill distributed-llm-pretraining-torchtitan","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fgjbvsjjvgm-sketch\u002FWORM_V2_SOVEREIGN\u002Fblob\u002Fmain\u002Fcore\u002Fhermes-agent\u002Foptional-skills\u002Fmlops\u002Ftorchtitan\u002FSKILL.md",true,[78,84,88,92],{"path":79,"resourceType":80,"resourceTypeDesc":81,"sizeBytes":82,"sourceHtmlUrl":83},"references\u002Fcheckpoint.md","REFERENCE","参考文档",4216,"https:\u002F\u002Fgithub.com\u002Fgjbvsjjvgm-sketch\u002FWORM_V2_SOVEREIGN\u002Fblob\u002Fmain\u002Fcore\u002Fhermes-agent\u002Foptional-skills\u002Fmlops\u002Ftorchtitan\u002Freferences\u002Fcheckpoint.md",{"path":85,"resourceType":80,"resourceTypeDesc":81,"sizeBytes":86,"sourceHtmlUrl":87},"references\u002Fcustom-models.md",7383,"https:\u002F\u002Fgithub.com\u002Fgjbvsjjvgm-sketch\u002FWORM_V2_SOVEREIGN\u002Fblob\u002Fmain\u002Fcore\u002Fhermes-agent\u002Foptional-skills\u002Fmlops\u002Ftorchtitan\u002Freferences\u002Fcustom-models.md",{"path":89,"resourceType":80,"resourceTypeDesc":81,"sizeBytes":90,"sourceHtmlUrl":91},"references\u002Ffloat8.md",4055,"https:\u002F\u002Fgithub.com\u002Fgjbvsjjvgm-sketch\u002FWORM_V2_SOVEREIGN\u002Fblob\u002Fmain\u002Fcore\u002Fhermes-agent\u002Foptional-skills\u002Fmlops\u002Ftorchtitan\u002Freferences\u002Ffloat8.md",{"path":93,"resourceType":80,"resourceTypeDesc":81,"sizeBytes":94,"sourceHtmlUrl":95},"references\u002Ffsdp.md",3888,"https:\u002F\u002Fgithub.com\u002Fgjbvsjjvgm-sketch\u002FWORM_V2_SOVEREIGN\u002Fblob\u002Fmain\u002Fcore\u002Fhermes-agent\u002Foptional-skills\u002Fmlops\u002Ftorchtitan\u002Freferences\u002Ffsdp.md",[97,140,165,182,200,219],{"skillNo":98,"name":99,"nameZh":6,"description":100,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":101,"categories":102,"keywords":119,"publishedAt":38},"01M71QG27G1R2H2ZWEG4S0WTZT","writing-plans","Write implementation plans: bite-sized tasks, paths, code.","https:\u002F\u002Fgithub.com\u002Fgjbvsjjvgm-sketch\u002FWORM_V2_SOVEREIGN\u002Fblob\u002Fmain\u002Fcore\u002Fskills\u002Fsoftware-development\u002Fwriting-plans\u002FSKILL.md",[103,108,111,116],{"categoryNo":104,"categoryName":105,"taxonomyType":106,"taxonomyTypeDesc":107},"01JBSEEDCAT000000000000015","视觉设计","SCENARIO","使用场景",{"categoryNo":109,"categoryName":110,"taxonomyType":106,"taxonomyTypeDesc":107},"01JBSEEDCAT000000000000018","写作与文案",{"categoryNo":112,"categoryName":113,"taxonomyType":114,"taxonomyTypeDesc":115},"01JBSEEDCAT000000000000030","开发工程师","PROFESSION","适用职业",{"categoryNo":117,"categoryName":118,"taxonomyType":114,"taxonomyTypeDesc":115},"01JBSEEDCAT000000000000036","内容创作者",[120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139],"writing","writing plans","plans","test-driven","test-driven-development","superpowers","design","workflow","code","tasks","subagent","code-review","review","documentation","write","paths","planning","development","test","implementation",{"skillNo":141,"name":124,"nameZh":6,"description":142,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":143,"categories":144,"keywords":151,"publishedAt":38},"01M71QFZYRTJXMAE551MRAKZ14","TDD: enforce RED-GREEN-REFACTOR, tests before code.","https:\u002F\u002Fgithub.com\u002Fgjbvsjjvgm-sketch\u002FWORM_V2_SOVEREIGN\u002Fblob\u002Fmain\u002Fcore\u002Fskills\u002Fsoftware-development\u002Ftest-driven-development\u002FSKILL.md",[145,148],{"categoryNo":146,"categoryName":147,"taxonomyType":106,"taxonomyTypeDesc":107},"01JBSEEDCAT000000000000007","代码审查",{"categoryNo":149,"categoryName":150,"taxonomyType":106,"taxonomyTypeDesc":107},"01JBSEEDCAT000000000000008","测试与质量",[152,137,138,153,154,155,156,125,120,157,128,130,158,159,160,161,162,122,163,164],"test driven development","driven","green","red-green-refactor","testing","debugging","systematic","refactor","systematic-debugging","enforce","tests","tdd","quality",{"skillNo":166,"name":160,"nameZh":6,"description":167,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":168,"categories":169,"keywords":171,"publishedAt":38},"01M71QFWR5Q8EYEQ6MCS3SM6MC","4-phase root cause debugging: understand bugs before fixing.","https:\u002F\u002Fgithub.com\u002Fgjbvsjjvgm-sketch\u002FWORM_V2_SOVEREIGN\u002Fblob\u002Fmain\u002Fcore\u002Fskills\u002Fsoftware-development\u002Fsystematic-debugging\u002FSKILL.md",[170],{"categoryNo":149,"categoryName":150,"taxonomyType":106,"taxonomyTypeDesc":107},[172,157,158,123,173,174,124,125,120,130,175,176,137,177,122,178,138,179,180,181],"systematic debugging","problem","problem-solving","phase","bugs","root cause","root-cause","investigation","understand","hermes",{"skillNo":183,"name":184,"nameZh":6,"description":185,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":186,"categories":187,"keywords":193,"publishedAt":38},"01M71QFS9S04MD8JP747W5WM0N","subagent-driven-development","Execute plans via delegate_task subagents (2-stage review).","https:\u002F\u002Fgithub.com\u002Fgjbvsjjvgm-sketch\u002FWORM_V2_SOVEREIGN\u002Fblob\u002Fmain\u002Fcore\u002Fskills\u002Fsoftware-development\u002Fsubagent-driven-development\u002FSKILL.md",[188,189,192],{"categoryNo":109,"categoryName":110,"taxonomyType":106,"taxonomyTypeDesc":107},{"categoryNo":190,"categoryName":191,"taxonomyType":106,"taxonomyTypeDesc":107},"01JBSEEDCAT000000000000023","Skill与智能体开发",{"categoryNo":117,"categoryName":118,"taxonomyType":114,"taxonomyTypeDesc":115},[194,130,137,153,123,124,195,196,125,120,127,128,131,132,197,26,122,198,199,138],"subagent driven development","delegate","delegation","subagents","stage","task",{"skillNo":201,"name":202,"nameZh":6,"description":203,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":204,"categories":205,"keywords":208,"publishedAt":38},"01M71QFQ1DBCVAZ511MXFE6T2V","requesting-code-review","Pre-commit review: security scan, quality gates, auto-fix.","https:\u002F\u002Fgithub.com\u002Fgjbvsjjvgm-sketch\u002FWORM_V2_SOVEREIGN\u002Fblob\u002Fmain\u002Fcore\u002Fskills\u002Fsoftware-development\u002Frequesting-code-review\u002FSKILL.md",[206,207],{"categoryNo":146,"categoryName":147,"taxonomyType":106,"taxonomyTypeDesc":107},{"categoryNo":112,"categoryName":113,"taxonomyType":114,"taxonomyTypeDesc":115},[209,210,128,132,123,124,211,212,125,213,120,214,215,130,131,216,217,137,218,122],"code review","requesting code review","fix","auto-fix","auto","security scan","commit","verification","security","scan",{"skillNo":220,"name":221,"nameZh":6,"description":222,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":223,"categories":224,"keywords":226,"publishedAt":38},"01M71QFM7KWM540YR67FRN807Q","python-debugpy","Debug Python: pdb REPL + debugpy remote (DAP).","https:\u002F\u002Fgithub.com\u002Fgjbvsjjvgm-sketch\u002FWORM_V2_SOVEREIGN\u002Fblob\u002Fmain\u002Fcore\u002Fskills\u002Fsoftware-development\u002Fpython-debugpy\u002FSKILL.md",[225],{"categoryNo":112,"categoryName":113,"taxonomyType":114,"taxonomyTypeDesc":115},[227,228,229,230,231,232,233,234,157,158,235,236,237,160,238,239,240,241,181,242],"debugpy","python debugpy","python","dap","inspect","post-mortem","pdb","remote","debugger","node","commands","debug","post","breakpoints","node-inspect","tui"]