



from collections import OrderedDict
from typing import Mapping

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


a			:     Union[str, Any]     = logging.get_logger(__name__)

a			:     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 							_a							(      _lowerCAmelCase				):
   A					=  '''electra'''

   def __init__(self,      SCREAMING_SNAKE_CASE_=30522,      SCREAMING_SNAKE_CASE_=128,      SCREAMING_SNAKE_CASE_=256,      SCREAMING_SNAKE_CASE_=12,      SCREAMING_SNAKE_CASE_=4,      SCREAMING_SNAKE_CASE_=1024,      SCREAMING_SNAKE_CASE_="gelu",      SCREAMING_SNAKE_CASE_=0.1,      SCREAMING_SNAKE_CASE_=0.1,      SCREAMING_SNAKE_CASE_=512,      SCREAMING_SNAKE_CASE_=2,      SCREAMING_SNAKE_CASE_=0.0_2,      SCREAMING_SNAKE_CASE_=1E-12,      SCREAMING_SNAKE_CASE_="first",      SCREAMING_SNAKE_CASE_=True,      SCREAMING_SNAKE_CASE_="gelu",      SCREAMING_SNAKE_CASE_=0.1,      SCREAMING_SNAKE_CASE_=0,      SCREAMING_SNAKE_CASE_="absolute",      SCREAMING_SNAKE_CASE_=True,      SCREAMING_SNAKE_CASE_=None,      **SCREAMING_SNAKE_CASE_,      )					->      Optional[Any]:
      super().__init__(pad_token_id=SCREAMING_SNAKE_CASE_,      **SCREAMING_SNAKE_CASE_				)

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

      UpperCAmelCase_:		Optional[int]       			=    summary_type
      UpperCAmelCase_:		int       			=    summary_use_proj
      UpperCAmelCase_:		Tuple       			=    summary_activation
      UpperCAmelCase_:		int       			=    summary_last_dropout
      UpperCAmelCase_:		Any       			=    position_embedding_type
      UpperCAmelCase_:		Tuple       			=    use_cache
      UpperCAmelCase_:		Optional[int]       			=    classifier_dropout







class 							_a							(      _lowerCAmelCase				):

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











from typing import TYPE_CHECKING

from ...utils import OptionalDependencyNotAvailable, _LazyModule, is_tf_available, is_torch_available


a			:     Union[str, Any]     = {
    'configuration_flaubert': ['FLAUBERT_PRETRAINED_CONFIG_ARCHIVE_MAP', 'FlaubertConfig', 'FlaubertOnnxConfig'],
    'tokenization_flaubert': ['FlaubertTokenizer'],
}

try:
	if not is_torch_available():
		raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
	pass
else:
	a			:     Optional[int]     = [
	    'FLAUBERT_PRETRAINED_MODEL_ARCHIVE_LIST',
	    'FlaubertForMultipleChoice',
	    'FlaubertForQuestionAnswering',
	    'FlaubertForQuestionAnsweringSimple',
	    'FlaubertForSequenceClassification',
	    'FlaubertForTokenClassification',
	    'FlaubertModel',
	    'FlaubertWithLMHeadModel',
	    'FlaubertPreTrainedModel',
	]

try:
	if not is_tf_available():
		raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
	pass
else:
	a			:     Dict     = [
	    'TF_FLAUBERT_PRETRAINED_MODEL_ARCHIVE_LIST',
	    'TFFlaubertForMultipleChoice',
	    'TFFlaubertForQuestionAnsweringSimple',
	    'TFFlaubertForSequenceClassification',
	    'TFFlaubertForTokenClassification',
	    'TFFlaubertModel',
	    'TFFlaubertPreTrainedModel',
	    'TFFlaubertWithLMHeadModel',
	]


if TYPE_CHECKING:
	from .configuration_flaubert import FLAUBERT_PRETRAINED_CONFIG_ARCHIVE_MAP, FlaubertConfig, FlaubertOnnxConfig
	from .tokenization_flaubert import FlaubertTokenizer

	try:
		if not is_torch_available():
			raise OptionalDependencyNotAvailable()
	except OptionalDependencyNotAvailable:
		pass
	else:
		from .modeling_flaubert import (
		    FLAUBERT_PRETRAINED_MODEL_ARCHIVE_LIST,
		    FlaubertForMultipleChoice,
		    FlaubertForQuestionAnswering,
		    FlaubertForQuestionAnsweringSimple,
		    FlaubertForSequenceClassification,
		    FlaubertForTokenClassification,
		    FlaubertModel,
		    FlaubertPreTrainedModel,
		    FlaubertWithLMHeadModel,
		)

	try:
		if not is_tf_available():
			raise OptionalDependencyNotAvailable()
	except OptionalDependencyNotAvailable:
		pass
	else:
		from .modeling_tf_flaubert import (
		    TF_FLAUBERT_PRETRAINED_MODEL_ARCHIVE_LIST,
		    TFFlaubertForMultipleChoice,
		    TFFlaubertForQuestionAnsweringSimple,
		    TFFlaubertForSequenceClassification,
		    TFFlaubertForTokenClassification,
		    TFFlaubertModel,
		    TFFlaubertPreTrainedModel,
		    TFFlaubertWithLMHeadModel,
		)

else:
	import sys

	a			:     Tuple     = _LazyModule(__name__, globals()['__file__'], _import_structure, module_spec=__spec__)






