class_docstr: Want to combine adapters and p-tuning? Why not? they are orthogonal methods.
  This class includes both sets of params.
code: def __init__(self, cfg: DictConfig, trainer: Trainer):
      self.peft_name_keys = [
          AdapterName.PRE_ATTN_ADAPTER,
          AdapterName.POST_ATTN_ADAPTER,
          AdapterName.PTUNING_ADAPTER,
      ]
      ptuning_cfg = PromptEncoderAdapterConfig(
          cfg.peft.p_tuning.virtual_tokens,
          cfg.peft.p_tuning.bottleneck_dim,
          cfg.peft.p_tuning.embedding_dim,
          cfg.peft.p_tuning.init_std,
          cfg.hidden_size,
      )
      adapter_tuning_cfg = cfg.peft.adapter_tuning
      adapter_cfg = ParallelLinearAdapterConfig(
          in_features=cfg.hidden_size,
          out_features=cfg.hidden_size,
          dim=adapter_tuning_cfg.adapter_dim,
          norm_position=adapter_tuning_cfg.get("norm_position", "pre"),
          norm_type=adapter_tuning_cfg.get(
              "norm_type", "mixedfusedlayernorm"
          ),
          column_init_method=adapter_tuning_cfg.get(
              "column_init_method", "xavier"
          ),
          row_init_method=adapter_tuning_cfg.get(
              "row_init_method", "zero"
          ),
          dropout=adapter_tuning_cfg.adapter_dropout,
      )
  
      self.name_key_to_cfg = {
          AdapterName.PRE_ATTN_ADAPTER: adapter_cfg,
          AdapterName.POST_ATTN_ADAPTER: adapter_cfg,
          AdapterName.PTUNING_ADAPTER: ptuning_cfg,
      }
      logging.warning(
          "AdapterPTuning doesn't support mcore for now. need to use regex to match target."
      )
      self.name_key_to_mcore_mixins = {
          AdapterName.PRE_ATTN_ADAPTER: [
              ("", MCoreTransformerLayerMixin)
          ],
          AdapterName.POST_ATTN_ADAPTER: [
              ("", MCoreTransformerLayerMixin)
          ],
          AdapterName.PTUNING_ADAPTER: [
              ("embedding", MCoreGPTEmbeddingMixin)
          ],
      }
      super().__init__(cfg, trainer)
      self.virtual_tokens = cfg.peft.p_tuning.virtual_tokens
  
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 1 to create a new MegatronGPTAdapterPTuningModel object from inherited base classes: MegatronGPTPEFTModel with example: obj = MegatronGPTAdapterPTuningModel(cfg, trainer)