> This page is for version Latest.
> 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.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.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.nvidia.com/nemo/automodel/_mcp/server.

# nemo_automodel.components.models.step5.vision

Step perception encoder with shared, configuration-derived rotary tables.

## Module Contents

### Classes

| Name                                                                                      | Description                                                               |
| ----------------------------------------------------------------------------------------- | ------------------------------------------------------------------------- |
| [`Step5VisionEncoder`](#nemo_automodel-components-models-step5-vision-Step5VisionEncoder) | Reuse the Step encoder while owning derived-state initialization.         |
| [`Step5VisionRotary`](#nemo_automodel-components-models-step5-vision-Step5VisionRotary)   | Share one derived table across vision layers; never serialize or cast it. |

### API

```python
class nemo_automodel.components.models.step5.vision.Step5VisionEncoder(
    config: nemo_automodel.components.models.step5.configuration.Step5VisionConfig
)
```

**Bases:** [StepRoboticsVisionEncoder](/nemo-automodel/nemo_automodel/components/models/step3p7/vision_encoder#nemo_automodel-components-models-step3p7-vision_encoder-StepRoboticsVisionEncoder)

Reuse the Step encoder while owning derived-state initialization.

```python
nemo_automodel.components.models.step5.vision.Step5VisionEncoder.forward(
    pixels: torch.Tensor,
    downsample: bool = False
) -> torch.Tensor
```

Encode images, optionally completing projection inputs inside the FSDP owner.

**Parameters:**

**`pixels`** `torch.Tensor`

Images of shape \[images, channels, height, width].

---

**`downsample`** `bool` — default: False

Apply both checkpoint-owned stride-2 convolutions before
FSDP reshards the vision module's parameters.

---

**Returns:** `torch.Tensor`

Patch features \[images, patches, width], or downsampled features

```python
nemo_automodel.components.models.step5.vision.Step5VisionEncoder.reset_parameters() -> None
```

Initialize every vision parameter after allocation from meta.

```python
class nemo_automodel.components.models.step5.vision.Step5VisionRotary(
    config: nemo_automodel.components.models.step5.configuration.Step5VisionConfig
)
```

**Bases:** `Module`

Share one derived table across vision layers; never serialize or cast it.

**`_frequencies`** `Tensor | None = None`

---

**`_signature`** `tuple[device, dtype, int, int] | None = None`

---

**`dim`** `= config.width // config.heads`

---

**`maximum_grid`** `= config.image_size // config.patch_size`

---

**`theta`**

---

**`use_cls_token`** `= config.use_cls_token`

---

```python
nemo_automodel.components.models.step5.vision.Step5VisionRotary.forward(
    q: torch.Tensor,
    k: torch.Tensor,
    grid_hw: tuple[int, int]
) -> tuple[torch.Tensor, torch.Tensor]
```

Apply the source encoder's interleaved 2D RoPE.

**Parameters:**

**`q`** `torch.Tensor`

Tensor \[images, heads, image_tokens, head_dim].

---

**`k`** `torch.Tensor`

Tensor with q's shape and dtype.

---

**`grid_hw`** `tuple[int, int]`

Patch-grid height and width; image_tokens includes the
optional leading class token.

---

**Returns:** `torch.Tensor`

Rotated Q and K with their original shape and dtype. Frequencies