class_docstr: Transformer decoder consisting of *config.num_layers* layers. Each layer is a [`TFXGLMDecoderLayer`]
  
  Args:
      config: XGLMConfig
      embed_tokens: [TFSharedEmbeddings]: output embedding
class_docstr_tok: ["Transformer","decoder","consisting","of","*","config.num_layers","*","layers",".","Each","layer","is","a","[","`","TFXGLMDecoderLayer","`","]","Args",":","config",":","XGLMConfig","embed_tokens",":","[","TFSharedEmbeddings","]",":","output","embedding"]
code: def call(
      self,
      input_ids: TFModelInputType | None = None,
      attention_mask: np.ndarray | tf.Tensor | None = None,
      position_ids: np.ndarray | tf.Tensor | None = None,
      encoder_hidden_states: np.ndarray | tf.Tensor | None = None,
      encoder_attention_mask: np.ndarray | tf.Tensor | None = None,
      head_mask: np.ndarray | tf.Tensor | None = None,
      cross_attn_head_mask: np.ndarray | tf.Tensor | None = None,
      past_key_values: Optional[
          Tuple[Tuple[Union[np.ndarray, tf.Tensor]]]
      ] = None,
      inputs_embeds: np.ndarray | tf.Tensor | None = None,
      use_cache: Optional[bool] = None,
      output_attentions: Optional[bool] = None,
      output_hidden_states: Optional[bool] = None,
      return_dict: Optional[bool] = None,
      training: Optional[bool] = False,
      **kwargs: Any,
  ) -> Union[
      TFBaseModelOutputWithPastAndCrossAttentions, Tuple[tf.Tensor]
  ]:
      outputs = self.model(
          input_ids=input_ids,
          attention_mask=attention_mask,
          encoder_hidden_states=encoder_hidden_states,
          encoder_attention_mask=encoder_attention_mask,
          head_mask=head_mask,
          cross_attn_head_mask=cross_attn_head_mask,
          past_key_values=past_key_values,
          inputs_embeds=inputs_embeds,
          use_cache=use_cache,
          output_attentions=output_attentions,
          output_hidden_states=output_hidden_states,
          return_dict=return_dict,
          training=training,
      )
  
      return outputs
  
imports: from __future__ import annotations
  import math
  import random
  from typing import Any, Optional, Tuple, Union
  import numpy
  import tensorflow
  from ...activations_tf import get_tf_activation
  from ...file_utils import add_code_sample_docstrings, add_start_docstrings, add_start_docstrings_to_model_forward, replace_return_docstrings
  from ...modeling_tf_outputs import TFBaseModelOutputWithPastAndCrossAttentions, TFCausalLMOutputWithCrossAttentions
  from ...modeling_tf_utils import TFCausalLanguageModelingLoss, TFModelInputType, TFPreTrainedModel, TFSharedEmbeddings, get_initializer, keras_serializable, unpack_inputs
  from ...tf_utils import check_embeddings_within_bounds, shape_list, stable_softmax
  from ...utils import logging
  from .configuration_xglm import XGLMConfig
label_desc: Use image node_id 2 for calling the TFXGLMModel obj's underlying member method code with example usage: obj.call(input_ids, attention_mask, position_ids, encoder_hidden_states, encoder_attention_mask, head_mask, cross_attn_head_mask, past_key_values, inputs_embeds, use_cache, output_attentions, output_hidden_states, return_dict, training) and returns: outputs