


"""simple docstring"""


from collections import OrderedDict
from typing import Mapping

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


a_       							=    logging.get_logger(__name__)

a_       							=    {
    "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 snake_case      (  _UpperCAmelCase):
		__UpperCamelCase           =			'distilbert'
		__UpperCamelCase           =			{
		    'hidden_size': 'dim',
		    'num_attention_heads': 'n_heads',
		    'num_hidden_layers': 'n_layers',
		}







		def __init__(					self      :       Any    ,   a__      :       Tuple=3_05_22    ,   a__      :       Optional[Any]=5_12    ,   a__      :       Dict=False    ,   a__      :       str=6    ,   a__      :       Tuple=12    ,   a__      :       int=7_68    ,   a__      :       Optional[Any]=4 * 7_68    ,   a__      :       List[Any]=0.1    ,   a__      :       Optional[int]=0.1    ,   a__      :       int="gelu"    ,   a__      :       Union[str, Any]=0.0_2    ,   a__      :       List[str]=0.1    ,   a__      :       Dict=0.2    ,   a__      :       Union[str, Any]=0    ,   **a__      :       List[str]    ,   )       ->						List[Any]:





						'''simple docstring'''







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





class snake_case      (  _UpperCAmelCase):







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





						'''simple docstring'''







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



"""simple docstring"""


import numpy as np






def      a__ (				__lowercase     ,			__lowercase   )	->	np.ndarray:
				return np.where(vector > 0     ,			__lowercase     ,			(alpha * (np.exp(__lowercase   ) - 1))   )


if __name__ == "__main__":
		import doctest

		doctest.testmod()