# distributed-training-pytorch-fsdp

This skill guides PyTorch FSDP work, from parameter sharding to mixed precision and CPU offload. Use it when building or debugging distributed training code.

- skill · `type=skill` · Claude Code · 101 installs
- Author: Orchestra Research
- License: MIT · policy=link-only · description only; the file stays with the author
- Source: https://github.com/davila7/claude-code-templates/tree/HEAD/cli-tool/components/skills/ai-research/distributed-training-pytorch-fsdp
- Updated: 2026-10-24
- HTML: https://affpapa.org/en/nevibecode/skills/distributed-training-pytorch-fsdp

## What it does

The skill covers PyTorch FSDP concepts and implementation work, including parameter sharding, mixed-precision training, CPU offloading, and FSDP2. It is aimed at questions about the API, setup decisions, and debugging distributed training code.

Its reference material also includes `torch.distributed` and the `Join` context for workers that process different amounts of input. `Joinable` and `JoinHook` show how custom hooks can keep collective operations aligned when one process finishes early. The listed dependencies are `torch>=2.0` and `transformers`, so a project using an older PyTorch release does not meet the stated requirement.

## Install

### Claude Code (native platform)

1. **claude-code-templates**
```bash
npx claude-code-templates@latest --skill ai-research/distributed-training-pytorch-fsdp
```

2. **Skills CLI (Vercel)**
```bash
npx skills add davila7/claude-code-templates --skill distributed-training-pytorch-fsdp -a claude-code
```

3. **Manually: put the files in place**
- File: `~/.claude/skills/distributed-training-pytorch-fsdp/SKILL.md` — Copy the whole skill folder; for one project use .claude/skills/distributed-training-pytorch-fsdp/

### Codex

**Manually: put the files in place**
- File: `.agents/skills/distributed-training-pytorch-fsdp/SKILL.md` — For all projects use ~/.agents/skills/

### Cursor

**Manually: put the files in place**
- File: `.cursor/skills/distributed-training-pytorch-fsdp/SKILL.md` — Cursor also reads .agents/skills/ and .claude/skills/

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install davila7/claude-code-templates distributed-training-pytorch-fsdp
```

2. **Manually: put the files in place**
- File: `.github/skills/distributed-training-pytorch-fsdp/SKILL.md`

### Gemini CLI

**Platform CLI**
```bash
gemini skills install https://github.com/davila7/claude-code-templates --path cli-tool/components/skills/ai-research/distributed-training-pytorch-fsdp
```

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/skills/distributed-training-pytorch-fsdp/SKILL.md` — The legacy .windsurf/skills/ path still works

### Claude.ai

**Claude.ai**
- Zip the folder and upload it in Settings → Capabilities → Skills

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/davila7/claude-code-templates/tree/HEAD/cli-tool/components/skills/ai-research/distributed-training-pytorch-fsdp

## When to use it
- configure parameter sharding with PyTorch FSDP
- choose a mixed-precision setup
- move a training design to FSDP2
- handle uneven input counts across workers
- debug code built on `torch.distributed`

## Example prompts
- Explain how to set up parameter sharding and mixed precision with PyTorch FSDP.
- Show how to use `Join` when workers receive different numbers of inputs.
- Review this `torch.distributed` training code and suggest a fix for the error.

## Similar
- [skill-creator](https://affpapa.org/en/nevibecode/skills/skill-creator.md) — skill · 414180 installs
- [writing-for-agents](https://affpapa.org/en/nevibecode/skills/writing-for-agents.md) — skill · 466719 installs
- [media-use](https://affpapa.org/en/nevibecode/skills/media-use.md) — skill · 1100000 installs
- [mcp-builder](https://affpapa.org/en/nevibecode/skills/mcp-builder.md) — skill · 130949 installs
- [subagent-driven-development](https://affpapa.org/en/nevibecode/skills/subagent-driven-development.md) — skill · 237746 installs
- [orchestration](https://affpapa.org/en/nevibecode/skills/orchestration.md) — skill · 350300 installs

From the same set: [davila7/claude-code-templates](https://affpapa.org/en/nevibecode/by/davila7/claude-code-templates.md) — 495 cards

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
