nemo_automodel.components.models.qwen3_next.state_dict_adapter
nemo_automodel.components.models.qwen3_next.state_dict_adapter
Module Contents
Classes
Data
API
Bases: MoESplitExpertsStateDictMixin, StateDictAdapter
Converts between HF Qwen3Next checkpoints and our grouped-experts native format.
hf_to_internal_map
internal_to_hf_map
Apply key substring mappings to state dict keys.
Parameters:
state_dict
State dict to apply mappings to
mapping
Dictionary mapping substrings to replace them with
Returns: dict[str, Any]
New state dict with mapped keys
Convert a single tensor from native format to HuggingFace format.
Parameters:
fqn
Fully qualified name of the tensor in native format
tensor
The tensor to convert
**kwargs
Additional arguments for conversion
Returns: list[tuple[str, Any]]
List of (fqn, tensor) tuples in HuggingFace format