





'''simple docstring'''

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


__lowerCamelCase : Optional[int]											=			logging.get_logger(__name__)

__lowerCamelCase : int											=			{
    "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       UpperCAmelCase (						_lowercase  ):
		UpperCAmelCase					:	Any 			=		'''trocr'''
		UpperCAmelCase					:	List[str] 			=		['''past_key_values''']
		UpperCAmelCase					:	List[Any] 			=		{
		    '''num_attention_heads''': '''decoder_attention_heads''',
		    '''hidden_size''': '''d_model''',
		    '''num_hidden_layers''': '''decoder_layers''',
		}




		def __init__(self      :	Union[str, Any]							,			A__      :	List[Any]=5_0_2_6_5							,			A__      :	List[str]=1_0_2_4							,			A__      :	Union[str, Any]=1_2							,			A__      :	Optional[int]=1_6							,			A__      :	Union[str, Any]=4_0_9_6							,			A__      :	Optional[Any]="gelu"							,			A__      :	Any=5_1_2							,			A__      :	Any=0.1							,			A__      :	Dict=0.0							,			A__      :	List[Any]=0.0							,			A__      :	Union[str, Any]=2							,			A__      :	Optional[int]=0.0_2							,			A__      :	int=0.0							,			A__      :	int=True							,			A__      :	Any=False							,			A__      :	Union[str, Any]=True							,			A__      :	Any=True							,			A__      :	Tuple=1							,			A__      :	List[Any]=0							,			A__      :	List[str]=2							,			**A__      :	Optional[int]							,			)					-> Any:
						lowercase         = vocab_size
						lowercase         = d_model
						lowercase         = decoder_layers
						lowercase         = decoder_attention_heads
						lowercase         = decoder_ffn_dim
						lowercase         = activation_function
						lowercase         = max_position_embeddings
						lowercase         = dropout
						lowercase         = attention_dropout
						lowercase         = activation_dropout
						lowercase         = init_std
						lowercase         = decoder_layerdrop
						lowercase         = use_cache
						lowercase         = scale_embedding
						lowercase         = use_learned_position_embeddings
						lowercase         = layernorm_embedding

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











'''simple docstring'''

# This is the module that test_patching.py uses to test patch_submodule()

import os  # noqa: this is just for tests
import os as renamed_os  # noqa: this is just for tests
from os import path  # noqa: this is just for tests
from os import path as renamed_path  # noqa: this is just for tests
from os.path import join  # noqa: this is just for tests
from os.path import join as renamed_join  # noqa: this is just for tests


__lowerCamelCase : Any											=			open  # noqa: we just need to have a builtin inside this module to test it properly




