



"""simple docstring"""


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    A_    (  SCREAMING_SNAKE_CASE_       ):



						"""simple docstring"""
						__UpperCamelCase	       =							"""electra"""






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

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

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







class    A_    (  SCREAMING_SNAKE_CASE_       ):



						"""simple docstring"""






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










"""simple docstring"""


import warnings

from .generation import FlaxGenerationMixin







class    A_    (  SCREAMING_SNAKE_CASE_       ):



						"""simple docstring"""
						# warning at import time
						warnings.warn(
						    """Importing `FlaxGenerationMixin` from `src/transformers/generation_flax_utils.py` is deprecated and will """
						    """be removed in Transformers v5. Import as `from transformers import FlaxGenerationMixin` instead."""			,     SCREAMING_SNAKE_CASE_			,     )





