class_docstr: A constraint based on the GPT-2 language model.
  
  from "Better Language Models and Their Implications"
  (openai.com/blog/better-language-models/)
  
  Args:
      model_name: id of GPT2 model
code: def __init__(self, model_name="gpt2", **kwargs):
      import transformers
  
      # re-enable notifications
      os.environ["WANDB_SILENT"] = "0"
      self.model = transformers.GPT2LMHeadModel.from_pretrained(
          model_name
      )
      self.model.to(utils.device)
      self.tokenizer = transformers.GPT2Tokenizer.from_pretrained(
          model_name
      )
      super().__init__(**kwargs)
  
file_path: TextAttack/textattack/constraints/grammaticality/language_models/gpt2.py
imports: import os
  import torch
  from textattack.shared import utils
  from .language_model_constraint import LanguageModelConstraint
label_desc: Use image node_id 1 to create a new GPT2 object from inherited base classes: LanguageModelConstraint with example: obj = GPT2(model_name)