'''simple docstring'''




from typing import TYPE_CHECKING

from ...utils import (
    OptionalDependencyNotAvailable,
    _LazyModule,
    is_sentencepiece_available,
    is_speech_available,
    is_torch_available,
)


__lowercase          =  {
    '''configuration_trocr''': ['''TROCR_PRETRAINED_CONFIG_ARCHIVE_MAP''', '''TrOCRConfig'''],
    '''processing_trocr''': ['''TrOCRProcessor'''],
}


try:
						if not is_torch_available():
												raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
						pass
else:
						__lowercase          =  [
						    '''TROCR_PRETRAINED_MODEL_ARCHIVE_LIST''',
						    '''TrOCRForCausalLM''',
						    '''TrOCRPreTrainedModel''',
						]


if TYPE_CHECKING:
						from .configuration_trocr import TROCR_PRETRAINED_CONFIG_ARCHIVE_MAP, TrOCRConfig
						from .processing_trocr import TrOCRProcessor

						try:
												if not is_torch_available():
																		raise OptionalDependencyNotAvailable()
						except OptionalDependencyNotAvailable:
												pass
						else:
												from .modeling_trocr import TROCR_PRETRAINED_MODEL_ARCHIVE_LIST, TrOCRForCausalLM, TrOCRPreTrainedModel

else:
						import sys

						__lowercase          =  _LazyModule(__name__, globals()['''__file__'''], _import_structure, module_spec=__spec__)





'''simple docstring'''




from __future__ import annotations

from typing import Dict

from ...configuration_utils import PretrainedConfig


__lowercase          =  {
    '''susnato/ernie-m-base_pytorch''': '''https://huggingface.co/susnato/ernie-m-base_pytorch/blob/main/config.json''',
    '''susnato/ernie-m-large_pytorch''': '''https://huggingface.co/susnato/ernie-m-large_pytorch/blob/main/config.json''',
}






class 				a__(					lowerCAmelCase__	):


			'''simple docstring'''






			UpperCAmelCase_			:     List[str]      =       '''ernie_m'''
			UpperCAmelCase_			:     Dict[str, str]      =       {"dropout": "classifier_dropout", "num_classes": "num_labels"}



			def __init__(   self       ,    __lowerCAmelCase = 250002       ,    __lowerCAmelCase = 768       ,    __lowerCAmelCase = 12       ,    __lowerCAmelCase = 12       ,    __lowerCAmelCase = 3072       ,    __lowerCAmelCase = "gelu"       ,    __lowerCAmelCase = 0.1       ,    __lowerCAmelCase = 0.1       ,    __lowerCAmelCase = 514       ,    __lowerCAmelCase = 0.02       ,    __lowerCAmelCase = 1       ,    __lowerCAmelCase = 1E-0_5       ,    __lowerCAmelCase=None       ,    __lowerCAmelCase=False       ,    __lowerCAmelCase=0.0       ,    **__lowerCAmelCase       ,    ):




					"""simple docstring"""


					super().__init__(pad_token_id=__lowerCAmelCase       ,    **__lowerCAmelCase)
					lowerCAmelCase   					=  vocab_size
					lowerCAmelCase   					=  hidden_size
					lowerCAmelCase   					=  num_hidden_layers
					lowerCAmelCase   					=  num_attention_heads
					lowerCAmelCase   					=  intermediate_size
					lowerCAmelCase   					=  hidden_act
					lowerCAmelCase   					=  hidden_dropout_prob
					lowerCAmelCase   					=  attention_probs_dropout_prob
					lowerCAmelCase   					=  max_position_embeddings
					lowerCAmelCase   					=  initializer_range
					lowerCAmelCase   					=  layer_norm_eps
					lowerCAmelCase   					=  classifier_dropout
					lowerCAmelCase   					=  is_decoder
					lowerCAmelCase   					=  act_dropout




