


from collections import OrderedDict
from typing import Mapping

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


a : Any		=				logging.get_logger(__name__)

a : str		=				{
    '''distilbert-base-uncased''': '''https://huggingface.co/distilbert-base-uncased/resolve/main/config.json''',
    '''distilbert-base-uncased-distilled-squad''': (
        '''https://huggingface.co/distilbert-base-uncased-distilled-squad/resolve/main/config.json'''
    ),
    '''distilbert-base-cased''': '''https://huggingface.co/distilbert-base-cased/resolve/main/config.json''',
    '''distilbert-base-cased-distilled-squad''': (
        '''https://huggingface.co/distilbert-base-cased-distilled-squad/resolve/main/config.json'''
    ),
    '''distilbert-base-german-cased''': '''https://huggingface.co/distilbert-base-german-cased/resolve/main/config.json''',
    '''distilbert-base-multilingual-cased''': (
        '''https://huggingface.co/distilbert-base-multilingual-cased/resolve/main/config.json'''
    ),
    '''distilbert-base-uncased-finetuned-sst-2-english''': (
        '''https://huggingface.co/distilbert-base-uncased-finetuned-sst-2-english/resolve/main/config.json'''
    ),
}
class 	lowerCamelCase_       (				lowerCAmelCase__				):



					'''simple docstring'''







					__UpperCAmelCase            =				"distilbert"
					__UpperCAmelCase            =				{
					    "hidden_size": "dim",
					    "num_attention_heads": "n_heads",
					    "num_hidden_layers": "n_layers",
					}






					def __init__(				self ,       snake_case_=3_0_5_2_2 ,       snake_case_=5_1_2 ,       snake_case_=False ,       snake_case_=6 ,       snake_case_=1_2 ,       snake_case_=7_6_8 ,       snake_case_=4 * 7_6_8 ,       snake_case_=0.1 ,       snake_case_=0.1 ,       snake_case_="gelu" ,       snake_case_=0.0_2 ,       snake_case_=0.1 ,       snake_case_=0.2 ,       snake_case_=0 ,       **snake_case_ ,       )   ->			List[str]:







								'''simple docstring'''

								__lowercase 					=   vocab_size
								__lowercase 					=   max_position_embeddings
								__lowercase 					=   sinusoidal_pos_embds
								__lowercase 					=   n_layers
								__lowercase 					=   n_heads
								__lowercase 					=   dim
								__lowercase 					=   hidden_dim
								__lowercase 					=   dropout
								__lowercase 					=   attention_dropout
								__lowercase 					=   activation
								__lowercase 					=   initializer_range
								__lowercase 					=   qa_dropout
								__lowercase 					=   seq_classif_dropout
								super().__init__(**snake_case_ ,       pad_token_id=snake_case_						)




class 	lowerCamelCase_       (				lowerCAmelCase__				):



					'''simple docstring'''







					@property
					def A      (				self						)   ->			Mapping[str, Mapping[int, str]]:







								'''simple docstring'''

								if self.task == "multiple-choice":
											__lowercase 					=   {0: '''batch''', 1: '''choice''', 2: '''sequence'''}
								else:
											__lowercase 					=   {0: '''batch''', 1: '''sequence'''}
								return OrderedDict(
								    [
								        ('''input_ids''', dynamic_axis),
								        ('''attention_mask''', dynamic_axis),
								    ]						)






from ..utils import DummyObject, requires_backends
class 	lowerCamelCase_       (				metaclass=lowerCAmelCase__				):



					'''simple docstring'''







					__UpperCAmelCase            =				["speech"]






					def __init__(				self ,       *snake_case_ ,       **snake_case_						)   ->			List[str]:







								'''simple docstring'''

								requires_backends(self ,       ['''speech''']						)




class 	lowerCamelCase_       (				metaclass=lowerCAmelCase__				):



					'''simple docstring'''







					__UpperCAmelCase            =				["speech"]






					def __init__(				self ,       *snake_case_ ,       **snake_case_						)   ->			Tuple:







								'''simple docstring'''

								requires_backends(self ,       ['''speech''']						)


