

from collections import OrderedDict
from typing import Mapping

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


SCREAMING_SNAKE_CASE_						=					logging.get_logger(__name__)

SCREAMING_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     (		snake_case_ ):
						_lowercase			  =	'electra'


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







										'''simple docstring'''


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

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

										_UpperCAmelCase				:						Optional[int]       						=			summary_type
										_UpperCAmelCase				:						Union[str, Any]       						=			summary_use_proj
										_UpperCAmelCase				:						str       						=			summary_activation
										_UpperCAmelCase				:						List[Any]       						=			summary_last_dropout
										_UpperCAmelCase				:						Tuple       						=			position_embedding_type
										_UpperCAmelCase				:						List[Any]       						=			use_cache
										_UpperCAmelCase				:						Any       						=			classifier_dropout







class  a     (		snake_case_ ):


						@property
						def 				_UpperCAmelCase (				self		):







										'''simple docstring'''


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










"""simple docstring"""
class 		a_      :







      '''simple docstring'''

      class 		a_      :







            '''simple docstring'''

            lowerCamelCase__       :				List[Any] =	'_prev', '_data', '_next'




            def __init__(self,     lowerCamelCase_,     lowerCamelCase_,     lowerCamelCase_					):

             '''simple docstring'''



             lowerCamelCase__     :			Optional[int]     				=						link_p
             lowerCamelCase__     :			Optional[Any]     				=						element
             lowerCamelCase__     :			List[Any]     				=						link_n





            def 			a__							(self					):

             '''simple docstring'''



             return (
                 f''' Prev -> {self._prev is not None}, Next -> {self._next is not None}'''
             )




      def __init__(self					):

       '''simple docstring'''



       lowerCamelCase__     :			Any     				=						self._Node(lowerCamelCase_,     lowerCamelCase_,     lowerCamelCase_					)
       lowerCamelCase__     :			Dict     				=						self._Node(lowerCamelCase_,     lowerCamelCase_,     lowerCamelCase_					)
       lowerCamelCase__     :			List[str]     				=						self._trailer
       lowerCamelCase__     :			Union[str, Any]     				=						self._header
       lowerCamelCase__     :			Any     				=						0




      def __len__(self					):

       '''simple docstring'''



       return self._size




      def 			a__							(self					):

       '''simple docstring'''



       return self.__len__() == 0




      def 			a__							(self,     lowerCamelCase_,     lowerCamelCase_,     lowerCamelCase_					):

       '''simple docstring'''



       lowerCamelCase__     :			int     				=						self._Node(lowerCamelCase_,     lowerCamelCase_,     lowerCamelCase_					)
       lowerCamelCase__     :			Optional[int]     				=						new_node
       lowerCamelCase__     :			List[Any]     				=						new_node
       self._size += 1
       return self





      def 			a__							(self,     lowerCamelCase_					):

       '''simple docstring'''



       lowerCamelCase__     :			Optional[Any]     				=						node._prev
       lowerCamelCase__     :			List[str]     				=						node._next

       lowerCamelCase__     :			Tuple     				=						successor
       lowerCamelCase__     :			Tuple     				=						predecessor
       self._size -= 1
       lowerCamelCase__     :			int     				=						node._data
       lowerCamelCase__     :			Dict     				=						None
       del node
       return temp



class 		a_      (	_DoublyLinkedBase ):







      '''simple docstring'''

      def 			a__							(self					):

       '''simple docstring'''



       if self.is_empty():
        raise Exception('List is empty'					)
       return self._header._next._data




      def 			a__							(self					):

       '''simple docstring'''



       if self.is_empty():
        raise Exception('List is empty'					)
       return self._trailer._prev._data




      def 			a__							(self,     lowerCamelCase_					):

       '''simple docstring'''



       return self._insert(self._header,     lowerCamelCase_,     self._header._next					)




      def 			a__							(self,     lowerCamelCase_					):

       '''simple docstring'''



       return self._insert(self._trailer._prev,     lowerCamelCase_,     self._trailer					)




      def 			a__							(self					):

       '''simple docstring'''



       if self.is_empty():
        raise IndexError('remove_first from empty list'					)
       return self._delete(self._header._next					)





      def 			a__							(self					):

       '''simple docstring'''



       if self.is_empty():
        raise IndexError('remove_first from empty list'					)
       return self._delete(self._trailer._prev					)

