class_docstr: ## Auto regressive model
class_docstr_tok: ["#","#","Auto","regressive","model"]
code: def __init__(
      self, src_embed: Module, encoder: Encoder, generator: Generator
  ):
      super().__init__()
      # Token embedding module
      self.src_embed = src_embed
      # Transformer based encoder
      self.encoder = encoder
      # Next token generation layer;
      # this give logits  of the the next token
      self.generator = generator
      # This will be initialized on the first call
      self.src_mask = None
  
file_path: annotated_deep_learning_paper_implementations/labml_nn/transformers/glu_variants/experiment.py
imports: import torch
  from labml import experiment
  from labml.configs import option
  from labml.utils.pytorch import get_modules
  from labml_helpers.module import Module
  from labml_nn.experiments.nlp_autoregression import NLPAutoRegressionConfigs
  from labml_nn.transformers import Encoder, Generator, TransformerConfigs
  from labml_nn.transformers.utils import subsequent_mask
label_desc: Use image node_id 1 to create a new AutoregressiveModel object from inherited base classes: Module with example: obj = AutoregressiveModel(src_embed, encoder, generator)