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/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 (  _snake_case ):
 __lowerCamelCase     : Tuple 	=   """electra"""
 def __init__(	self		, snake_case__=3_0522		, snake_case__=128		, snake_case__=256		, snake_case__=12		, snake_case__=4		, snake_case__=1024		, snake_case__="gelu"		, snake_case__=0.1		, snake_case__=0.1		, snake_case__=512		, snake_case__=2		, snake_case__=0.02		, snake_case__=1e-12		, snake_case__="first"		, snake_case__=True		, snake_case__="gelu"		, snake_case__=0.1		, snake_case__=0		, snake_case__="absolute"		, snake_case__=True		, snake_case__=None		, **snake_case__		, )						->				Dict:
       '''simple docstring'''





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

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

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







class       __snake_case (  _snake_case ):
 @property
 def 						UpperCAmelCase__							(	self    )						->				str:
       '''simple docstring'''





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


"""simple docstring"""
from ..utils import requires_backends


_a   :      List[str]       =				None






class   _UpperCAmelCase					:
    def __init__(     self    ,     *snake_case_    ,     **snake_case_  ):
      requires_backends(self    ,     ["detectron2"]  )


    @classmethod
    def        lowerCamelCase__						(     cls    ,     *snake_case_    ,     **snake_case_  ):
      requires_backends(cls    ,     ["detectron2"]  )

