pytorch-fsdp2

Implement PyTorch FSDP2 for distributed training with parameter sharding and checkpointing.

Updated Apr 11, 2026
One-click install
npx skills add https://github.com/hhhi21g/HealthCenter --skill pytorch-fsdp2-hhhi21g
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: pytorch-fsdp2
Source: https://github.com/hhhi21g/HealthCenter/tree/main/.codex/skills/pytorch-fsdp2
Command: npx skills add https://github.com/hhhi21g/HealthCenter --skill pytorch-fsdp2-hhhi21g

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires torch, and includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill addresses the challenge of training large models that exceed single-GPU memory capacity, enabling efficient distributed training with PyTorch FSDP2.

Core Features & Use Cases

  • Fully Sharded Data Parallel (FSDP2): Adds FSDP2 to training scripts for efficient parameter sharding, mixed precision, and offload configurations.
  • Distributed Checkpointing: Supports distributed checkpointing for robust training sessions.
  • Use Case: Ideal for researchers and engineers working with large-scale models that require distributed training to fit within GPU memory constraints.

Quick Start

Use the pytorch-fsdp2 skill to enable FSDP2 for your PyTorch training script and optimize for distributed training.

Frequently Asked Questions about pytorch-fsdp2

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

FAQPage Schema
How do I train large models in PyTorch that exceed single-GPU memory capacity?

PyTorch distributed training for large models uses parameter sharding and mixed precision to fit models within GPU memory constraints. Implementing FSDP2 enables efficient training across multiple GPUs when model size exceeds single-GPU memory capacity.

Does PyTorch FSDP2 support mixed precision and CPU offload configurations?

Yes, FSDP2 supports mixed precision and offload configurations for distributed training. These features help optimize memory usage during large model training by managing parameter precision and offloading parameters when needed.

How do I save and load distributed checkpoints when training large models with sharded parameters?

Distributed checkpointing in FSDP2 supports robust training sessions for large models with sharded parameters. It enables saving and loading distributed checkpoints to preserve sharded parameter states across multiple GPUs for recovery or evaluation.

What is the best way to shard model parameters across multiple GPUs in PyTorch?

Fully Sharded Data Parallel (FSDP2) is an efficient way to shard model parameters across multiple GPUs in PyTorch. It shards parameters, gradients, and optimizer states across distributed processes to optimize memory usage and enable large model training.

Do I need specific PyTorch libraries to enable FSDP2 for large model distributed training?

Enabling FSDP2 for large model distributed training requires PyTorch and compatible libraries. The torch framework provides the necessary modules to handle parameter sharding, mixed precision, and offload configurations correctly.