nemo_automodel.components.models.qwen3_omni_moe.state_dict_adapter
nemo_automodel.components.models.qwen3_omni_moe.state_dict_adapter
Module Contents
Classes
Data
API
Bases: MoESplitExpertsStateDictMixin, StateDictAdapter
Converts between HF Qwen3OmniMoe checkpoints and grouped-experts native format.
Namespace a native key the way the HF omni checkpoint expects.
PEFT adapter keys keep their base_model.model. outer prefix, so for
those the thinker. namespace goes inside it — matching how PEFT
names modules on the actual HF omni model.
Remove the omni checkpoint’s thinker. namespace.
Give target_modules the same namespace the exported tensors get.
from_hf records whether the base checkpoint nests the text tower under
thinker.; to_hf and convert_single_tensor_to_hf both honor that
flag, so target_modules has to honor it too. Otherwise the two halves of one
checkpoint name different modules and PEFT cannot match them up.
On the full omni layout the namespace is required: PEFT suffix-matches target_modules against the receiving model, so an entry without it also hits the talker’s identically named modules, which then get adapters the checkpoint has no weights for and stay randomly initialized. On a standalone-thinker base the namespace does not exist on the receiving model at all, and adding it makes PEFT reject the adapter with “Target modules … not found”.
Parameters:
A target-module name in native layout.
Legacy export selection; omni uses one module layout for both.
Returns: str
Target-module name in the layout the exported tensors use.