





"""simple docstring"""


from collections import OrderedDict
from typing import Mapping

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


a__    :   str    						= logging.get_logger(__name__)

a__    :   Optional[int]    						= {
    """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    lowercase_ (   _A							):
       snake_case__ :							int 							=   'electra'

       def __init__(	self      ,    __SCREAMING_SNAKE_CASE=3_0522      ,    __SCREAMING_SNAKE_CASE=128      ,    __SCREAMING_SNAKE_CASE=256      ,    __SCREAMING_SNAKE_CASE=12      ,    __SCREAMING_SNAKE_CASE=4      ,    __SCREAMING_SNAKE_CASE=1024      ,    __SCREAMING_SNAKE_CASE="gelu"      ,    __SCREAMING_SNAKE_CASE=0.1      ,    __SCREAMING_SNAKE_CASE=0.1      ,    __SCREAMING_SNAKE_CASE=512      ,    __SCREAMING_SNAKE_CASE=2      ,    __SCREAMING_SNAKE_CASE=0.02      ,    __SCREAMING_SNAKE_CASE=1e-12      ,    __SCREAMING_SNAKE_CASE="first"      ,    __SCREAMING_SNAKE_CASE=True      ,    __SCREAMING_SNAKE_CASE="gelu"      ,    __SCREAMING_SNAKE_CASE=0.1      ,    __SCREAMING_SNAKE_CASE=0      ,    __SCREAMING_SNAKE_CASE="absolute"      ,    __SCREAMING_SNAKE_CASE=True      ,    __SCREAMING_SNAKE_CASE=None      ,    **__SCREAMING_SNAKE_CASE      ,    ):






        '''simple docstring'''

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

        snake_case__										= vocab_size
        snake_case__										= embedding_size
        snake_case__										= hidden_size
        snake_case__										= num_hidden_layers
        snake_case__										= num_attention_heads
        snake_case__										= intermediate_size
        snake_case__										= hidden_act
        snake_case__										= hidden_dropout_prob
        snake_case__										= attention_probs_dropout_prob
        snake_case__										= max_position_embeddings
        snake_case__										= type_vocab_size
        snake_case__										= initializer_range
        snake_case__										= layer_norm_eps

        snake_case__										= summary_type
        snake_case__										= summary_use_proj
        snake_case__										= summary_activation
        snake_case__										= summary_last_dropout
        snake_case__										= position_embedding_type
        snake_case__										= use_cache
        snake_case__										= classifier_dropout



class    lowercase_ (   _A							):

       @property
       def 						_SCREAMING_SNAKE_CASE(	self   ):






        '''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),
                ("token_type_ids", dynamic_axis),
            ]   )







from __future__ import annotations

from enum import Enum, unique
from typing import TypeVar

# Create a generic variable that can be 'Enum', or any subclass.
_lowerCamelCase			 =						TypeVar('T', bound='Enum')



@unique
class 			a     (   _A			):

     '''simple docstring'''





     lowerCAmelCase				:       Optional[Any]   		=  80
     lowerCAmelCase				:       List[str]   		=  70
     lowerCAmelCase				:       Optional[Any]   		=  60
     lowerCAmelCase				:       Optional[Any]   		=  50
     lowerCAmelCase				:       List[Any]   		=  40
     lowerCAmelCase				:       Dict   		=  30
     lowerCAmelCase				:       List[Any]   		=  20
     lowerCAmelCase				:       List[Any]   		=  10



@unique
class 			a     (   _A			):

     '''simple docstring'''





     lowerCAmelCase				:       Dict   		=  24
     lowerCAmelCase				:       Union[str, Any]   		=  21
     lowerCAmelCase				:       Tuple   		=  18
     lowerCAmelCase				:       str   		=  15
     lowerCAmelCase				:       Dict   		=  12
     lowerCAmelCase				:       Dict   		=  9
     lowerCAmelCase				:       Tuple   		=  6
     lowerCAmelCase				:       Any   		=  3
     lowerCAmelCase				:       List[str]   		=  2
     lowerCAmelCase				:       Any   		=  1
     lowerCAmelCase				:       str   		=  -1
     lowerCAmelCase				:       Any   		=  -2
     lowerCAmelCase				:       List[str]   		=  -3
     lowerCAmelCase				:       Dict   		=  -6
     lowerCAmelCase				:       int   		=  -9
     lowerCAmelCase				:       Optional[Any]   		=  -12
     lowerCAmelCase				:       List[str]   		=  -15
     lowerCAmelCase				:       Any   		=  -18
     lowerCAmelCase				:       int   		=  -21
     lowerCAmelCase				:       Union[str, Any]   		=  -24
     @classmethod
     def   lowerCamelCase_   (	cls   :			type[T]				):
         return {unit.name: unit.value for unit in cls if unit.value > 0}




     @classmethod
     def   lowerCamelCase_   (	cls   :			type[T]				):
         return {unit.name: unit.value for unit in cls if unit.value < 0}




def 					SCREAMING_SNAKE_CASE	(       __UpperCamelCase			:						float      )  ->							str:
    UpperCAmelCase_							 =     SIUnit.get_positive() if value > 0 else SIUnit.get_negative()
    for name_prefix, value_prefix in prefixes.items():
        UpperCAmelCase_							 =     value / (10**value_prefix)
        if numerical_part > 1:
            return f'{numerical_part!s} {name_prefix}'
    return str(__UpperCamelCase      )




def 					SCREAMING_SNAKE_CASE	(       __UpperCamelCase			:						float      )  ->							str:
    for prefix in BinaryUnit:
        UpperCAmelCase_							 =     value / (2**prefix.value)
        if numerical_part > 1:
            return f'{numerical_part!s} {prefix.name}'
    return str(__UpperCamelCase      )


if __name__ == "__main__":
 import doctest

 doctest.testmod()





