class_docstr: base class for all mixin based adapter models
code: def load_state_dict(self, state_dict, strict: bool = True):
      if len(state_dict) == 0:
          return  # checkpoint is loaded in on_load_checkpoint()
      if self.setup_complete:
          # at this stage only PEFT params will appear in the state_dict arg
          # so we only update those while the rest of the model is frozen.
          # setting strict=False will ignore the missing keys (which are not being updated anyway)
          # explicitly check if state_dict.keys matches all the expected self.adapter_keys since we don't have the
          # safety in strict=True anymore.
          if self.megatron_amp_O2:
              adapter_keys = set(
                  key.replace("model.", "model.module.", 1)
                  for key in self.adapter_keys
              )
          else:
              adapter_keys = self.adapter_keys
          assert set(state_dict.keys()) == adapter_keys
          super().load_state_dict(state_dict, strict=False)
      else:
          super().load_state_dict(state_dict, strict=True)
  
imports: from omegaconf.dictconfig import DictConfig
  from pytorch_lightning.trainer.trainer import Trainer
  from nemo.collections.nlp.models.language_modeling.megatron_gpt_sft_model import MegatronGPTSFTModel
  from nemo.collections.nlp.modules.common.megatron.adapters.mcore_mixins import MCoreGPTEmbeddingMixin, MCoreSelfAttentionMixin, MCoreTransformerLayerMixin, swap_mcore_mixin
  from nemo.collections.nlp.modules.common.megatron.adapters.parallel_adapters import AdapterName, InfusedAdapterConfig, LoraKQVAdapterConfig, LoraKQVAdapterWeightTyingConfig, MLPInfusedAdapterConfig, ParallelLinearAdapterConfig, ParallelLinearAdapterWeightTyingConfig, PromptEncoderAdapterConfig
  from nemo.core.classes.mixins import adapter_mixins
  from nemo.utils import logging, model_utils
  from nemo.utils.decorators import deprecated
label_desc: Use image node_id 9 for calling the MegatronGPTPEFTModel obj's underlying member method code with example usage: obj.load_state_dict(state_dict, strict) without return types