class_docstr: ## Auto-Regressive model
  
  This is a autoregressive transformer model that uses DeepNorm.
class_docstr_tok: ["#","#","Auto-Regressive","model","This","is","a","autoregressive","transformer","model","that","uses","DeepNorm","."]
docstr: :param n_tokens: is the number of tokens in the vocabulary
  :param d_model: is the embedding size
  :param n_layers: is the number of transformer layers
  :param layer: is the layer. We use `n_layers` copies of this for the tranformer.
docstr_tok: [":","param","n_tokens",":","is","the","number","of","tokens","in","the","vocabulary",":","param","d_model",":","is","the","embedding","size",":","param","n_layers",":","is","the","number","of","transformer","layers",":","param","layer",":","is","the","layer",".","We","use","`","n_layers","`","copies","of","this","for","the","tranformer","."]
code: def __init__(
      self,
      n_tokens: int,
      d_model: int,
      n_layers: int,
      layer: DeepNormTransformerLayer,
  ):
      """
      :param n_tokens: is the number of tokens in the vocabulary
      :param d_model: is the embedding size
      :param n_layers: is the number of transformer layers
      :param layer: is the layer. We use `n_layers` copies of this for the tranformer.
      """
      super().__init__()
      # Transformer with `n_layers` layers
      self.transformer = nn.Sequential(
          *[copy.deepcopy(layer) for _ in range(n_layers)]
      )
  
      # Token embedding layer
      self.emb = nn.Embedding(n_tokens, d_model)
      # Readout layer
      self.readout = nn.Linear(d_model, n_tokens)
  
file_path: annotated_deep_learning_paper_implementations/labml_nn/normalization/deep_norm/experiment.py
imports: import copy
  import torch
  import torch.nn
  from labml import experiment
  from labml.configs import option
  from labml_helpers.module import Module
  from labml_nn.experiments.nlp_autoregression import NLPAutoRegressionConfigs
  from labml_nn.normalization.deep_norm import DeepNormTransformerLayer
  from labml_nn.transformers import MultiHeadAttention
  from labml_nn.transformers.feed_forward import FeedForward
label_desc: Use image node_id 1 to create a new AutoregressiveTransformer object from inherited base classes: Module with example: obj = AutoregressiveTransformer(n_tokens, d_model, n_layers, layer)