




from collections import OrderedDict
from typing import Mapping

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


lowercase__							:	List[str]											=		logging.get_logger(__name__)

lowercase__							:	Union[str, 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 						UpperCAmelCase  (							UpperCAmelCase__     ):







						'''simple docstring'''





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






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






							"""simple docstring"""






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







class 						UpperCAmelCase  (							UpperCAmelCase__     ):







						'''simple docstring'''





						@property
						def 			snake_case__		(		self				:	str		):






							"""simple docstring"""






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






import numpy as np


def 		lowerCamelCase__       (						_A				):







	'''simple docstring'''





	return (2 / (1 + np.exp(-2 * vector				))) - 1


if __name__ == "__main__":
		import doctest

		doctest.testmod()
