nativ3ai/hermes-agent-camel/torchtitan
Claude Code and agent skill by nativ3ai/hermes-agent-camel
- community
Checking that the SKILL.md file is still in the repository.
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.
Install
npx vskill@latest install nativ3ai/hermes-agent-camel/torchtitanSKILL.md
The same SKILL.md was published earlier as aivrar/portable-hermes-agent/torchtitan.
TorchTitan - PyTorch Native Distributed LLM Pretraining
Quick start
TorchTitan 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.
Installation:
Download tokenizer:
Start training on 8 GPUs:
Common workflows
Workflow 1: Pretrain Llama 3.1 8B on single node
Copy this checklist:
Step 1: Download tokenizer
Step 2: Configure training
Edit or create a TOML config file:
Step 3: Launch training
Step 4: Monitor and checkpoint
TensorBoard logs are saved to ./outputs/tb/:
Workflow 2: Multi-node training with SLURM
Step 1: Configure parallelism for scale
For 70B model on 256 GPUs (32 nodes):
Step 2: Set up SLURM script
Step 3: Submit job
Step 4: Resume from checkpoint
Training auto-resumes if checkpoint exists in configured folder.
Workflow 3: Enable Float8 training for H100s
Float8 provides 30-50% speedup on H100 GPUs.
Step 1: Install torchao
Step 2: Configure Float8
Add to your TOML config:
Step 3: Launch with compile
Workflow 4: 4D parallelism for 405B models
Step 1: Create seed checkpoint
Required for consistent initialization across PP stages:
Step 2: Configure 4D parallelism
Step 3: Launch on 512 GPUs
When to use vs alternatives
Use TorchTitan when:
- Pretraining LLMs from scratch (8B to 405B+)
- Need PyTorch-native solution without third-party dependencies
- Require composable 4D parallelism (FSDP2, TP, PP, CP)
- Training on H100s with Float8 support
- Want interoperable checkpoints with torchtune/HuggingFace
Use alternatives instead:
- Megatron-LM: Maximum performance for NVIDIA-only deployments
- DeepSpeed: Broader ZeRO optimization ecosystem, inference support
- Axolotl/TRL: Fine-tuning rather than pretraining
- LitGPT: Educational, smaller-scale training
Common issues
Issue: Out of memory on large models
Enable activation checkpointing and reduce batch size:
Or use gradient accumulation:
Issue: TP causes high memory with async collectives
Set environment variable:
Issue: Float8 training not faster
Float8 only benefits large GEMMs. Filter small layers:
Issue: Checkpoint loading fails after parallelism change
Use DCP's resharding capability:
Issue: Pipeline parallelism initialization
Create seed checkpoint first (see Workflow 4, Step 1).
Supported models
| Model | Sizes | Status | |
|---|---|---|---|
| Llama 3.1 | 8B, 70B, 405B | Production | |
| Llama 4 | Various | Experimental | |
| DeepSeek V3 | 16B, 236B, 671B (MoE) | Experimental | |
| GPT-OSS | 20B, 120B (MoE) | Experimental | |
| Qwen 3 | Various | Experimental | |
| Flux | Diffusion | Experimental |
Performance benchmarks (H100)
| Model | GPUs | Parallelism | TPS/GPU | Techniques | |
|---|---|---|---|---|---|
| Llama 8B | 8 | FSDP | 5,762 | Baseline | |
| Llama 8B | 8 | FSDP+compile+FP8 | 8,532 | +48% | |
| Llama 70B | 256 | FSDP+TP+AsyncTP | 876 | 2D parallel | |
| Llama 405B | 512 | FSDP+TP+PP | 128 | 3D parallel |
Advanced topics
FSDP2 configuration: See references/fsdp.md for detailed FSDP2 vs FSDP1 comparison and ZeRO equivalents.
Float8 training: See references/float8.md for tensorwise vs rowwise scaling recipes.
Checkpointing: See references/checkpoint.md for HuggingFace conversion and async checkpointing.
Adding custom models: See references/custom-models.md for TrainSpec protocol.
Resources
- GitHub: https://github.com/pytorch/torchtitan
- Paper: https://arxiv.org/abs/2410.06511
- ICLR 2025: https://iclr.cc/virtual/2025/poster/29620
- PyTorch Forum: https://discuss.pytorch.org/c/distributed/torchtitan/44
Security
- Security scanPassed, 95 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingoptional-skills/mlops/torchtitan/SKILL.md
Popularity
- Repository stars
- 193
- Repository forks
- 18
- 7-day trend score
- 26
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/nativ3ai/hermes-agent-camel/torchtitan)