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","."]
code: def add_cmdline_args(
      cls, parser: ParlaiParser, partial_opt: Optional[Opt] = None
  ) -> ParlaiParser:
      agent = parser.add_argument_group("DialoGPT Args")
      agent.add_argument(
          "--gpt2-size",
          type=str,
          default="medium",
          choices=["small", "medium", "large"],
          help="Which size model to initialize.",
      )
      parser.set_defaults(
          delimiter="<|endoftext|>",
          history_add_global_end_token="<|endoftext|>",
          text_truncate=768,
          label_truncate=256,
          dict_maxexs=0,  # skip building dictionary
      )
      super().add_cmdline_args(parser, partial_opt=partial_opt)
      warn_once(
          "WARNING: this model is in beta and the API is subject to change."
      )
      return agent
  
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 1 for calling the DialogptAgent obj's underlying member method code with example usage: obj.add_cmdline_args(cls, parser, partial_opt) and returns: agent