import argparse
import os

import torch

from transformers.utils import WEIGHTS_NAME


__a  :     Optional[Any]       =  ["""small""", """medium""", """large"""]

__a  :     List[str]       =  """lm_head.decoder.weight"""
__a  :     List[Any]       =  """lm_head.weight"""





def 				UpperCAmelCase						(    lowercase							,			lowercase							):







				"""simple docstring"""



				__lowercase 			=							torch.load(lowercase							)
				__lowercase 			=							d.pop(lowercase							)
				os.makedirs(lowercase							,			exist_ok=lowercase							)
				torch.save(lowercase							,			os.path.join(lowercase							,			lowercase							)							)


if __name__ == "__main__":
		__a  :     str       =  argparse.ArgumentParser()
		parser.add_argument("""--dialogpt_path""", default=""".""", type=str)
		__a  :     List[Any]       =  parser.parse_args()
		for MODEL in DIALOGPT_MODELS:
				__a  :     Tuple       =  os.path.join(args.dialogpt_path, F'''{MODEL}_ft.pkl''')
				__a  :     int       =  F'''./DialoGPT-{MODEL}'''
				convert_dialogpt_checkpoint(
				    checkpoint_path,
				    pytorch_dump_folder_path,
				)
import qiskit





def 				UpperCAmelCase						(    lowercase							,			lowercase							):







				"""simple docstring"""



				__lowercase 			=							qiskit.Aer.get_backend('''aer_simulator'''							)

				# Create a Quantum Circuit acting on the q register
				__lowercase 			=							qiskit.QuantumCircuit(lowercase							,			lowercase							)

				# Map the quantum measurement to the classical bits
				circuit.measure([0]							,			[0]							)

				# Execute the circuit on the simulator
				__lowercase 			=							qiskit.execute(lowercase							,			lowercase							,			shots=1000							)

				# Return the histogram data of the results of the experiment.
				return job.result().get_counts(lowercase							)


if __name__ == "__main__":
		print(F'''Total count for various states are: {single_qubit_measure(1, 1)}''')