
'''simple docstring'''


from collections import OrderedDict
from typing import Mapping

from ...configuration_utils import PretrainedConfig
from ...onnx import OnnxConfig
from ...utils import logging


__lowercase							:   str					=     logging.get_logger(__name__)

__lowercase							:   str					=     {
    '''bert-base-uncased''': '''https://huggingface.co/bert-base-uncased/resolve/main/config.json''',
    '''bert-large-uncased''': '''https://huggingface.co/bert-large-uncased/resolve/main/config.json''',
    '''bert-base-cased''': '''https://huggingface.co/bert-base-cased/resolve/main/config.json''',
    '''bert-large-cased''': '''https://huggingface.co/bert-large-cased/resolve/main/config.json''',
    '''bert-base-multilingual-uncased''': '''https://huggingface.co/bert-base-multilingual-uncased/resolve/main/config.json''',
    '''bert-base-multilingual-cased''': '''https://huggingface.co/bert-base-multilingual-cased/resolve/main/config.json''',
    '''bert-base-chinese''': '''https://huggingface.co/bert-base-chinese/resolve/main/config.json''',
    '''bert-base-german-cased''': '''https://huggingface.co/bert-base-german-cased/resolve/main/config.json''',
    '''bert-large-uncased-whole-word-masking''': (
        '''https://huggingface.co/bert-large-uncased-whole-word-masking/resolve/main/config.json'''
    ),
    '''bert-large-cased-whole-word-masking''': (
        '''https://huggingface.co/bert-large-cased-whole-word-masking/resolve/main/config.json'''
    ),
    '''bert-large-uncased-whole-word-masking-finetuned-squad''': (
        '''https://huggingface.co/bert-large-uncased-whole-word-masking-finetuned-squad/resolve/main/config.json'''
    ),
    '''bert-large-cased-whole-word-masking-finetuned-squad''': (
        '''https://huggingface.co/bert-large-cased-whole-word-masking-finetuned-squad/resolve/main/config.json'''
    ),
    '''bert-base-cased-finetuned-mrpc''': '''https://huggingface.co/bert-base-cased-finetuned-mrpc/resolve/main/config.json''',
    '''bert-base-german-dbmdz-cased''': '''https://huggingface.co/bert-base-german-dbmdz-cased/resolve/main/config.json''',
    '''bert-base-german-dbmdz-uncased''': '''https://huggingface.co/bert-base-german-dbmdz-uncased/resolve/main/config.json''',
    '''cl-tohoku/bert-base-japanese''': '''https://huggingface.co/cl-tohoku/bert-base-japanese/resolve/main/config.json''',
    '''cl-tohoku/bert-base-japanese-whole-word-masking''': (
        '''https://huggingface.co/cl-tohoku/bert-base-japanese-whole-word-masking/resolve/main/config.json'''
    ),
    '''cl-tohoku/bert-base-japanese-char''': (
        '''https://huggingface.co/cl-tohoku/bert-base-japanese-char/resolve/main/config.json'''
    ),
    '''cl-tohoku/bert-base-japanese-char-whole-word-masking''': (
        '''https://huggingface.co/cl-tohoku/bert-base-japanese-char-whole-word-masking/resolve/main/config.json'''
    ),
    '''TurkuNLP/bert-base-finnish-cased-v1''': (
        '''https://huggingface.co/TurkuNLP/bert-base-finnish-cased-v1/resolve/main/config.json'''
    ),
    '''TurkuNLP/bert-base-finnish-uncased-v1''': (
        '''https://huggingface.co/TurkuNLP/bert-base-finnish-uncased-v1/resolve/main/config.json'''
    ),
    '''wietsedv/bert-base-dutch-cased''': '''https://huggingface.co/wietsedv/bert-base-dutch-cased/resolve/main/config.json''',
    # See all BERT models at https://huggingface.co/models?filter=bert
}

class 	__lowercase				(  _lowercase    ):
			lowerCamelCase			:		int	      =			"bert"

			def __init__(self			,   A=3_0_5_2_2			,   A=7_6_8			,   A=1_2			,   A=1_2			,   A=3_0_7_2			,   A="gelu"			,   A=0.1			,   A=0.1			,   A=5_1_2			,   A=2			,   A=0.02			,   A=1E-12			,   A=0			,   A="absolute"			,   A=True			,   A=None			,   **A			,   ):
								super().__init__(pad_token_id=A			,   **A      )

								lowerCamelCase_					:      Union[str, Any]     =		vocab_size
								lowerCamelCase_					:      Optional[int]     =		hidden_size
								lowerCamelCase_					:      Optional[int]     =		num_hidden_layers
								lowerCamelCase_					:      Dict     =		num_attention_heads
								lowerCamelCase_					:      Optional[Any]     =		hidden_act
								lowerCamelCase_					:      List[str]     =		intermediate_size
								lowerCamelCase_					:      Optional[int]     =		hidden_dropout_prob
								lowerCamelCase_					:      Dict     =		attention_probs_dropout_prob
								lowerCamelCase_					:      List[str]     =		max_position_embeddings
								lowerCamelCase_					:      Union[str, Any]     =		type_vocab_size
								lowerCamelCase_					:      List[str]     =		initializer_range
								lowerCamelCase_					:      int     =		layer_norm_eps
								lowerCamelCase_					:      int     =		position_embedding_type
								lowerCamelCase_					:      Optional[Any]     =		use_cache
								lowerCamelCase_					:      Optional[Any]     =		classifier_dropout

class 	__lowercase				(  _lowercase    ):

			@property
			def        UpperCAmelCase__ (self      ):
								if self.task == "multiple-choice":
													lowerCamelCase_					:      int     =		{0: '''batch''', 1: '''choice''', 2: '''sequence'''}
								else:
													lowerCamelCase_					:      Any     =		{0: '''batch''', 1: '''sequence'''}
								return OrderedDict(
								    [
								        ('''input_ids''', dynamic_axis),
								        ('''attention_mask''', dynamic_axis),
								        ('''token_type_ids''', dynamic_axis),
								    ]      )




'''simple docstring'''


from typing import TYPE_CHECKING

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


__lowercase							:   str					=     {
    '''configuration_mctct''': ['''MCTCT_PRETRAINED_CONFIG_ARCHIVE_MAP''', '''MCTCTConfig'''],
    '''feature_extraction_mctct''': ['''MCTCTFeatureExtractor'''],
    '''processing_mctct''': ['''MCTCTProcessor'''],
}


try:
					if not is_torch_available():
										raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
					pass
else:
					__lowercase							:   str					=     [
					    '''MCTCT_PRETRAINED_MODEL_ARCHIVE_LIST''',
					    '''MCTCTForCTC''',
					    '''MCTCTModel''',
					    '''MCTCTPreTrainedModel''',
					]


if TYPE_CHECKING:
					from .configuration_mctct import MCTCT_PRETRAINED_CONFIG_ARCHIVE_MAP, MCTCTConfig
					from .feature_extraction_mctct import MCTCTFeatureExtractor
					from .processing_mctct import MCTCTProcessor

					try:
										if not is_torch_available():
															raise OptionalDependencyNotAvailable()
					except OptionalDependencyNotAvailable:
										pass
					else:
										from .modeling_mctct import MCTCT_PRETRAINED_MODEL_ARCHIVE_LIST, MCTCTForCTC, MCTCTModel, MCTCTPreTrainedModel

else:
					import sys

					__lowercase							:   Union[str, Any]					=     _LazyModule(__name__, globals()['''__file__'''], _import_structure, module_spec=__spec__)


