






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      =				{
    "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 	a_(		lowercase__	):



     """simple docstring"""



     __snake_case		:				List[Any]  					='''electra'''





     def __init__(		self					:	int  ,  lowerCAmelCase__					:	Any=3_0_5_2_2  ,  lowerCAmelCase__					:	List[str]=1_2_8  ,  lowerCAmelCase__					:	Optional[int]=2_5_6  ,  lowerCAmelCase__					:	List[str]=1_2  ,  lowerCAmelCase__					:	Dict=4  ,  lowerCAmelCase__					:	List[Any]=1_0_2_4  ,  lowerCAmelCase__					:	List[Any]="gelu"  ,  lowerCAmelCase__					:	Union[str, Any]=0.1  ,  lowerCAmelCase__					:	List[str]=0.1  ,  lowerCAmelCase__					:	Tuple=5_1_2  ,  lowerCAmelCase__					:	int=2  ,  lowerCAmelCase__					:	int=0.02  ,  lowerCAmelCase__					:	str=1e-12  ,  lowerCAmelCase__					:	List[str]="first"  ,  lowerCAmelCase__					:	Any=True  ,  lowerCAmelCase__					:	List[Any]="gelu"  ,  lowerCAmelCase__					:	Optional[Any]=0.1  ,  lowerCAmelCase__					:	List[Any]=0  ,  lowerCAmelCase__					:	List[str]="absolute"  ,  lowerCAmelCase__					:	Tuple=True  ,  lowerCAmelCase__					:	List[str]=None  ,  **lowerCAmelCase__					:	int  ,  )							->	List[str]:

      """simple docstring"""
      super().__init__(pad_token_id=lowerCAmelCase__  ,  **lowerCAmelCase__)

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

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

class 	a_(		lowercase__	):



     """simple docstring"""



     @property
     def     __UpperCamelCase						(		self					:	List[str])							->	Mapping[str, Mapping[int, str]]:

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












def 						A_					(						lowercase_	,  lowercase_			)				->List[Any]:







 """simple docstring"""

 SCREAMING_SNAKE_CASE				    =		1
 while b > 0:
  if b & 1:
   res *= a

  a *= a
  b >>= 1

 return res





def 						A_					(						lowercase_	,  lowercase_	,  lowercase_			)				->Any:







 """simple docstring"""

 SCREAMING_SNAKE_CASE				    =		1
 while b > 0:
  if b & 1:
   SCREAMING_SNAKE_CASE				    =		((res % c) * (a % c)) % c

  a *= a
  b >>= 1

 return res




