---
title: thunder.distributed.FSDPType
description: Specifies the sharding strategy to be used for FSDP in Thunder.
canonical: >-
  https://lightning.ai/docs/thunder/stable/api-reference/generated/thunder.distributed.FSDPType
---
# thunder.distributed.FSDPType {#thunder-distributed-fsdptype}

### `class thunder.distributed.FSDPType(value)` {#thunder.distributed.FSDPType}

[\[source\]](https://github.com/Lightning-AI/lightning-thunder/blob/0.2.6/thunder/distributed/__init__.py#L324-L334)

Bases: [`Enum`](https://docs.python.org/3/library/enum.html#enum.Enum "(in Python v3.15)")

Specifies the sharding strategy to be used for FSDP in Thunder.

#### `ZERO2` {#thunder.distributed.FSDPType.ZERO2}

[\[source\]](https://github.com/Lightning-AI/lightning-thunder/blob/thunder/distributed.py)

Similar to `torch.distributed.fsdp.ShardingStrategy.SHARD_GRAD_OP`.

#### `ZERO3` {#thunder.distributed.FSDPType.ZERO3}

[\[source\]](https://github.com/Lightning-AI/lightning-thunder/blob/thunder/distributed.py)

Similar to `torch.distributed.fsdp.ShardingStrategy.FULL_SHARD`.

#### `__init__()` {#thunder.distributed.FSDPType.__init__}

[\[source\]](https://github.com/Lightning-AI/lightning-thunder/blob/thunder/distributed.py)

Attributes

- [`ZERO2`](#thunder.distributed.FSDPType.ZERO2)
- [`ZERO3`](#thunder.distributed.FSDPType.ZERO3)

---

**Navigation**

- Parent: [Generated](/docs/thunder/0.2.6/api-reference/generated.md)
