





from collections import OrderedDict
from typing import Mapping

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


_UpperCAmelCase										=					logging.get_logger(__name__)

_UpperCAmelCase										=					{
    '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 				_UpperCamelCase       (						_lowercase  ):
       _UpperCamelCase					:       Union[str, Any]       = '''electra'''

       def __init__(		self:			List[Any]       , _SCREAMING_SNAKE_CASE:			int=30522       , _SCREAMING_SNAKE_CASE:			List[Any]=128       , _SCREAMING_SNAKE_CASE:			Any=256       , _SCREAMING_SNAKE_CASE:			str=12       , _SCREAMING_SNAKE_CASE:			List[Any]=4       , _SCREAMING_SNAKE_CASE:			List[str]=1024       , _SCREAMING_SNAKE_CASE:			List[Any]="gelu"       , _SCREAMING_SNAKE_CASE:			int=0.1       , _SCREAMING_SNAKE_CASE:			str=0.1       , _SCREAMING_SNAKE_CASE:			str=512       , _SCREAMING_SNAKE_CASE:			Optional[Any]=2       , _SCREAMING_SNAKE_CASE:			List[Any]=0.02       , _SCREAMING_SNAKE_CASE:			Optional[int]=1e-12       , _SCREAMING_SNAKE_CASE:			List[str]="first"       , _SCREAMING_SNAKE_CASE:			Any=True       , _SCREAMING_SNAKE_CASE:			Optional[int]="gelu"       , _SCREAMING_SNAKE_CASE:			Tuple=0.1       , _SCREAMING_SNAKE_CASE:			Optional[Any]=0       , _SCREAMING_SNAKE_CASE:			Optional[Any]="absolute"       , _SCREAMING_SNAKE_CASE:			Optional[Any]=True       , _SCREAMING_SNAKE_CASE:			Tuple=None       , **_SCREAMING_SNAKE_CASE:			Tuple       , )							->			Optional[Any]:




              """simple docstring"""


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

              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 				_UpperCamelCase       (						_lowercase  ):

       @property
       def lowercase			(		self:			Tuple		)							->			Mapping[str, Mapping[int, str]]:




              """simple docstring"""


              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"""






from typing import TYPE_CHECKING

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


lowercase  		=			{
    """configuration_flaubert""": ["""FLAUBERT_PRETRAINED_CONFIG_ARCHIVE_MAP""", """FlaubertConfig""", """FlaubertOnnxConfig"""],
    """tokenization_flaubert""": ["""FlaubertTokenizer"""],
}

try:
					if not is_torch_available():
										raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
					pass
else:
					lowercase  		=			[
					    """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:
					lowercase  		=			[
					    """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

					lowercase  		=			_LazyModule(__name__, globals()["""__file__"""], _import_structure, module_spec=__spec__)





