




"""simple docstring"""

from collections import OrderedDict
from typing import Mapping

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


__lowerCamelCase								=						logging.get_logger(__name__)

__lowerCamelCase								=						{
    "google/electra-small-generator": "https://huggingface.co/google/electra-small-generator/resolve/main/config.json",
    "google/electra-base-generator": "https://huggingface.co/google/electra-base-generator/resolve/main/config.json",
    "google/electra-large-generator": "https://huggingface.co/google/electra-large-generator/resolve/main/config.json",
    "google/electra-small-discriminator": (
        "https://huggingface.co/google/electra-small-discriminator/resolve/main/config.json"
    ),
    "google/electra-base-discriminator": (
        "https://huggingface.co/google/electra-base-discriminator/resolve/main/config.json"
    ),
    "google/electra-large-discriminator": (
        "https://huggingface.co/google/electra-large-discriminator/resolve/main/config.json"
    ),
}



class  _snake_case				(							A__       ):

				'''simple docstring'''




				UpperCamelCase__		     ="""electra"""





				def __init__(							self      :  Dict					,							snake_case      :  List[str]=30_522					,							snake_case      :  Tuple=128					,							snake_case      :  Optional[int]=256					,							snake_case      :  Dict=12					,							snake_case      :  Optional[int]=4					,							snake_case      :  Optional[Any]=1_024					,							snake_case      :  Optional[int]="gelu"					,							snake_case      :  Optional[int]=0.1					,							snake_case      :  Optional[int]=0.1					,							snake_case      :  List[Any]=512					,							snake_case      :  str=2					,							snake_case      :  Dict=0.02					,							snake_case      :  Optional[Any]=1e-12					,							snake_case      :  str="first"					,							snake_case      :  Optional[Any]=True					,							snake_case      :  Union[str, Any]="gelu"					,							snake_case      :  List[str]=0.1					,							snake_case      :  int=0					,							snake_case      :  Any="absolute"					,							snake_case      :  Union[str, Any]=True					,							snake_case      :  List[str]=None					,							**snake_case      :  Tuple					,							):
								super().__init__(pad_token_id=snake_case					,							**snake_case     )

								UpperCAmelCase_					:Dict      			=      vocab_size
								UpperCAmelCase_					:int      			=      embedding_size
								UpperCAmelCase_					:Optional[int]      			=      hidden_size
								UpperCAmelCase_					:List[Any]      			=      num_hidden_layers
								UpperCAmelCase_					:Optional[int]      			=      num_attention_heads
								UpperCAmelCase_					:Union[str, Any]      			=      intermediate_size
								UpperCAmelCase_					:List[str]      			=      hidden_act
								UpperCAmelCase_					:Dict      			=      hidden_dropout_prob
								UpperCAmelCase_					:Any      			=      attention_probs_dropout_prob
								UpperCAmelCase_					:Any      			=      max_position_embeddings
								UpperCAmelCase_					:Any      			=      type_vocab_size
								UpperCAmelCase_					:Optional[Any]      			=      initializer_range
								UpperCAmelCase_					:int      			=      layer_norm_eps

								UpperCAmelCase_					:Tuple      			=      summary_type
								UpperCAmelCase_					:List[str]      			=      summary_use_proj
								UpperCAmelCase_					:Any      			=      summary_activation
								UpperCAmelCase_					:Optional[Any]      			=      summary_last_dropout
								UpperCAmelCase_					:List[Any]      			=      position_embedding_type
								UpperCAmelCase_					:Optional[Any]      			=      use_cache
								UpperCAmelCase_					:Tuple      			=      classifier_dropout



class  _snake_case				(							A__       ):

				'''simple docstring'''




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











"""simple docstring"""

def 				a (						__snake_case     :				int  ):



				'''simple docstring'''





				if not isinstance(__snake_case,    __snake_case  ) or number < 0:
								raise ValueError('''Input must be a non-negative integer'''  )

				UpperCAmelCase_					:Optional[Any]      			=      number & ~(number - 1)
				UpperCAmelCase_					:List[str]      			=      0
				while intermediate:
								intermediate >>= 1
								index += 1
				return index - 1


if __name__ == "__main__":
						import doctest

						doctest.testmod(verbose=True)


