





'''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_  :							int            =	logging.get_logger(__name__)

snake_case_  :							List[Any]            =	{
    "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       : str          =							"electra"

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







													"""simple docstring"""
													super().__init__(pad_token_id=__magic_name__							,  **__magic_name__ )

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

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





class        __a   (lowerCamelCase  ):

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







													"""simple docstring"""
													if self.task == "multiple-choice":
																			UpperCAmelCase_      :   str      =	{0: '''batch''', 1: '''choice''', 2: '''sequence'''}
													else:
																			UpperCAmelCase_      :   str      =	{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_torch_available, is_vision_available


snake_case_  :							Any            =	{
    "configuration_flava": [
        "FLAVA_PRETRAINED_CONFIG_ARCHIVE_MAP",
        "FlavaConfig",
        "FlavaImageCodebookConfig",
        "FlavaImageConfig",
        "FlavaMultimodalConfig",
        "FlavaTextConfig",
    ],
}

try:
					if not is_vision_available():
										raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
					pass
else:
					snake_case_  :							List[str]            =	["FlavaFeatureExtractor"]
					snake_case_  :							int            =	["FlavaImageProcessor"]
					snake_case_  :							Tuple            =	["FlavaProcessor"]

try:
					if not is_torch_available():
										raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
					pass
else:
					snake_case_  :							Optional[int]            =	[
					    "FLAVA_PRETRAINED_MODEL_ARCHIVE_LIST",
					    "FlavaForPreTraining",
					    "FlavaImageCodebook",
					    "FlavaImageModel",
					    "FlavaModel",
					    "FlavaMultimodalModel",
					    "FlavaPreTrainedModel",
					    "FlavaTextModel",
					]

if TYPE_CHECKING:
					from .configuration_flava import (
					    FLAVA_PRETRAINED_CONFIG_ARCHIVE_MAP,
					    FlavaConfig,
					    FlavaImageCodebookConfig,
					    FlavaImageConfig,
					    FlavaMultimodalConfig,
					    FlavaTextConfig,
					)

					try:
										if not is_vision_available():
															raise OptionalDependencyNotAvailable()
					except OptionalDependencyNotAvailable:
										pass
					else:
										from .feature_extraction_flava import FlavaFeatureExtractor
										from .image_processing_flava import FlavaImageProcessor
										from .processing_flava import FlavaProcessor

					try:
										if not is_torch_available():
															raise OptionalDependencyNotAvailable()
					except OptionalDependencyNotAvailable:
										pass
					else:
										from .modeling_flava import (
										    FLAVA_PRETRAINED_MODEL_ARCHIVE_LIST,
										    FlavaForPreTraining,
										    FlavaImageCodebook,
										    FlavaImageModel,
										    FlavaModel,
										    FlavaMultimodalModel,
										    FlavaPreTrainedModel,
										    FlavaTextModel,
										)

else:
					import sys

					snake_case_  :							Any            =	_LazyModule(__name__, globals()["__file__"], _import_structure, module_spec=__spec__)





