fsdp

Distribute PyTorch model training across multiple GPUs using FSDP sharding strategies.

Updated Aug 27, 2026
One-click install
npx skills add https://github.com/tylertitsworth/skills --skill fsdp
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: fsdp
Source: https://github.com/tylertitsworth/skills/tree/main/fsdp
Command: npx skills add https://github.com/tylertitsworth/skills --skill fsdp

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

FSDP enables training of very large models by sharding parameters, gradients, and optimizer state across GPUs, reducing per-GPU memory and enabling models that don't fit on a single device.

Core Features & Use Cases

  • Sharding strategies (FULL_SHARD, SHARD_GRAD_OP, NO_SHARD) to tailor memory/compute tradeoffs for large-scale training.
  • Mixed precision, activation checkpointing, and CPU offload options to maximize memory savings and performance.
  • Integrations with HuggingFace Trainer or Accelerate for streamlined workflows and multi-node setups.

Quick Start

Configure a multi-GPU training run using FSDP and launch it with torchrun or Accelerate.

Frequently Asked Questions about fsdp

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I train large transformer models that won't fit on a single GPU?

PyTorch FSDP enables training large transformer models by sharding parameters, gradients, and optimizer state across GPUs, reducing per-GPU memory for models that exceed single-device capacity.

What is the difference between FULL_SHARD and SHARD_GRAD_OP sharding strategies?

FULL_SHARD shards parameters, gradients, and optimizer state across GPUs for maximum memory savings, while SHARD_GRAD_OP only shards gradients and optimizer state, trading higher memory usage for reduced communication overhead.

Can I use FSDP with HuggingFace Trainer and Accelerate for distributed training?

Yes, FSDP integrates directly with HuggingFace Trainer and Accelerate to streamline multi-GPU and multi-node distributed training workflows, simplifying configuration and launch processes for large-scale models.

Does PyTorch FSDP support mixed precision and activation checkpointing?

Yes, FSDP supports mixed precision training and activation checkpointing to maximize memory savings and performance, alongside optional CPU offload to further reduce GPU memory constraints during large-scale training.

How do I save and load checkpoints when training with FSDP?

FSDP provides practical guidance for saving and loading distributed checkpoints, ensuring model state is correctly persisted and restored across sharded multi-GPU and multi-node training scenarios without data loss.

When should I use CPU offload with PyTorch FSDP?

Use CPU offload with FSDP when GPU memory is insufficient for large model training, as it offloads parameters to CPU memory to enable training of larger models at the cost of increased data transfer overhead.