


import argparse
import os

import torch

from transformers.utils import WEIGHTS_NAME


UpperCAmelCase    =					["""small""", """medium""", """large"""]

UpperCAmelCase    =					"""lm_head.decoder.weight"""
UpperCAmelCase    =					"""lm_head.weight"""






def  __lowerCAmelCase					(SCREAMING_SNAKE_CASE      ,      SCREAMING_SNAKE_CASE      )->						List[Any]:




      """simple docstring"""

      snake_case_ =   torch.load(SCREAMING_SNAKE_CASE      )
      snake_case_ =   d.pop(SCREAMING_SNAKE_CASE      )
      os.makedirs(SCREAMING_SNAKE_CASE      ,      exist_ok=SCREAMING_SNAKE_CASE      )
      torch.save(SCREAMING_SNAKE_CASE      ,      os.path.join(SCREAMING_SNAKE_CASE      ,      SCREAMING_SNAKE_CASE      )      )


if __name__ == "__main__":
   UpperCAmelCase    =					argparse.ArgumentParser()
   parser.add_argument("""--dialogpt_path""", default=""".""", type=str)
   UpperCAmelCase    =					parser.parse_args()
   for MODEL in DIALOGPT_MODELS:
      UpperCAmelCase    =					os.path.join(args.dialogpt_path, f'''{MODEL}_ft.pkl''')
      UpperCAmelCase    =					f'''./DialoGPT-{MODEL}'''
      convert_dialogpt_checkpoint(
          checkpoint_path,
          pytorch_dump_folder_path,
      )



def  __lowerCAmelCase					(SCREAMING_SNAKE_CASE      ,      SCREAMING_SNAKE_CASE      )->						int:




      """simple docstring"""

      return int((input_a, input_a).count(0      ) == 0      )






def  __lowerCAmelCase					()->						None:




      """simple docstring"""

      assert and_gate(0      ,      0      ) == 0
      assert and_gate(0      ,      1      ) == 0
      assert and_gate(1      ,      0      ) == 0
      assert and_gate(1      ,      1      ) == 1


if __name__ == "__main__":
   test_and_gate()
   print(and_gate(1, 0))
   print(and_gate(0, 0))
   print(and_gate(0, 1))
   print(and_gate(1, 1))