> ## Documentation Index
> Fetch the complete documentation index at: https://kalarislabs.com/llms.txt
> Use this file to discover all available pages before exploring further.

# pytorch-fsdp2 — AI agent skill for ml training

> Adds PyTorch FSDP2 (fully_shard) to training scripts with correct init, sharding, mixed precision/offload config, and distributed checkpointing.

# `pytorch-fsdp2`

> Adds PyTorch FSDP2 (fully\_shard) to training scripts with correct init, sharding, mixed precision/offload config, and distributed checkpointing. Use when models exceed single-GPU memory or when you need DTensor-based sharding with DeviceMesh.

**Category:** [ml-training](/skills#ml-training) · **License:** MIT · **Version:** 1.0.0

## Install

```bash theme={null}
npx research-agent-skills install pytorch-fsdp2
npx skills add KalarisLabs/research-agent-skills --skill pytorch-fsdp2
```

## When to use it

Adds PyTorch FSDP2 (fully\_shard) to training scripts with correct init, sharding, mixed precision/offload config, and distributed checkpointing. Use when models exceed single-GPU memory or when you need DTensor-based sharding with DeviceMesh.

## Full playbook

Read [SKILL.md](https://github.com/KalarisLabs/research-agent-skills/blob/main/skills/pytorch-fsdp2/SKILL.md) for the complete workflow, references and any scripts. The agent installer copies the full skill folder.
