



"""simple docstring"""






from collections import OrderedDict
from typing import Mapping

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


_lowercase			:			Any										=						logging.get_logger(__name__)

_lowercase			:			Optional[Any]										=						{
    "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 	__SCREAMING_SNAKE_CASE     (				lowerCAmelCase_       ):


					'''simple docstring'''





					_a             =							'distilbert'
					_a             =							{
					    'hidden_size': 'dim',
					    'num_attention_heads': 'n_heads',
					    'num_hidden_layers': 'n_layers',
					}



					def __init__(	self							:  Any,  lowerCamelCase							:  Optional[int]=3_0522,  lowerCamelCase							:  Optional[Any]=512,  lowerCamelCase							:  Union[str, Any]=False,  lowerCamelCase							:  int=6,  lowerCamelCase							:  Dict=12,  lowerCamelCase							:  str=768,  lowerCamelCase							:  Tuple=4 * 768,  lowerCamelCase							:  Dict=0.1,  lowerCamelCase							:  Union[str, Any]=0.1,  lowerCamelCase							:  Union[str, Any]="gelu",  lowerCamelCase							:  Optional[Any]=0.02,  lowerCamelCase							:  str=0.1,  lowerCamelCase							:  str=0.2,  lowerCamelCase							:  Optional[Any]=0,  **lowerCamelCase							:  Optional[int],  )-> Dict:
								lowerCamelCase__		:		Union[str, Any]		     =vocab_size
								lowerCamelCase__		:		Union[str, Any]		     =max_position_embeddings
								lowerCamelCase__		:		Tuple		     =sinusoidal_pos_embds
								lowerCamelCase__		:		int		     =n_layers
								lowerCamelCase__		:		Optional[Any]		     =n_heads
								lowerCamelCase__		:		Tuple		     =dim
								lowerCamelCase__		:		str		     =hidden_dim
								lowerCamelCase__		:		List[str]		     =dropout
								lowerCamelCase__		:		List[str]		     =attention_dropout
								lowerCamelCase__		:		Any		     =activation
								lowerCamelCase__		:		Union[str, Any]		     =initializer_range
								lowerCamelCase__		:		Dict		     =qa_dropout
								lowerCamelCase__		:		Union[str, Any]		     =seq_classif_dropout
								super().__init__(**lowerCamelCase_,  pad_token_id=lowerCamelCase_					)





class 	__SCREAMING_SNAKE_CASE     (				lowerCAmelCase_       ):


					'''simple docstring'''





					@property
					def 		snake_case	(	self							:  Optional[int]					)-> Mapping[str, Mapping[int, str]]:
								if self.task == "multiple-choice":
											lowerCamelCase__		:		Optional[Any]		     ={0: '''batch''', 1: '''choice''', 2: '''sequence'''}
								else:
											lowerCamelCase__		:		List[Any]		     ={0: '''batch''', 1: '''sequence'''}
								return OrderedDict(
								    [
								        ('''input_ids''', dynamic_axis),
								        ('''attention_mask''', dynamic_axis),
								    ]					)









"""simple docstring"""






from ..utils import DummyObject, requires_backends

class 	__SCREAMING_SNAKE_CASE     (				metaclass=lowerCAmelCase_       ):


					'''simple docstring'''





					_a             =							['torch', 'torchsde']



					def __init__(	self							:  Union[str, Any],  *lowerCamelCase							:  str,  **lowerCamelCase							:  int					)-> Tuple:
								requires_backends(self,  ['''torch''', '''torchsde''']					)



					@classmethod
					def 		snake_case	(	cls							:  List[str],  *lowerCamelCase							:  Optional[Any],  **lowerCamelCase							:  Dict					)-> str:
								requires_backends(cls,  ['''torch''', '''torchsde''']					)




					@classmethod
					def 		snake_case	(	cls							:  Tuple,  *lowerCamelCase							:  Dict,  **lowerCamelCase							:  Tuple					)-> List[str]:
								requires_backends(cls,  ['''torch''', '''torchsde''']					)




