docstr: Loads a state_dict expecting the state_dict to contain key,values 
  only for the adapter parameters.
docstr_tok: ["Loads","a","state_dict","expecting","the","state_dict","to","contain","key",",","values","only","for","the","adapter","parameters","."]
code: def load_state_dict(self, state_dict, strict: bool = True):
      """
      Loads a state_dict expecting the state_dict to contain key,values
      only for the adapter parameters.
      """
      for name, module in self.frozen_model.named_modules():
          if (
              isinstance(module, adapter_mixins.AdapterModuleMixin)
              and module.is_adapter_available()
          ):
              for adapter_key in self.adapter_name_keys:
                  adapter_module = module.get_adapter_module(
                      adapter_key
                  )
                  if adapter_module:
                      state_adapter_key = ":".join([name, adapter_key])
                      adapter_module.load_state_dict(
                          state_dict[state_adapter_key], strict
                      )
              module.set_enabled_adapters(enabled=True)
  
imports: import itertools
  import os
  import torch
  from omegaconf.dictconfig import DictConfig
  from pytorch_lightning.trainer.trainer import Trainer
  from nemo.collections.common.parts.adapter_modules import LinearAdapterConfig
  from nemo.collections.nlp.models.language_modeling.megatron_gpt_model import MegatronGPTModel
  from nemo.collections.nlp.models.language_modeling.megatron_gpt_prompt_learning_model import MegatronGPTPromptLearningModel
  from nemo.collections.nlp.modules.common import VirtualPromptStyle
  from nemo.collections.nlp.modules.common.megatron.adapters.parallel_adapters import AdapterName, InfusedAdapterConfig, MLPInfusedAdapterConfig, ParallelLinearAdapterConfig
  from nemo.collections.nlp.modules.common.megatron.utils import average_losses_across_data_parallel_group
  from nemo.collections.nlp.parts.nlp_overrides import NLPSaveRestoreConnector
  from nemo.collections.nlp.parts.utils_funcs import get_last_rank
  from nemo.core.classes.mixins import adapter_mixins
  from nemo.utils import logging, model_utils
label_desc: Use image node_id 7 for calling the MegatronGPTBaseAdapterModel obj's underlying member method code with example usage: obj.load_state_dict(state_dict, strict) without return types