What problem does it solve? Training large models exhausts GPU memory when parameters, gradients, and optimizer states are replicated on every worker. This Skill provides guidance and runnable patterns for PyTorch FSDP, which shards model state across data-parallel workers to fit models that would otherwise not fit on a single device. ## Core Features & Use Cases - FSDP1 and FSDP2 (fully_shard) guidance: Covers wrapping strategies, sharding strategies, DTensor-based per-parameter sharding, and migration from FSDP1 to FSDP2. - Memory and performance patterns: Mixed precision, CPU offloading, communication/computation overlap, and prefetching control drawn from official PyTorch documentation. - Distributed training reference: Process group initialization, backend selection (NCCL, Gloo, MPI), checkpointing, and the Join context manager for uneven inputs. - Use Case: When training a multi-billion-parameter transformer across 8 GPUs, use this Skill to apply fully_shard bottom-up per layer, configure mixed precision, and produce sharded state dict checkpoints. ## Quick Start Ask the agent to show how to wrap a Transformer model with PyTorch FSDP2 fully_shard using a 1D CUDA device mesh and mixed precision.