pytorch-fsdp

Implement fully sharded data-parallel training for PyTorch models.

1|Updated Jul 31, 2026
One-click install
npx skills add https://github.com/icyzh/hermes-web --skill pytorch-fsdp-icyzh
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: pytorch-fsdp
Source: https://github.com/icyzh/hermes-web/tree/main/optional-skills/mlops/pytorch-fsdp
Command: npx skills add https://github.com/icyzh/hermes-web --skill pytorch-fsdp-icyzh

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve?

This skill addresses the memory constraints and communication overhead associated with training massive deep learning models by providing expert guidance on implementing Fully Sharded Data Parallelism.

Core Features & Use Cases

  • Memory Optimization: Provides strategies for sharding model parameters, gradients, and optimizer states across multiple GPUs.
  • Distributed Training Support: Offers best practices for configuring process groups, backends like NCCL, and handling uneven inputs with the Join context manager.
  • Use Case: When training a large language model that exceeds the memory capacity of a single GPU, use this skill to configure FSDP to shard the model across a cluster, enabling efficient training without sacrificing performance.

Quick Start

Use the pytorch-fsdp skill to generate a boilerplate configuration for initializing a distributed process group and wrapping a model with fully_shard.

Frequently Asked Questions about pytorch-fsdp

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

FAQPage Schema
How do I train large PyTorch models that exceed a single GPU's memory capacity?

To train large PyTorch models exceeding single GPU memory, use Fully Sharded Data Parallelism to shard parameters, gradients, and optimizer states across multi-GPU clusters. This skill provides boilerplate configurations to wrap models with fully_shard for efficient distributed training.

What is Fully Sharded Data Parallelism and when should I use it for distributed training?

Fully Sharded Data Parallelism is a distributed training mechanism that shards model states across GPUs to optimize memory. Use it when training massive deep learning models that face memory constraints, enabling high-throughput training without sacrificing performance.

How do I handle uneven inputs across GPUs during FSDP training?

To handle uneven inputs across GPUs during FSDP training, use the Join context manager. This skill provides distributed training support and best practices for managing uneven inputs and process group configurations.

Can I use FSDP with Hugging Face transformers models?

Yes, you can use FSDP with Hugging Face transformers as this skill lists transformers as a dependency. It facilitates wrapping large language models with fully_shard to enable parameter sharding across clusters.

Does this skill support the new FSDP2 APIs for PyTorch?

Yes, this skill satisfies technical requirements for high-throughput training using FSDP2 APIs. It provides expert guidance on implementing fully sharded data-parallel training and generating boilerplate configurations with the latest FSDP2 API.