pytorch-fsdp

Guide distributed training with PyTorch FSDP parameter sharding and mixed precision.

Updated Jun 9, 2026
One-click install
npx skills add https://github.com/zhouboyu-xreal/Hermes-Memory --skill pytorch-fsdp-zhouboyu-xreal
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: pytorch-fsdp
Source: https://github.com/zhouboyu-xreal/Hermes-Memory/tree/main/optional-skills/mlops/pytorch-fsdp
Command: npx skills add https://github.com/zhouboyu-xreal/Hermes-Memory --skill pytorch-fsdp-zhouboyu-xreal

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires torch>=2.0, transformers, and includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill provides expert guidance for efficient distributed training with PyTorch FSDP, addressing challenges with parameter sharding, mixed precision, CPU offloading, and more.

Core Features & Use Cases

  • Parameter Sharding: Facilitates distributed training by sharding parameters across multiple devices.
  • Mixed Precision: Optimizes training speed and efficiency with mixed precision arithmetic.
  • CPU Offloading: Enables efficient CPU offloading for improved performance.
  • FSDP2 Support: Offers support for the latest FSDP2 features for improved usability and performance.
  • Use Case: Ideal for large-scale machine learning models where efficient distributed training is crucial.

Quick Start

To get started with the pytorch-fsdp skill, use the following command: Run the FSDP-enabled training script with the specified parameters and device configuration.

Frequently Asked Questions about pytorch-fsdp

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

FAQPage Schema
How do I use PyTorch FSDP for distributed training of large-scale models?

PyTorch FSDP enables distributed training by sharding model parameters across multiple devices, optimizing memory usage for large-scale machine learning projects. It requires PyTorch 2.0 or higher and integrates with transformers.

What is parameter sharding in PyTorch distributed training?

Parameter sharding in distributed training distributes model parameters across multiple GPUs rather than replicating them. PyTorch FSDP facilitates this process to reduce per-device memory footprint for large-scale deep learning models.

Can I use mixed precision and CPU offloading with PyTorch FSDP?

Yes, PyTorch FSDP supports mixed precision arithmetic to optimize training speed and CPU offloading to reduce memory overhead. These features improve performance and enable training of larger models.

Does PyTorch FSDP2 offer improvements over standard FSDP?

FSDP2 provides improved usability and performance features over standard FSDP. This Skill offers expert guidance on leveraging FSDP2 for efficient distributed data parallelism in large-scale machine learning workflows.

Do I need specific dependencies to run PyTorch FSDP training scripts?

You need PyTorch version 2.0 or higher and the transformers library installed. These dependencies are required to execute FSDP-enabled training scripts with parameter sharding and mixed precision capabilities.

When should I use PyTorch FSDP instead of standard distributed data parallelism?

Use PyTorch FSDP for large-scale machine learning models where memory constraints limit standard distributed data parallelism. FSDP's parameter sharding and CPU offloading capabilities manage memory more efficiently for massive deep learning architectures.