





"""simple docstring"""




from collections import OrderedDict
from typing import Mapping

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


UpperCamelCase_									=logging.get_logger(__name__)

UpperCamelCase_									={
    '''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 			_a						(				a__    ):
    UpperCamelCase								=   'distilbert'
    UpperCamelCase								=   {
        'hidden_size': 'dim',
        'num_attention_heads': 'n_heads',
        'num_hidden_layers': 'n_layers',
    }






    def __init__(			self		:   Dict,			lowerCAmelCase__		:   int=3_0_5_2_2,			lowerCAmelCase__		:   Dict=5_1_2,			lowerCAmelCase__		:   Optional[Any]=False,			lowerCAmelCase__		:   Optional[int]=6,			lowerCAmelCase__		:   Dict=1_2,			lowerCAmelCase__		:   Any=7_6_8,			lowerCAmelCase__		:   Optional[Any]=4 * 7_6_8,			lowerCAmelCase__		:   Any=0.1,			lowerCAmelCase__		:   List[Any]=0.1,			lowerCAmelCase__		:   Dict="gelu",			lowerCAmelCase__		:   Union[str, Any]=0.02,			lowerCAmelCase__		:   Any=0.1,			lowerCAmelCase__		:   int=0.2,			lowerCAmelCase__		:   str=0,			**lowerCAmelCase__		:   Optional[Any],			)     ->				List[Any]:




          '''simple docstring'''



          _UpperCamelCase      : Any         =   vocab_size
          _UpperCamelCase      : str         =   max_position_embeddings
          _UpperCamelCase      : Union[str, Any]         =   sinusoidal_pos_embds
          _UpperCamelCase      : str         =   n_layers
          _UpperCamelCase      : Tuple         =   n_heads
          _UpperCamelCase      : Union[str, Any]         =   dim
          _UpperCamelCase      : Optional[int]         =   hidden_dim
          _UpperCamelCase      : Dict         =   dropout
          _UpperCamelCase      : int         =   attention_dropout
          _UpperCamelCase      : int         =   activation
          _UpperCamelCase      : int         =   initializer_range
          _UpperCamelCase      : str         =   qa_dropout
          _UpperCamelCase      : Union[str, Any]         =   seq_classif_dropout
          super().__init__(**_lowerCamelCase,			pad_token_id=_lowerCamelCase							)




class 			_a						(				a__    ):






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




          '''simple docstring'''



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










"""simple docstring"""




import logging

from transformers.configuration_utils import PretrainedConfig


UpperCamelCase_									=logging.getLogger(__name__)




class 			_a						(				_lowerCAmelCase    ):
				UpperCamelCase								=   '''masked_bert'''






				def __init__(			self		:   Optional[Any],			lowerCAmelCase__		:   Dict=3_0_5_2_2,			lowerCAmelCase__		:   int=7_6_8,			lowerCAmelCase__		:   Tuple=1_2,			lowerCAmelCase__		:   Optional[Any]=1_2,			lowerCAmelCase__		:   Tuple=3_0_7_2,			lowerCAmelCase__		:   Optional[int]="gelu",			lowerCAmelCase__		:   Tuple=0.1,			lowerCAmelCase__		:   Tuple=0.1,			lowerCAmelCase__		:   Any=5_1_2,			lowerCAmelCase__		:   Optional[int]=2,			lowerCAmelCase__		:   Optional[int]=0.02,			lowerCAmelCase__		:   Union[str, Any]=1e-1_2,			lowerCAmelCase__		:   Union[str, Any]=0,			lowerCAmelCase__		:   Dict="topK",			lowerCAmelCase__		:   Union[str, Any]="constant",			lowerCAmelCase__		:   Union[str, Any]=0.0,			**lowerCAmelCase__		:   Any,			)     ->				List[Any]:




										'''simple docstring'''



										super().__init__(pad_token_id=lowerCAmelCase__,			**lowerCAmelCase__							)

										_UpperCamelCase      : Optional[Any]         =   vocab_size
										_UpperCamelCase      : int         =   hidden_size
										_UpperCamelCase      : List[Any]         =   num_hidden_layers
										_UpperCamelCase      : Any         =   num_attention_heads
										_UpperCamelCase      : List[str]         =   hidden_act
										_UpperCamelCase      : Tuple         =   intermediate_size
										_UpperCamelCase      : int         =   hidden_dropout_prob
										_UpperCamelCase      : str         =   attention_probs_dropout_prob
										_UpperCamelCase      : Optional[int]         =   max_position_embeddings
										_UpperCamelCase      : str         =   type_vocab_size
										_UpperCamelCase      : Optional[Any]         =   initializer_range
										_UpperCamelCase      : List[str]         =   layer_norm_eps
										_UpperCamelCase      : int         =   pruning_method
										_UpperCamelCase      : Union[str, Any]         =   mask_init
										_UpperCamelCase      : Any         =   mask_scale



