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 forward(self, hidden_states: torch.Tensor):
      prefix_attention_mask_length = None
      adapter_setup = self.get_active_setup()
      if adapter_setup is not None and len(adapter_setup) > 0:
          first_adapter = adapter_setup.first()
          if first_adapter in self.prompt_tunings:
              (
                  hidden_states,
                  prefix_attention_mask_length,
              ) = self.prompt_tunings[first_adapter](hidden_states)
  
      context = ForwardContext.get_context()
      if context is not None:
          context.prompt_tokens_length = prefix_attention_mask_length
  
      return hidden_states
  
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 10 for calling the PromptTuningLayer obj's underlying member method code with example usage: obj.forward(hidden_states) and returns: hidden_states