
'''simple docstring'''





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


UpperCAmelCase    					=   logging.get_logger(__name__)

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




class 						a   (				__UpperCAmelCase    ):
				_snake_case		    = '''mgp-str'''




				def __init__(							self	:				Optional[Any],    SCREAMING_SNAKE_CASE_	:				Optional[Any]=[32, 1_28],    SCREAMING_SNAKE_CASE_	:				Union[str, Any]=4,    SCREAMING_SNAKE_CASE_	:				Dict=3,    SCREAMING_SNAKE_CASE_	:				List[str]=27,    SCREAMING_SNAKE_CASE_	:				str=38,    SCREAMING_SNAKE_CASE_	:				Optional[int]=5_02_57,    SCREAMING_SNAKE_CASE_	:				Any=3_05_22,    SCREAMING_SNAKE_CASE_	:				str=7_68,    SCREAMING_SNAKE_CASE_	:				Any=12,    SCREAMING_SNAKE_CASE_	:				Optional[Any]=12,    SCREAMING_SNAKE_CASE_	:				Tuple=4.0,    SCREAMING_SNAKE_CASE_	:				str=True,    SCREAMING_SNAKE_CASE_	:				List[str]=False,    SCREAMING_SNAKE_CASE_	:				List[Any]=1e-5,    SCREAMING_SNAKE_CASE_	:				Any=0.0,    SCREAMING_SNAKE_CASE_	:				int=0.0,    SCREAMING_SNAKE_CASE_	:				str=0.0,    SCREAMING_SNAKE_CASE_	:				Dict=False,    SCREAMING_SNAKE_CASE_	:				List[str]=0.02,    **SCREAMING_SNAKE_CASE_	:				str,    ):
										super().__init__(**lowerCAmelCase_      )

										snake_case       :     List[str] =    image_size
										snake_case       :     Union[str, Any] =    patch_size
										snake_case       :     Dict =    num_channels
										snake_case       :     List[Any] =    max_token_length
										snake_case       :     List[str] =    num_character_labels
										snake_case       :     Union[str, Any] =    num_bpe_labels
										snake_case       :     Optional[Any] =    num_wordpiece_labels
										snake_case       :     str =    hidden_size
										snake_case       :     List[str] =    num_hidden_layers
										snake_case       :     Dict =    num_attention_heads
										snake_case       :     Union[str, Any] =    mlp_ratio
										snake_case       :     str =    distilled
										snake_case       :     Optional[int] =    layer_norm_eps
										snake_case       :     Tuple =    drop_rate
										snake_case       :     Dict =    qkv_bias
										snake_case       :     Tuple =    attn_drop_rate
										snake_case       :     Tuple =    drop_path_rate
										snake_case       :     Optional[Any] =    output_aa_attentions
										snake_case       :     Optional[int] =    initializer_range



'''simple docstring'''





from typing import TYPE_CHECKING

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


UpperCAmelCase    					=   {
    "configuration_convbert": ["CONVBERT_PRETRAINED_CONFIG_ARCHIVE_MAP", "ConvBertConfig", "ConvBertOnnxConfig"],
    "tokenization_convbert": ["ConvBertTokenizer"],
}

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

try:
						if not is_torch_available():
												raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
						pass
else:
						UpperCAmelCase    					=   [
						    "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:
						UpperCAmelCase    					=   [
						    "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

						UpperCAmelCase    					=   _LazyModule(__name__, globals()["__file__"], _import_structure, module_spec=__spec__)

