class_docstr: Prompt Tuning implementation.
  
  Args:
      model_config: The model configuration.
      adapters_config: The adapter configuration.
      base_model_embeddings:
          The embedding layer of the base model (used to initialize the prompt embedding if
          prompt_init='from_string').
code: def __init__(
      self,
      model_config: PretrainedConfig,
      adapters_config: ModelAdaptersConfig,
      base_model_embeddings: nn.Module,
  ):
      super().__init__()
      self.model_config = model_config
      self.adapters_config = adapters_config
      self.base_model_embeddings = base_model_embeddings
      self.prompt_tunings = nn.ModuleDict()
  
imports: import math
  from typing import Callable, Dict, List, Union
  import numpy
  import torch
  from torch import nn
  from transformers import AutoTokenizer
  from transformers.configuration_utils import PretrainedConfig
  from ..composition import AdapterCompositionBlock
  from ..configuration import ModelAdaptersConfig, PromptTuningConfig
  from ..context import ForwardContext
  from .adapter_layer_base import AdapterLayerBase
label_desc: Use image node_id 1 to create a new PromptTuningLayer object from inherited base classes: AdapterLayerBase, nn with example: obj = PromptTuningLayer(model_config, adapters_config, base_model_embeddings)