code: def from_config(cls, cfg):
      model = cls.__bases__[1].from_pretrained("gpt2")
      model.resize_token_embeddings(cfg["len_tokenizer"])
      return model
  
file_path: lavis/lavis/models/gpt_models/gpt_dialogue.py
imports: import torch
  import torch.nn
  from lavis.common.registry import registry
  from lavis.models.base_model import BaseModel
  from torch.nn import CrossEntropyLoss, MSELoss
  from transformers import GPT2LMHeadModel
  from transformers.modeling_outputs import CausalLMOutputWithCrossAttentions
label_desc: Use image node_id 3 for calling the GPTDialogue obj's underlying member method code with example usage: obj.from_config(cls, cfg) and returns: model