
from typing import TYPE_CHECKING

from ...utils import (
    OptionalDependencyNotAvailable,
    _LazyModule,
    is_tf_available,
    is_tokenizers_available,
    is_torch_available,
)


__lowerCAmelCase					   =       {
    'configuration_convbert': ['CONVBERT_PRETRAINED_CONFIG_ARCHIVE_MAP', 'ConvBertConfig', 'ConvBertOnnxConfig'],
    'tokenization_convbert': ['ConvBertTokenizer'],
}

try:
							if not is_tokenizers_available():
														raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
							pass
else:
							__lowerCAmelCase					   =       ['ConvBertTokenizerFast']

try:
							if not is_torch_available():
														raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
							pass
else:
							__lowerCAmelCase					   =       [
							    'CONVBERT_PRETRAINED_MODEL_ARCHIVE_LIST',
							    'ConvBertForMaskedLM',
							    'ConvBertForMultipleChoice',
							    'ConvBertForQuestionAnswering',
							    'ConvBertForSequenceClassification',
							    'ConvBertForTokenClassification',
							    'ConvBertLayer',
							    'ConvBertModel',
							    'ConvBertPreTrainedModel',
							    'load_tf_weights_in_convbert',
							]


try:
							if not is_tf_available():
														raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
							pass
else:
							__lowerCAmelCase					   =       [
							    'TF_CONVBERT_PRETRAINED_MODEL_ARCHIVE_LIST',
							    'TFConvBertForMaskedLM',
							    'TFConvBertForMultipleChoice',
							    'TFConvBertForQuestionAnswering',
							    'TFConvBertForSequenceClassification',
							    'TFConvBertForTokenClassification',
							    'TFConvBertLayer',
							    'TFConvBertModel',
							    'TFConvBertPreTrainedModel',
							]


if TYPE_CHECKING:
							from .configuration_convbert import CONVBERT_PRETRAINED_CONFIG_ARCHIVE_MAP, ConvBertConfig, ConvBertOnnxConfig
							from .tokenization_convbert import ConvBertTokenizer

							try:
														if not is_tokenizers_available():
																					raise OptionalDependencyNotAvailable()
							except OptionalDependencyNotAvailable:
														pass
							else:
														from .tokenization_convbert_fast import ConvBertTokenizerFast

							try:
														if not is_torch_available():
																					raise OptionalDependencyNotAvailable()
							except OptionalDependencyNotAvailable:
														pass
							else:
														from .modeling_convbert import (
														    CONVBERT_PRETRAINED_MODEL_ARCHIVE_LIST,
														    ConvBertForMaskedLM,
														    ConvBertForMultipleChoice,
														    ConvBertForQuestionAnswering,
														    ConvBertForSequenceClassification,
														    ConvBertForTokenClassification,
														    ConvBertLayer,
														    ConvBertModel,
														    ConvBertPreTrainedModel,
														    load_tf_weights_in_convbert,
														)

							try:
														if not is_tf_available():
																					raise OptionalDependencyNotAvailable()
							except OptionalDependencyNotAvailable:
														pass
							else:
														from .modeling_tf_convbert import (
														    TF_CONVBERT_PRETRAINED_MODEL_ARCHIVE_LIST,
														    TFConvBertForMaskedLM,
														    TFConvBertForMultipleChoice,
														    TFConvBertForQuestionAnswering,
														    TFConvBertForSequenceClassification,
														    TFConvBertForTokenClassification,
														    TFConvBertLayer,
														    TFConvBertModel,
														    TFConvBertPreTrainedModel,
														)


else:
							import sys

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

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


__lowerCAmelCase					   =       logging.get_logger(__name__)

__lowerCAmelCase					   =       {
    'alibaba-damo/mgp-str-base': 'https://huggingface.co/alibaba-damo/mgp-str-base/resolve/main/config.json',
}





class     lowerCamelCase      (       __lowerCamelCase					):
	UpperCamelCase_  :					Union[str, Any]    		=	'mgp-str'







	def __init__(     self      :Union[str, Any]   ,     lowercase      :Union[str, Any]=[3_2, 1_2_8]   ,     lowercase      :Tuple=4   ,     lowercase      :Optional[int]=3   ,     lowercase      :Union[str, Any]=2_7   ,     lowercase      :List[str]=3_8   ,     lowercase      :Optional[Any]=5_0_2_5_7   ,     lowercase      :str=3_0_5_2_2   ,     lowercase      :Dict=7_6_8   ,     lowercase      :List[Any]=1_2   ,     lowercase      :List[str]=1_2   ,     lowercase      :Optional[Any]=4.0   ,     lowercase      :Optional[Any]=True   ,     lowercase      :str=False   ,     lowercase      :Optional[Any]=1e-5   ,     lowercase      :List[str]=0.0   ,     lowercase      :List[Any]=0.0   ,     lowercase      :Optional[int]=0.0   ,     lowercase      :Dict=False   ,     lowercase      :Optional[Any]=0.02   ,     **lowercase      :Optional[Any]   ,     )		->      Dict:







				"""simple docstring"""






				super().__init__(**lowercase			)

				SCREAMING_SNAKE_CASE     						= image_size
				SCREAMING_SNAKE_CASE     						= patch_size
				SCREAMING_SNAKE_CASE     						= num_channels
				SCREAMING_SNAKE_CASE     						= max_token_length
				SCREAMING_SNAKE_CASE     						= num_character_labels
				SCREAMING_SNAKE_CASE     						= num_bpe_labels
				SCREAMING_SNAKE_CASE     						= num_wordpiece_labels
				SCREAMING_SNAKE_CASE     						= hidden_size
				SCREAMING_SNAKE_CASE     						= num_hidden_layers
				SCREAMING_SNAKE_CASE     						= num_attention_heads
				SCREAMING_SNAKE_CASE     						= mlp_ratio
				SCREAMING_SNAKE_CASE     						= distilled
				SCREAMING_SNAKE_CASE     						= layer_norm_eps
				SCREAMING_SNAKE_CASE     						= drop_rate
				SCREAMING_SNAKE_CASE     						= qkv_bias
				SCREAMING_SNAKE_CASE     						= attn_drop_rate
				SCREAMING_SNAKE_CASE     						= drop_path_rate
				SCREAMING_SNAKE_CASE     						= output_aa_attentions
				SCREAMING_SNAKE_CASE     						= initializer_range