class_docstr: A single transformer layer.
  
  Transformer layer takes input with size [s, b, h] and returns an
  output of the same size.
      
class_docstr_tok: ["A","single","transformer","layer",".","Transformer","layer","takes","input","with","size","[","s",",","b",",","h","]","and","returns","an","output","of","the","same","size","."]
code: def __init__(
      self,
      config: TransformerConfig,
      submodules: TransformerLayerSubmodules,
      layer_number: int = 1,
      self_attn_mask_type=AttnMaskType.padding,
  ):
      if not HAVE_MEGATRON_CORE:
          raise ImportError(
              "megatron-core was not found. Please see the NeMo README for installation instructions: https://github.com/NVIDIA/NeMo#megatron-gpt."
          )
      super().__init__(
          config=config,
          submodules=submodules,
          layer_number=layer_number,
      )
  
      if hasattr(self.config, "new_decoder_architecture"):
          self.new_decoder_architecture = (
              self.config.new_decoder_architecture
          )
      else:
          self.new_decoder_architecture = None
      if hasattr(self.config, "parallel_attention"):
          self.parallel_attention = self.config.parallel_attention
      else:
          self.parallel_attention = None
  
      if self.new_decoder_architecture or self.parallel_attention:
          self.post_self_attn_layernorm = None
      else:
          self.post_self_attn_layernorm = build_module(
              submodules.post_self_attn_layernorm,
              config=self.config,
              hidden_size=self.config.hidden_size,
              eps=self.config.layernorm_epsilon,
          )
      if self.new_decoder_architecture:
          self.pre_mlp_layernorm = build_module(
              submodules.pre_mlp_layernorm,
              config=self.config,
              hidden_size=self.config.hidden_size,
              eps=self.config.layernorm_epsilon,
          )
      else:
          self.pre_mlp_layernorm = None
  
imports: from nemo.collections.nlp.modules.common.megatron.utils import ApexGuardDefaults
label_desc: Use image node_id 1 to create a new FalconTransformerLayer object from inherited base classes: TransformerLayer with example: obj = FalconTransformerLayer(config, submodules, layer_number, _attn_mask_type)