> 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.step3p7.state_dict_adapter

## Module Contents

### Classes

| Name                                                                                                              | Description                          |
| ----------------------------------------------------------------------------------------------------------------- | ------------------------------------ |
| [`Step3p7StateDictAdapter`](#nemo_automodel-components-models-step3p7-state_dict_adapter-Step3p7StateDictAdapter) | Adapter for Step3.7 VLM checkpoints. |

### Functions

| Name                                                                                                | Description |
| --------------------------------------------------------------------------------------------------- | ----------- |
| [`_mtp_layer_range`](#nemo_automodel-components-models-step3p7-state_dict_adapter-_mtp_layer_range) | -           |

### API

```python
class nemo_automodel.components.models.step3p7.state_dict_adapter.Step3p7StateDictAdapter(
    config: typing.Any,
    moe_config: nemo_automodel.components.moe.config.MoEConfig,
    backend: nemo_automodel.components.models.common.BackendConfig,
    dtype: torch.dtype = torch.bfloat16
)
```

**Bases:** [StateDictAdapter](/nemo-automodel/nemo_automodel/components/checkpoint/state_dict_adapter#nemo_automodel-components-checkpoint-state_dict_adapter-StateDictAdapter)

Adapter for Step3.7 VLM checkpoints.

The released checkpoint stores the Step3.5 language backbone at top-level
keys such as `model.layers.*` and stores vision keys as
`vision_model.*` / `vit_large_projector.*`.  The native AutoModel VLM
keeps the language backbone under `model.language_model` so PP can split
it as a nested text module, and reuses the Step3p5 expert-weight adapter for
EP sharding.

```python
nemo_automodel.components.models.step3p7.state_dict_adapter.Step3p7StateDictAdapter._is_text_key(
    key: str
) -> bool
```

staticmethod

```python
nemo_automodel.components.models.step3p7.state_dict_adapter.Step3p7StateDictAdapter._map_mtp_from_hf(
    key: str
) -> str | None
```

```python
nemo_automodel.components.models.step3p7.state_dict_adapter.Step3p7StateDictAdapter._map_mtp_to_hf(
    key: str
) -> str | None
```

```python
nemo_automodel.components.models.step3p7.state_dict_adapter.Step3p7StateDictAdapter._map_non_text_from_hf(
    key: str
) -> str | None
```

staticmethod

```python
nemo_automodel.components.models.step3p7.state_dict_adapter.Step3p7StateDictAdapter._map_non_text_to_hf(
    key: str
) -> str
```

staticmethod

```python
nemo_automodel.components.models.step3p7.state_dict_adapter.Step3p7StateDictAdapter._to_native_text_key(
    key: str
) -> str
```

staticmethod

```python
nemo_automodel.components.models.step3p7.state_dict_adapter.Step3p7StateDictAdapter._to_text_hf_key(
    key: str
) -> str
```

staticmethod

```python
nemo_automodel.components.models.step3p7.state_dict_adapter.Step3p7StateDictAdapter.convert_single_tensor_to_hf(
    fqn: str,
    tensor: typing.Any,
    kwargs: typing.Any = {}
) -> list[tuple[str, typing.Any]]
```

```python
nemo_automodel.components.models.step3p7.state_dict_adapter.Step3p7StateDictAdapter.from_hf(
    hf_state_dict: dict[str, typing.Any],
    device_mesh: torch.distributed.device_mesh.DeviceMesh | None = None,
    kwargs: typing.Any = {}
) -> dict[str, typing.Any]
```

```python
nemo_automodel.components.models.step3p7.state_dict_adapter.Step3p7StateDictAdapter.to_hf(
    state_dict: dict[str, typing.Any],
    exclude_key_regex: str | None = None,
    quantization: bool = False,
    kwargs: typing.Any = {}
) -> dict[str, typing.Any]
```

```python
nemo_automodel.components.models.step3p7.state_dict_adapter._mtp_layer_range(
    config: typing.Any
) -> tuple[int, int]
```