




from collections import OrderedDict
from typing import Mapping

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


__lowerCAmelCase		:    int	      =		logging.get_logger(__name__)

__lowerCAmelCase		:    List[str]	      =		{
    '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__							(lowerCAmelCase__       ):
	"""simple docstring"""



	SCREAMING_SNAKE_CASE_	:							Optional[int]										= "electra"





	def __init__(				self    :					List[str] ,				__lowerCamelCase    :					str=3_05_22 ,				__lowerCamelCase    :					int=1_28 ,				__lowerCamelCase    :					List[str]=2_56 ,				__lowerCamelCase    :					Any=12 ,				__lowerCamelCase    :					Tuple=4 ,				__lowerCamelCase    :					int=10_24 ,				__lowerCamelCase    :					Tuple="gelu" ,				__lowerCamelCase    :					int=0.1 ,				__lowerCamelCase    :					int=0.1 ,				__lowerCamelCase    :					Tuple=5_12 ,				__lowerCamelCase    :					int=2 ,				__lowerCamelCase    :					Optional[int]=0.02 ,				__lowerCamelCase    :					Dict=1e-12 ,				__lowerCamelCase    :					Optional[int]="first" ,				__lowerCamelCase    :					Union[str, Any]=True ,				__lowerCamelCase    :					Dict="gelu" ,				__lowerCamelCase    :					Tuple=0.1 ,				__lowerCamelCase    :					List[Any]=0 ,				__lowerCamelCase    :					List[str]="absolute" ,				__lowerCamelCase    :					str=True ,				__lowerCamelCase    :					Tuple=None ,				**__lowerCamelCase    :					List[str] ,				) ->					Tuple:
				super().__init__(pad_token_id=_UpperCAmelCase ,				**_UpperCAmelCase							)

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

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




class    snake_case__							(lowerCAmelCase__       ):
	"""simple docstring"""



	@property
	def 							__UpperCAmelCase							(				self    :					Optional[Any]							) ->					Mapping[str, Mapping[int, str]]:


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












from ..utils import DummyObject, requires_backends




class    snake_case__							(metaclass=_UpperCamelCase       ):
				"""simple docstring"""



				SCREAMING_SNAKE_CASE_	:							List[str]										= ["""torch""", """transformers""", """k_diffusion"""]





				def __init__(				self    :					Optional[int] ,				*__lowerCamelCase    :					Union[str, Any] ,				**__lowerCamelCase    :					List[Any]							) ->					Optional[Any]:
							requires_backends(self ,				["torch", "transformers", "k_diffusion"]							)





				@classmethod
				def 							__UpperCAmelCase							(				cls    :					str ,				*__lowerCamelCase    :					Union[str, Any] ,				**__lowerCamelCase    :					Tuple							) ->					List[Any]:
							requires_backends(cls ,				["torch", "transformers", "k_diffusion"]							)





				@classmethod
				def 							__UpperCAmelCase							(				cls    :					Optional[Any] ,				*__lowerCamelCase    :					List[str] ,				**__lowerCamelCase    :					int							) ->					Dict:
							requires_backends(cls ,				["torch", "transformers", "k_diffusion"]							)






