> This page is for version Nightly (default).
> For other versions, use one of these documentation indexes:
> - Nightly (default): https://docs.nvidia.com/nemo/automodel/nightly/llms.txt
> - Latest: https://docs.nvidia.com/nemo/automodel/latest/llms.txt
> - 0.7.0 · 26.10: https://docs.nvidia.com/nemo/automodel/v0.7/llms.txt
> - 0.5.0 · 26.06: https://docs.nvidia.com/nemo/automodel/v0.5/llms.txt
> - 0.4.0 · 26.04: https://docs.nvidia.com/nemo/automodel/v0.4/llms.txt

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.nvidia.com/nemo/automodel/llms.txt.

# nemo_automodel.components.models.hy_v4_flash.fsdp

FSDP policy of the Hy4-flash decoder root.

The decoder blocks are sharded by dtype by the shared MoE parallelizer, but the root `HYV4FlashModel` also owns the
fp32 output hyper-connection (`hc_head`) next to the bf16 final norm. FSDP requires one parameter dtype per unit and
would cast `hc_head` to the bf16 policy dtype, so `hc_head` gets its own fp32 unit before the root is sharded.

## Module Contents

### Classes

| Name                                                                                                          | Description                                                      |
| ------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------- |
| [`HYV4FlashModelParallelizer`](#nemo_automodel-components-models-hy_v4_flash-fsdp-HYV4FlashModelParallelizer) | Give the fp32 output hyper-connection a dtype-uniform FSDP unit. |

### Data

[`PARALLELIZER`](#nemo_automodel-components-models-hy_v4_flash-fsdp-PARALLELIZER)

### API

```python
class nemo_automodel.components.models.hy_v4_flash.fsdp.HYV4FlashModelParallelizer()
```

**Bases:** `ModelParallelizer`

Give the fp32 output hyper-connection a dtype-uniform FSDP unit.

```python
nemo_automodel.components.models.hy_v4_flash.fsdp.HYV4FlashModelParallelizer._fully_shard_module(
    module: torch.nn.Module | list[torch.nn.Module],
    mesh: torch.distributed.device_mesh.DeviceMesh,
    mp_policy: torch.distributed.fsdp.MixedPrecisionPolicy,
    offload_policy: torch.distributed.fsdp.OffloadPolicy | None = None,
    reshard_after_forward: bool | int | None = None,
    ignored_params: set[torch.nn.Parameter] | None = None
) -> torch.nn.Module | list[torch.nn.Module]
```

Shard `module` in place like the base parallelizer, first isolating a directly owned `hc_head`.

```python
nemo_automodel.components.models.hy_v4_flash.fsdp.PARALLELIZER = HYV4FlashModelParallelizer()
```