


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


UpperCAmelCase   :    Optional[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        __lowercase       (							a_  ):



		"""simple docstring"""

		UpperCamelCase     :					str			       =		"trocr"
		UpperCamelCase     :					Optional[Any]			       =		["past_key_values"]
		UpperCamelCase     :					Union[str, Any]			       =		{
		    "num_attention_heads": "decoder_attention_heads",
		    "hidden_size": "d_model",
		    "num_hidden_layers": "decoder_layers",
		}







		def __init__( self		,      A=5_02_65		,      A=10_24		,      A=12		,      A=16		,      A=40_96		,      A="gelu"		,      A=5_12		,      A=0.1		,      A=0.0		,      A=0.0		,      A=2		,      A=0.02		,      A=0.0		,      A=True		,      A=False		,      A=True		,      A=True		,      A=1		,      A=0		,      A=2		,      **A		,      )  -> Union[str, Any]:







					'''simple docstring'''







					lowerCamelCase    		=  vocab_size
					lowerCamelCase    		=  d_model
					lowerCamelCase    		=  decoder_layers
					lowerCamelCase    		=  decoder_attention_heads
					lowerCamelCase    		=  decoder_ffn_dim
					lowerCamelCase    		=  activation_function
					lowerCamelCase    		=  max_position_embeddings
					lowerCamelCase    		=  dropout
					lowerCamelCase    		=  attention_dropout
					lowerCamelCase    		=  activation_dropout
					lowerCamelCase    		=  init_std
					lowerCamelCase    		=  decoder_layerdrop
					lowerCamelCase    		=  use_cache
					lowerCamelCase    		=  scale_embedding
					lowerCamelCase    		=  use_learned_position_embeddings
					lowerCamelCase    		=  layernorm_embedding

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





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


UpperCAmelCase   :    Union[str, Any]     =		logging.get_logger(__name__)

UpperCAmelCase   :    List[Any]     =		{
    "SCUT-DLVCLab/lilt-roberta-en-base": (
        "https://huggingface.co/SCUT-DLVCLab/lilt-roberta-en-base/resolve/main/config.json"
    ),
}







class        __lowercase       (							a_  ):



		"""simple docstring"""

		UpperCamelCase     :					List[str]			       =		"lilt"







		def __init__( self		,      A=3_05_22		,      A=7_68		,      A=12		,      A=12		,      A=30_72		,      A="gelu"		,      A=0.1		,      A=0.1		,      A=5_12		,      A=2		,      A=0.02		,      A=1e-1_2		,      A=0		,      A="absolute"		,      A=None		,      A=4		,      A=10_24		,      **A		,      )  -> List[Any]:







					'''simple docstring'''







					super().__init__(pad_token_id=A		,      **A	)

					lowerCamelCase    		=  vocab_size
					lowerCamelCase    		=  hidden_size
					lowerCamelCase    		=  num_hidden_layers
					lowerCamelCase    		=  num_attention_heads
					lowerCamelCase    		=  hidden_act
					lowerCamelCase    		=  intermediate_size
					lowerCamelCase    		=  hidden_dropout_prob
					lowerCamelCase    		=  attention_probs_dropout_prob
					lowerCamelCase    		=  max_position_embeddings
					lowerCamelCase    		=  type_vocab_size
					lowerCamelCase    		=  initializer_range
					lowerCamelCase    		=  layer_norm_eps
					lowerCamelCase    		=  position_embedding_type
					lowerCamelCase    		=  classifier_dropout
					lowerCamelCase    		=  channel_shrink_ratio
					lowerCamelCase    		=  max_ad_position_embeddings

