


from typing import Union

import fire
import torch
from tqdm import tqdm
def 							UpperCamelCase_(					_A :str					,  _A :str = "cpu"					,  _A :Union[str, None] = None	)->		None:
			UpperCamelCase__       =							torch.load(_A					,  map_location=_A	)
			for k, v in tqdm(state_dict.items()	):
						if not isinstance(_A					,  torch.Tensor	):
									raise TypeError("FP16 conversion only works on paths that are saved state dicts, like pytorch_model.bin"	)
						UpperCamelCase__       =							v.half()
			if save_path is None:  # overwrite src_path
						UpperCamelCase__       =							src_path
			torch.save(_A					,  _A	)


if __name__ == "__main__":
						fire.Fire(convert)






from transformers import BertTokenizerFast

from .custom_tokenization import CustomTokenizer







class 							lowerCamelCase__						(				UpperCAmelCase   ):






			"""simple docstring"""






			_UpperCamelCase		:       Tuple 			=		CustomTokenizer
			pass


