class_docstr: Base class for all models
      
class_docstr_tok: ["Base","class","for","all","models"]
code: def __init__(self, config, tokenizer):
      # load parameters info
      super(AbstractModel, self).__init__()
      self.device = config["device"]
      self.config = config
      self.tokenizer = tokenizer
      self.source_max_length = config["src_len"]
      self.target_max_length = config["tgt_len"]
  
      # check model
      self.model_name = config["model_name"]
      self.is_casual_model = bool(self.model_name in CLM_MODELS)
      self.is_seq2seq_model = bool(
          self.model_name in SEQ2SEQ_MODELS
          or self.model_name in RNN_MODELS
      )
  
      self.is_prompt_tuning = (
          "prompt-tuning" in config["efficient_methods"]
      )
      self.label_smoothing = (
          config["label_smoothing"]
          if config["label_smoothing"]
          else 0.0
      )
  
imports: import torch
  import torch.nn
  from textbox import CLM_MODELS, SEQ2SEQ_MODELS, RNN_MODELS, PLM_MODELS
  from transformers import EncoderDecoderModel
  import os
  from typing import List, Optional, Tuple, Union
  from transformers.modeling_utils import get_parameter_dtype
  from collections import OrderedDict
label_desc: Use image node_id 1 to create a new AbstractModel object from inherited base classes: nn with example: obj = AbstractModel(config, tokenizer)