






"""simple docstring"""





from collections import OrderedDict
from typing import Mapping

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


UpperCamelCase_						:					Tuple      				=			logging.get_logger(__name__)

UpperCamelCase_						:					Tuple      				=			{
    """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   _lowercase			(  lowerCAmelCase    ):
      _a :  Dict										= '''electra'''


      def __init__(     self					:						Union[str, Any]				, a					:						List[Any]=3_0_5_2_2				, a					:						Optional[int]=1_2_8				, a					:						Union[str, Any]=2_5_6				, a					:						Dict=1_2				, a					:						List[str]=4				, a					:						str=1_0_2_4				, a					:						Any="gelu"				, a					:						Optional[int]=0.1				, a					:						List[str]=0.1				, a					:						Union[str, Any]=5_1_2				, a					:						Any=2				, a					:						Union[str, Any]=0.0_2				, a					:						str=1e-12				, a					:						Any="first"				, a					:						List[str]=True				, a					:						Optional[Any]="gelu"				, a					:						int=0.1				, a					:						List[str]=0				, a					:						Optional[Any]="absolute"				, a					:						Dict=True				, a					:						Union[str, Any]=None				, **a					:						int				, ):





            """simple docstring"""







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

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

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



class   _lowercase			(  lowerCAmelCase    ):


      @property
      def _UpperCamelCase    (     self					:						Optional[int]    ):





            """simple docstring"""







            if self.task == "multiple-choice":
                  __snake_case   :     Optional[Any]	      ={0: '''batch''', 1: '''choice''', 2: '''sequence'''}
            else:
                  __snake_case   :     List[Any]	      ={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_tokenizers_available,
    is_torch_available,
)


UpperCamelCase_						:					Dict      				=			{
    """configuration_layoutlm""": ["""LAYOUTLM_PRETRAINED_CONFIG_ARCHIVE_MAP""", """LayoutLMConfig""", """LayoutLMOnnxConfig"""],
    """tokenization_layoutlm""": ["""LayoutLMTokenizer"""],
}

try:
    if not is_tokenizers_available():
        raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
    pass
else:
    UpperCamelCase_						:					List[Any]      				=			["""LayoutLMTokenizerFast"""]

try:
    if not is_torch_available():
        raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
    pass
else:
    UpperCamelCase_						:					Optional[Any]      				=			[
        """LAYOUTLM_PRETRAINED_MODEL_ARCHIVE_LIST""",
        """LayoutLMForMaskedLM""",
        """LayoutLMForSequenceClassification""",
        """LayoutLMForTokenClassification""",
        """LayoutLMForQuestionAnswering""",
        """LayoutLMModel""",
        """LayoutLMPreTrainedModel""",
    ]

try:
    if not is_tf_available():
        raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
    pass
else:
    UpperCamelCase_						:					Optional[int]      				=			[
        """TF_LAYOUTLM_PRETRAINED_MODEL_ARCHIVE_LIST""",
        """TFLayoutLMForMaskedLM""",
        """TFLayoutLMForSequenceClassification""",
        """TFLayoutLMForTokenClassification""",
        """TFLayoutLMForQuestionAnswering""",
        """TFLayoutLMMainLayer""",
        """TFLayoutLMModel""",
        """TFLayoutLMPreTrainedModel""",
    ]


if TYPE_CHECKING:
    from .configuration_layoutlm import LAYOUTLM_PRETRAINED_CONFIG_ARCHIVE_MAP, LayoutLMConfig, LayoutLMOnnxConfig
    from .tokenization_layoutlm import LayoutLMTokenizer

    try:
        if not is_tokenizers_available():
            raise OptionalDependencyNotAvailable()
    except OptionalDependencyNotAvailable:
        pass
    else:
        from .tokenization_layoutlm_fast import LayoutLMTokenizerFast

    try:
        if not is_torch_available():
            raise OptionalDependencyNotAvailable()
    except OptionalDependencyNotAvailable:
        pass
    else:
        from .modeling_layoutlm import (
            LAYOUTLM_PRETRAINED_MODEL_ARCHIVE_LIST,
            LayoutLMForMaskedLM,
            LayoutLMForQuestionAnswering,
            LayoutLMForSequenceClassification,
            LayoutLMForTokenClassification,
            LayoutLMModel,
            LayoutLMPreTrainedModel,
        )
    try:
        if not is_tf_available():
            raise OptionalDependencyNotAvailable()
    except OptionalDependencyNotAvailable:
        pass
    else:
        from .modeling_tf_layoutlm import (
            TF_LAYOUTLM_PRETRAINED_MODEL_ARCHIVE_LIST,
            TFLayoutLMForMaskedLM,
            TFLayoutLMForQuestionAnswering,
            TFLayoutLMForSequenceClassification,
            TFLayoutLMForTokenClassification,
            TFLayoutLMMainLayer,
            TFLayoutLMModel,
            TFLayoutLMPreTrainedModel,
        )

else:
    import sys

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


