
from collections import OrderedDict
from typing import Mapping

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


_snake_case		  =   logging.get_logger(__name__)

_snake_case		  =   {
    "google/mobilebert-uncased": "https://huggingface.co/google/mobilebert-uncased/resolve/main/config.json"
}


class 			UpperCamelCase_				(  snake_case__     ):




      '''simple docstring'''







      a		:int						 =      MOBILEBERT_PRETRAINED_CONFIG_ARCHIVE_MAP
      a		:List[str]						 =      'mobilebert'







      def __init__( self					,					_UpperCAmelCase=30_522					,					_UpperCAmelCase=512					,					_UpperCAmelCase=24					,					_UpperCAmelCase=4					,					_UpperCAmelCase=512					,					_UpperCAmelCase="relu"					,					_UpperCAmelCase=0.0					,					_UpperCAmelCase=0.1					,					_UpperCAmelCase=512					,					_UpperCAmelCase=2					,					_UpperCAmelCase=0.02					,					_UpperCAmelCase=1E-12					,					_UpperCAmelCase=0					,					_UpperCAmelCase=128					,					_UpperCAmelCase=True					,					_UpperCAmelCase=True					,					_UpperCAmelCase=128					,					_UpperCAmelCase=False					,					_UpperCAmelCase=True					,					_UpperCAmelCase=4					,					_UpperCAmelCase="no_norm"					,					_UpperCAmelCase=True					,					_UpperCAmelCase=None					,					**_UpperCAmelCase					,					):
            super().__init__(pad_token_id=_UpperCAmelCase					,					**_UpperCAmelCase)

            lowerCAmelCase_						=      vocab_size
            lowerCAmelCase_						=      hidden_size
            lowerCAmelCase_						=      num_hidden_layers
            lowerCAmelCase_						=      num_attention_heads
            lowerCAmelCase_						=      hidden_act
            lowerCAmelCase_						=      intermediate_size
            lowerCAmelCase_						=      hidden_dropout_prob
            lowerCAmelCase_						=      attention_probs_dropout_prob
            lowerCAmelCase_						=      max_position_embeddings
            lowerCAmelCase_						=      type_vocab_size
            lowerCAmelCase_						=      initializer_range
            lowerCAmelCase_						=      layer_norm_eps
            lowerCAmelCase_						=      embedding_size
            lowerCAmelCase_						=      trigram_input
            lowerCAmelCase_						=      use_bottleneck
            lowerCAmelCase_						=      intra_bottleneck_size
            lowerCAmelCase_						=      use_bottleneck_attention
            lowerCAmelCase_						=      key_query_shared_bottleneck
            lowerCAmelCase_						=      num_feedforward_networks
            lowerCAmelCase_						=      normalization_type
            lowerCAmelCase_						=      classifier_activation

            if self.use_bottleneck:
                  lowerCAmelCase_						=      intra_bottleneck_size
            else:
                  lowerCAmelCase_						=      hidden_size

            lowerCAmelCase_						=      classifier_dropout


class 			UpperCamelCase_				(  snake_case__     ):




      '''simple docstring'''







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






import numpy as np







def _a					(			SCREAMING_SNAKE_CASE						:     Union[str, Any]						)       ->       List[str]:

 """simple docstring"""






 __lowerCAmelCase:  Union[str, Any]        = np.exp(SCREAMING_SNAKE_CASE						)

 # Add up the all the exponentials
 __lowerCAmelCase:  Dict        = np.sum(SCREAMING_SNAKE_CASE						)

 # Divide every exponent by the sum of all exponents
 __lowerCAmelCase:  int        = exponent_vector / sum_of_exponents

 return softmax_vector


if __name__ == "__main__":
  print(softmax((0,)))





