nemo_automodel.components.models.step3p7.state_dict_adapter

View as Markdown

Module Contents

Classes

NameDescription
Step3p7StateDictAdapterAdapter for Step3.7 VLM checkpoints.

Functions

NameDescription
_mtp_layer_range-

API

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

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.

text_adapter
nemo_automodel.components.models.step3p7.state_dict_adapter.Step3p7StateDictAdapter._is_text_key(
key: str
) -> bool
staticmethod
nemo_automodel.components.models.step3p7.state_dict_adapter.Step3p7StateDictAdapter._map_mtp_from_hf(
key: str
) -> str | None
nemo_automodel.components.models.step3p7.state_dict_adapter.Step3p7StateDictAdapter._map_mtp_to_hf(
key: str
) -> str | None
nemo_automodel.components.models.step3p7.state_dict_adapter.Step3p7StateDictAdapter._map_non_text_from_hf(
key: str
) -> str | None
staticmethod
nemo_automodel.components.models.step3p7.state_dict_adapter.Step3p7StateDictAdapter._map_non_text_to_hf(
key: str
) -> str
staticmethod
nemo_automodel.components.models.step3p7.state_dict_adapter.Step3p7StateDictAdapter._to_native_text_key(
key: str
) -> str
staticmethod
nemo_automodel.components.models.step3p7.state_dict_adapter.Step3p7StateDictAdapter._to_text_hf_key(
key: str
) -> str
staticmethod
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]]
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]
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]
nemo_automodel.components.models.step3p7.state_dict_adapter._mtp_layer_range(
config: typing.Any
) -> tuple[int, int]