code: def __init__(
      self, config: OPTConfig, load_weight_prefix=None, **kwargs
  ):
      super().__init__(**kwargs)
      self.config = config
      self.padding_idx = config.pad_token_id
      self.layerdrop = config.layerdrop
      num_embeddings = config.max_position_embeddings
      self.embed_tokens = TFSharedEmbeddings(
          config.vocab_size,
          config.word_embed_proj_dim,
          config.pad_token_id,
          name="embed_tokens",
      )
      self.embed_positions = TFOPTLearnedPositionalEmbedding(
          num_embeddings,
          config.hidden_size,
          name="embed_positions",
      )
  
      # Note that the only purpose of `config._remove_final_layer_norm` is to keep backward compatibility
      # with checkpoints that have been fine-tuned before transformers v4.20.1
      # see https://github.com/facebookresearch/metaseq/pull/164
      if (
          config.do_layer_norm_before
          and not config._remove_final_layer_norm
      ):
          self.final_layer_norm = tf.keras.layers.LayerNormalization(
              epsilon=1e-5, name="final_layer_norm"
          )
      else:
          self.final_layer_norm = None
  
      if config.word_embed_proj_dim != config.hidden_size:
          self.project_out = tf.keras.layers.Dense(
              config.word_embed_proj_dim,
              name="project_out",
              use_bias=False,
          )
          self.project_in = tf.keras.layers.Dense(
              config.hidden_size, name="project_in", use_bias=False
          )
  
      else:
          self.project_in = None
          self.project_out = None
  
      self.layers = [
          TFOPTDecoderLayer(config, name=f"layers.{i}")
          for i in range(config.num_hidden_layers)
      ]
      self.dropout = tf.keras.layers.Dropout(config.dropout)
  
imports: from typing import Optional, Tuple, Union
  import numpy
  import tensorflow
  from ...activations_tf import get_tf_activation
  from ...modeling_tf_outputs import TFBaseModelOutputWithPast, TFCausalLMOutputWithPast
  from ...modeling_tf_utils import DUMMY_INPUTS, TFCausalLanguageModelingLoss, TFModelInputType, TFPreTrainedModel, TFSharedEmbeddings, keras_serializable, unpack_inputs
  from ...tf_utils import shape_list, stable_softmax
  from ...utils import add_code_sample_docstrings, add_start_docstrings, add_start_docstrings_to_model_forward, logging, replace_return_docstrings
  from .configuration_opt import OPTConfig
label_desc: Use image node_id 1 to create a new TFOPTDecoder object from inherited base classes: tf.keras.layers with example: obj = TFOPTDecoder(config, load_weight_prefix)