class_docstr: Transformer decoder consisting of *config.num_hidden_layers* layers. Each layer is a [`LlamaDecoderLayer`]
  
  Args:
      config: LlamaConfig
class_docstr_tok: ["Transformer","decoder","consisting","of","*","config.num_hidden_layers","*","layers",".","Each","layer","is","a","[","`","LlamaDecoderLayer","`","]","Args",":","config",":","LlamaConfig"]
code: def __init__(self, config: LlamaConfig):
      super().__init__(config)
      self.padding_idx = config.pad_token_id
      self.vocab_size = config.vocab_size
  
      self.embed_tokens = nn.Embedding(
          config.vocab_size, config.hidden_size, self.padding_idx
      )
      self.layers = nn.ModuleList(
          [
              LlamaDecoderLayer(config)
              for _ in range(config.num_hidden_layers)
          ]
      )
      self.norm = LlamaRMSNorm(
          config.hidden_size, eps=config.rms_norm_eps
      )
  
      self.gradient_checkpointing = False
      # Initialize weights and apply final processing
      self.post_init()
  
imports: import math
  from typing import List, Optional, Tuple, Union
  import torch
  import torch.utils.checkpoint
  from torch import nn
  from torch.nn import BCEWithLogitsLoss, CrossEntropyLoss, MSELoss
  from transformers.activations import ACT2FN
  from transformers.modeling_outputs import BaseModelOutputWithPast, CausalLMOutputWithPast, SequenceClassifierOutputWithPast
  from transformers.modeling_utils import PreTrainedModel
  from transformers.utils import add_start_docstrings, add_start_docstrings_to_model_forward, logging, replace_return_docstrings
  from transformers.models.llama.configuration_llama import LlamaConfig
label_desc: Use image node_id 1 to create a new LlamaModel object from inherited base classes: LlamaPreTrainedModel with example: obj = LlamaModel(config)