class_docstr: MegatronGPTInfusedAdapterModel is a model that combines a base model (GPTSFTModel) with a "Infused Adapter that can Inhibiting and Amplify Inner Activations", known as IA3.
  This class supports the addition of IA3 into a transformer based LM as described in Liu et al. (https://arxiv.org/pdf/2205.05638.pdf)
  
  Three adapter's are inserted into each Transformer layer in the base GPT Model. Each adapter is basically a vector that simply scales the key, value or ffn hidden representations.
  
  It is assumed that these set of adapters will then be trained for a specific task.
  Once trained, the adapter weights will be saved and can be re-loaded
  and infused into the same GPT Model for inference.
code: def __init__(self, cfg: DictConfig, trainer: Trainer):
      self.peft_name_keys = [
          AdapterName.KEY_INFUSED,
          AdapterName.VALUE_INFUSED,
          AdapterName.MLP_INFUSED,
      ]
  
      mlp_infused_adapter_cfg = MLPInfusedAdapterConfig(
          in_features=cfg.ffn_hidden_size
          // cfg.tensor_model_parallel_size
      )
      infused_adapter_cfg = InfusedAdapterConfig(
          in_features=cfg.hidden_size // cfg.tensor_model_parallel_size
      )
  
      self.name_key_to_cfg = {}
      for k in self.peft_name_keys:
          if k == AdapterName.MLP_INFUSED:
              self.name_key_to_cfg[k] = mlp_infused_adapter_cfg
          elif k in [
              AdapterName.KEY_INFUSED,
              AdapterName.VALUE_INFUSED,
          ]:
              self.name_key_to_cfg[k] = infused_adapter_cfg
          else:
              raise ValueError(f"PEFT Key {k} is unknown.")
  
      self.layer_selection = cfg.peft.ia3_tuning.get(
          "layer_selection", None
      )
      if self.layer_selection is None:
          self.layer_selection = list(range(1, cfg.num_layers + 1))
  
      super().__init__(cfg, trainer)
  
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 MegatronGPTIA3Model object from inherited base classes: MegatronGPTLayerwisePEFTModel with example: obj = MegatronGPTIA3Model(cfg, trainer)