nemo_automodel.components.models.muse_glimmer.state_dict_adapter

View as Markdown

Hugging Face checkpoint adapter for legacy and canonical MuseGlimmer exports.

Module Contents

Classes

NameDescription
MuseGlimmerStateDictAdapterMap canonical nested MuseGlimmer checkpoint keys to the native legacy module tree.

API

class nemo_automodel.components.models.muse_glimmer.state_dict_adapter.MuseGlimmerStateDictAdapter(
config: nemo_automodel.components.models.muse_glimmer.config.MuseGlimmerConfig
)

Bases: StateDictAdapter

Map canonical nested MuseGlimmer checkpoint keys to the native legacy module tree.

uses_canonical_layout
nemo_automodel.components.models.muse_glimmer.state_dict_adapter.MuseGlimmerStateDictAdapter._canonical_to_native_key(
key: str
) -> str
staticmethod
nemo_automodel.components.models.muse_glimmer.state_dict_adapter.MuseGlimmerStateDictAdapter._native_to_canonical_key(
key: str
) -> str | None
staticmethod
nemo_automodel.components.models.muse_glimmer.state_dict_adapter.MuseGlimmerStateDictAdapter.convert_single_tensor_to_hf(
fqn: str,
tensor: typing.Any,
kwargs: typing.Any = {}
) -> list[tuple[str, typing.Any]]

Convert one native MuseGlimmer tensor to its Hugging Face checkpoint representation.

nemo_automodel.components.models.muse_glimmer.state_dict_adapter.MuseGlimmerStateDictAdapter.from_hf(
hf_state_dict: dict[str, typing.Any],
kwargs: typing.Any = {}
) -> dict[str, typing.Any]
nemo_automodel.components.models.muse_glimmer.state_dict_adapter.MuseGlimmerStateDictAdapter.to_hf(
state_dict: dict[str, typing.Any],
exclude_key_regex: str | None = None,
kwargs: typing.Any = {}
) -> dict[str, typing.Any]