





import fire

from transformers import AutoConfig, AutoModelForSeqaSeqLM, AutoTokenizer


def 			SCREAMING_SNAKE_CASE (			_UpperCAmelCase		,      _UpperCAmelCase		,      **_UpperCAmelCase					)     ->	Dict:
    lowerCamelCase__       : Optional[Any]   					=						AutoConfig.from_pretrained(_UpperCAmelCase		,      **_UpperCAmelCase					)
    lowerCamelCase__       : List[Any]   					=						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)












def 			SCREAMING_SNAKE_CASE (			_UpperCAmelCase		,      _UpperCAmelCase					)     ->	Union[str, Any]:
    lowerCamelCase__       : List[Any]   					=						[1]
    for i in range(2		,      _UpperCAmelCase					):
        factorials.append(factorials[-1] * i					)
    assert 0 <= k < factorials[-1] * n, "k out of bounds"

    lowerCamelCase__       : str   					=						[]
    lowerCamelCase__       : Optional[Any]   					=						list(range(_UpperCAmelCase					)					)

    # Find permutation
    while factorials:
        lowerCamelCase__       : List[str]   					=						factorials.pop()
        lowerCamelCase__					,				lowerCamelCase__       : Tuple   					=						divmod(_UpperCAmelCase		,      _UpperCAmelCase					)
        permutation.append(elements[number]					)
        elements.remove(elements[number]					)
    permutation.append(elements[0]					)

    return permutation


if __name__ == "__main__":
    import doctest

    doctest.testmod()





