



import fire

from transformers import AutoConfig, AutoModelForSeqaSeqLM, AutoTokenizer
def 							UpperCAmelCase__		(				_SCREAMING_SNAKE_CASE   :	str     ,				_SCREAMING_SNAKE_CASE   :	str     ,				**_SCREAMING_SNAKE_CASE   :	Optional[int]				)->int:
						_lowerCAmelCase 			=  AutoConfig.from_pretrained(__UpperCamelCase     ,				**__UpperCamelCase				)
						_lowerCAmelCase 			=  AutoModelForSeqaSeqLM.from_config(__UpperCamelCase				)
						model.save_pretrained(__UpperCamelCase				)
						AutoTokenizer.from_pretrained(__UpperCamelCase				).save_pretrained(__UpperCamelCase				)
						return model


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




from typing import TYPE_CHECKING

from ...utils import (
    OptionalDependencyNotAvailable,
    _LazyModule,
    is_sentencepiece_available,
    is_tokenizers_available,
    is_torch_available,
    is_vision_available,
)


UpperCAmelCase_									=							{"processing_layoutxlm": ["LayoutXLMProcessor"]}

try:
    if not is_sentencepiece_available():
        raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
    pass
else:
    UpperCAmelCase_									=							["LayoutXLMTokenizer"]

try:
    if not is_tokenizers_available():
        raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
    pass
else:
    UpperCAmelCase_									=							["LayoutXLMTokenizerFast"]

if TYPE_CHECKING:
    from .processing_layoutxlm import LayoutXLMProcessor

    try:
        if not is_sentencepiece_available():
            raise OptionalDependencyNotAvailable()
    except OptionalDependencyNotAvailable:
        pass
    else:
        from .tokenization_layoutxlm import LayoutXLMTokenizer

    try:
        if not is_tokenizers_available():
            raise OptionalDependencyNotAvailable()
    except OptionalDependencyNotAvailable:
        pass
    else:
        from .tokenization_layoutxlm_fast import LayoutXLMTokenizerFast

else:
    import sys

    UpperCAmelCase_									=							_LazyModule(__name__, globals()["__file__"], _import_structure, module_spec=__spec__)