> This page is for version 0.5.0 · 26.06.
> 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.glm5_next.parallelization

Keep GLM-5.3's tiny FP32 holders gathered between forward and backward.

## Module Contents

### Classes

| Name                                                                                                                 | Description                                                      |
| -------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------- |
| [`Glm5NextModelParallelizer`](#nemo_automodel-components-models-glm5_next-parallelization-Glm5NextModelParallelizer) | Retain native FSDP gradient reduction for gathered FP32 holders. |

### Data

[`PARALLELIZER`](#nemo_automodel-components-models-glm5_next-parallelization-PARALLELIZER)

### API

```python
class nemo_automodel.components.models.glm5_next.parallelization.Glm5NextModelParallelizer()
```

**Bases:** `ModelParallelizer`

Retain native FSDP gradient reduction for gathered FP32 holders.

```python
nemo_automodel.components.models.glm5_next.parallelization.Glm5NextModelParallelizer._fully_shard_module(
    module: 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
```

Apply FSDP, retaining only the small model-owned FP32 holders.

**Parameters:**

**`module`** `nn.Module`

Native module to shard. Only the mHC and KDA FP32
parameter holders override the caller's reshard policy.

---

**`mesh`** `DeviceMesh`

Existing FSDP mesh, unchanged for holder parameters.

---

**`mp_policy`** `MixedPrecisionPolicy`

Existing compute/reduction precision policy.

---

**`offload_policy`** `OffloadPolicy | None` — default: None

Existing parameter/gradient offload policy.

---

**`reshard_after_forward`** `bool | int | None` — default: None

Caller policy for every non-holder module.

---

**`ignored_params`** `set[nn.Parameter] | None` — default: None

Parameters already owned by another parallelism
boundary; their membership is preserved.

---

**Returns:** `nn.Module`

The module wrapped by the native FSDP2 primitive.

```python
nemo_automodel.components.models.glm5_next.parallelization.PARALLELIZER = Glm5NextModelParallelizer()
```