class_docstr: Base class for all models
      
class_docstr_tok: ["Base","class","for","all","models"]
code: def generate_setting(self, config):
      # geneation settings
      self.generation_kwargs = {}
      self.generation_kwargs["max_length"] = self.target_max_length
      if self.model_name in PLM_MODELS:
          # transformer models
          self.generation_kwargs["decoder_start_token_id"] = (
              self.configuration.decoder_start_token_id
              if self.model_name != "mbart"
              else self.tokenizer.lang_code_to_id[
                  self.tokenizer.tgt_lang
              ]
          )
      self.generation_kwargs.update(config["generation_kwargs"] or {})
  
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 2 for calling the AbstractModel obj's underlying member method code with example usage: obj.generate_setting(config) without return types