




'''simple docstring'''





from typing import TYPE_CHECKING

from ...utils import OptionalDependencyNotAvailable, _LazyModule, is_tokenizers_available, is_torch_available


_SCREAMING_SNAKE_CASE							:       Optional[int]						=			{
    "configuration_canine": ["CANINE_PRETRAINED_CONFIG_ARCHIVE_MAP", "CanineConfig"],
    "tokenization_canine": ["CanineTokenizer"],
}

try:
		if not is_torch_available():
				raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
		pass
else:
		_SCREAMING_SNAKE_CASE							:       Dict						=			[
		    "CANINE_PRETRAINED_MODEL_ARCHIVE_LIST",
		    "CanineForMultipleChoice",
		    "CanineForQuestionAnswering",
		    "CanineForSequenceClassification",
		    "CanineForTokenClassification",
		    "CanineLayer",
		    "CanineModel",
		    "CaninePreTrainedModel",
		    "load_tf_weights_in_canine",
		]


if TYPE_CHECKING:
		from .configuration_canine import CANINE_PRETRAINED_CONFIG_ARCHIVE_MAP, CanineConfig
		from .tokenization_canine import CanineTokenizer

		try:
				if not is_torch_available():
						raise OptionalDependencyNotAvailable()
		except OptionalDependencyNotAvailable:
				pass
		else:
				from .modeling_canine import (
				    CANINE_PRETRAINED_MODEL_ARCHIVE_LIST,
				    CanineForMultipleChoice,
				    CanineForQuestionAnswering,
				    CanineForSequenceClassification,
				    CanineForTokenClassification,
				    CanineLayer,
				    CanineModel,
				    CaninePreTrainedModel,
				    load_tf_weights_in_canine,
				)


else:
		import sys

		_SCREAMING_SNAKE_CASE							:       int						=			_LazyModule(__name__, globals()["__file__"], _import_structure, module_spec=__spec__)










'''simple docstring'''





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


_SCREAMING_SNAKE_CASE							:       Any						=			logging.get_logger(__name__)

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




class 			_snake_case		(     lowercase_							):
			lowerCAmelCase_					:				Union[str, Any]							=   "mgp-str"




			def __init__( self    ,							a__=[32, 128]    ,							a__=4    ,							a__=3    ,							a__=27    ,							a__=38    ,							a__=50_257    ,							a__=30_522    ,							a__=768    ,							a__=12    ,							a__=12    ,							a__=4.0    ,							a__=True    ,							a__=False    ,							a__=1e-5    ,							a__=0.0    ,							a__=0.0    ,							a__=0.0    ,							a__=False    ,							a__=0.0_2    ,							**a__    ,							)    ->    Union[str, Any]:

										'''simple docstring'''




										super().__init__(**a__							)

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




