class_docstr: base class for all mixin based adapter models
docstr: Gets the keys associated with the adapters only.
docstr_tok: ["Gets","the","keys","associated","with","the","adapters","only","."]
code: def get_peft_state_dict(
      self,
  ):
      """
      Gets the keys associated with the adapters only.
      """
      state_dict = self.model.state_dict(
          prefix="model.module."
          if self.cfg.megatron_amp_O2
          else "model."
      )
      peft_state_dict = {}
      for k in self.adapter_keys:
          # state_dict keys needs to be in non-O2 format and will be corrected in PEFTSaveRestoreConnector if O2=True
          new_k = k.replace("model.module.", "model.", 1)
          peft_state_dict[new_k] = state_dict[k]
      return peft_state_dict
  
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 6 for calling the MegatronGPTPEFTModel obj's underlying member method code with example usage: obj.get_peft_state_dict() and returns: peft_state_dict