





from typing import TYPE_CHECKING

from ....utils import OptionalDependencyNotAvailable, _LazyModule, is_torch_available, is_vision_available


UpperCamelCase__   : Dict					  = {"""configuration_van""": ["""VAN_PRETRAINED_CONFIG_ARCHIVE_MAP""", """VanConfig"""]}


try:
				if not is_torch_available():
								raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
				pass
else:
				UpperCamelCase__   : str					  = [
				    """VAN_PRETRAINED_MODEL_ARCHIVE_LIST""",
				    """VanForImageClassification""",
				    """VanModel""",
				    """VanPreTrainedModel""",
				]

if TYPE_CHECKING:
				from .configuration_van import VAN_PRETRAINED_CONFIG_ARCHIVE_MAP, VanConfig

				try:
								if not is_torch_available():
												raise OptionalDependencyNotAvailable()
				except OptionalDependencyNotAvailable:
								pass
				else:
								from .modeling_van import (
								    VAN_PRETRAINED_MODEL_ARCHIVE_LIST,
								    VanForImageClassification,
								    VanModel,
								    VanPreTrainedModel,
								)

else:
				import sys

				UpperCamelCase__   : Dict					  = _LazyModule(__name__, globals()["""__file__"""], _import_structure)









import fire

from transformers import AutoConfig, AutoModelForSeqaSeqLM, AutoTokenizer




def    A_(			A				,      A				,      **A   ):
	UpperCAmelCase_								=     AutoConfig.from_pretrained(A				,      **A   )
	UpperCAmelCase_								=     AutoModelForSeqaSeqLM.from_config(A   )
	model.save_pretrained(A   )
	AutoTokenizer.from_pretrained(A   ).save_pretrained(A   )
	return model


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


