
"""simple docstring"""




from ...configuration_utils import PretrainedConfig
from ...utils import logging


UpperCAmelCase__   :					int												=				logging.get_logger(__name__)

UpperCAmelCase__   :					Dict												=				{
    'microsoft/trocr-base-handwritten': (
        'https://huggingface.co/microsoft/trocr-base-handwritten/resolve/main/config.json'
    ),
    # See all TrOCR models at https://huggingface.co/models?filter=trocr
}



class 			lowerCAmelCase_		(a__						):


				"""simple docstring"""



				__UpperCamelCase   :		Optional[Any]       =     '''trocr'''
				__UpperCamelCase   :		Any       =     ['''past_key_values''']
				__UpperCamelCase   :		List[str]       =     {
				    '''num_attention_heads''': '''decoder_attention_heads''',
				    '''hidden_size''': '''d_model''',
				    '''num_hidden_layers''': '''decoder_layers''',
				}



				def __init__(self     , SCREAMING_SNAKE_CASE__=5_02_65     , SCREAMING_SNAKE_CASE__=10_24     , SCREAMING_SNAKE_CASE__=12     , SCREAMING_SNAKE_CASE__=16     , SCREAMING_SNAKE_CASE__=40_96     , SCREAMING_SNAKE_CASE__="gelu"     , SCREAMING_SNAKE_CASE__=5_12     , SCREAMING_SNAKE_CASE__=0.1     , SCREAMING_SNAKE_CASE__=0.0     , SCREAMING_SNAKE_CASE__=0.0     , SCREAMING_SNAKE_CASE__=2     , SCREAMING_SNAKE_CASE__=0.02     , SCREAMING_SNAKE_CASE__=0.0     , SCREAMING_SNAKE_CASE__=True     , SCREAMING_SNAKE_CASE__=False     , SCREAMING_SNAKE_CASE__=True     , SCREAMING_SNAKE_CASE__=True     , SCREAMING_SNAKE_CASE__=1     , SCREAMING_SNAKE_CASE__=0     , SCREAMING_SNAKE_CASE__=2     , **SCREAMING_SNAKE_CASE__     , )      ->	Dict:



											"""simple docstring"""




											SCREAMING_SNAKE_CASE__		: Union[str, Any]     =     vocab_size
											SCREAMING_SNAKE_CASE__		: Optional[Any]     =     d_model
											SCREAMING_SNAKE_CASE__		: Any     =     decoder_layers
											SCREAMING_SNAKE_CASE__		: Optional[int]     =     decoder_attention_heads
											SCREAMING_SNAKE_CASE__		: Dict     =     decoder_ffn_dim
											SCREAMING_SNAKE_CASE__		: List[str]     =     activation_function
											SCREAMING_SNAKE_CASE__		: List[str]     =     max_position_embeddings
											SCREAMING_SNAKE_CASE__		: Dict     =     dropout
											SCREAMING_SNAKE_CASE__		: str     =     attention_dropout
											SCREAMING_SNAKE_CASE__		: List[Any]     =     activation_dropout
											SCREAMING_SNAKE_CASE__		: str     =     init_std
											SCREAMING_SNAKE_CASE__		: List[str]     =     decoder_layerdrop
											SCREAMING_SNAKE_CASE__		: Union[str, Any]     =     use_cache
											SCREAMING_SNAKE_CASE__		: str     =     scale_embedding
											SCREAMING_SNAKE_CASE__		: Tuple     =     use_learned_position_embeddings
											SCREAMING_SNAKE_CASE__		: str     =     layernorm_embedding

											super().__init__(
											    pad_token_id=SCREAMING_SNAKE_CASE__     , bos_token_id=SCREAMING_SNAKE_CASE__     , eos_token_id=SCREAMING_SNAKE_CASE__     , decoder_start_token_id=SCREAMING_SNAKE_CASE__     , **SCREAMING_SNAKE_CASE__     , )






"""simple docstring"""




def lowercase_						(     _snake_case		):
							if divisor % 5 == 0 or divisor % 2 == 0:
														return 0
							SCREAMING_SNAKE_CASE__		: List[str]     =     1
							SCREAMING_SNAKE_CASE__		: List[Any]     =     1
							while repunit:
														SCREAMING_SNAKE_CASE__		: Dict     =     (10 * repunit + 1) % divisor
														repunit_index += 1
							return repunit_index

def lowercase_						(     _snake_case = 1_000_000		):
							SCREAMING_SNAKE_CASE__		: int     =     limit - 1
							if divisor % 2 == 0:
														divisor += 1
							while least_divisible_repunit(_snake_case		) <= limit:
														divisor += 2
							return divisor


if __name__ == "__main__":
					print(f"""{solution() = }""")




