class_docstr: Hugging Face DialoGPT Agent.
  
  DialoGPT is based on GPT2, which is a multi-layer decoder-only Transformer.
  The decoder is initialized with pretrained weights from Hugging Face.
  Read more about this model here
  <https://huggingface.co/transformers/model_doc/dialogpt.html>.
  
  DialoGPT comes in three  sizes: small, medium, large.
  
  If you are finetuning the Dialogpt Agent as a dialogue agent, be sure
  to run `--add-special-tokens True`. To examine the performance of the
  agent out of the box, run with `--add-special-tokens False`, and make
  sure that the batch size is 1.
class_docstr_tok: ["Hugging","Face","DialoGPT","Agent",".","DialoGPT","is","based","on","GPT2",",","which","is","a","multi-layer","decoder-only","Transformer",".","The","decoder","is","initialized","with","pretrained","weights","from","Hugging","Face",".","Read","more","about","this","model","here","<","https",":","\/\/huggingface.co\/transformers\/model_doc\/dialogpt.html",">",".","DialoGPT","comes","in","three","sizes",":","small",",","medium",",","large",".","If","you","are","finetuning","the","Dialogpt","Agent","as","a","dialogue","agent",",","be","sure","to","run","`","--","add-special-tokens","True","`",".","To","examine","the","performance","of","the","agent","out","of","the","box",",","run","with","`","--","add-special-tokens","False","`",",","and","make","sure","that","the","batch","size","is","1","."]
docstr: Build and return model.
docstr_tok: ["Build","and","return","model","."]
code: def build_model(self, states=None):
      """
      Build and return model.
      """
      return DialoGPTModel(self.opt, self.dict)
  
file_path: ParlAI/parlai/agents/hugging_face/dialogpt.py
imports: from typing import Optional
  from parlai.core.params import ParlaiParser
  from parlai.core.opt import Opt
  from parlai.agents.hugging_face.dict import DialoGPTDictionaryAgent
  from parlai.agents.hugging_face.gpt2 import Gpt2Agent, GPT2Decoder, HFGPT2Model
  from parlai.utils.misc import warn_once
label_desc: Use image node_id 3 for calling the DialogptAgent obj's underlying member method code with example usage: obj.build_model(states) and returns: DialoGPTModel