
'''simple docstring'''


from ...configuration_utils import PretrainedConfig
from ...utils import logging


snake_case_ :  int     =					logging.get_logger(__name__)

snake_case_ :  Optional[Any]     =					{
    'studio-ousia/luke-base': 'https://huggingface.co/studio-ousia/luke-base/resolve/main/config.json',
    'studio-ousia/luke-large': 'https://huggingface.co/studio-ousia/luke-large/resolve/main/config.json',
}


class 						lowercase__	(  snake_case_   ):






   '''simple docstring'''







   _snake_case		   =							'''luke'''







   def __init__(			self ,   lowerCamelCase__=5_0_2_6_7 ,   lowerCamelCase__=5_0_0_0_0_0 ,   lowerCamelCase__=7_6_8 ,   lowerCamelCase__=2_5_6 ,   lowerCamelCase__=1_2 ,   lowerCamelCase__=1_2 ,   lowerCamelCase__=3_0_7_2 ,   lowerCamelCase__="gelu" ,   lowerCamelCase__=0.1 ,   lowerCamelCase__=0.1 ,   lowerCamelCase__=5_1_2 ,   lowerCamelCase__=2 ,   lowerCamelCase__=0.02 ,   lowerCamelCase__=1e-1_2 ,   lowerCamelCase__=True ,   lowerCamelCase__=None ,   lowerCamelCase__=1 ,   lowerCamelCase__=0 ,   lowerCamelCase__=2 ,   **lowerCamelCase__ ,   ):

      '''simple docstring'''







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

      UpperCamelCase       =  vocab_size
      UpperCamelCase       =  entity_vocab_size
      UpperCamelCase       =  hidden_size
      UpperCamelCase       =  entity_emb_size
      UpperCamelCase       =  num_hidden_layers
      UpperCamelCase       =  num_attention_heads
      UpperCamelCase       =  hidden_act
      UpperCamelCase       =  intermediate_size
      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       =  use_entity_aware_attention
      UpperCamelCase       =  classifier_dropout







'''simple docstring'''


from typing import TYPE_CHECKING

from ...utils import (
    OptionalDependencyNotAvailable,
    _LazyModule,
    is_flax_available,
    is_tf_available,
    is_tokenizers_available,
    is_torch_available,
)


snake_case_ :  Any     =					{
    'configuration_electra': ['ELECTRA_PRETRAINED_CONFIG_ARCHIVE_MAP', 'ElectraConfig', 'ElectraOnnxConfig'],
    'tokenization_electra': ['ElectraTokenizer'],
}

try:
   if not is_tokenizers_available():
      raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
   pass
else:
   snake_case_ :  Union[str, Any]     =					['ElectraTokenizerFast']

try:
   if not is_torch_available():
      raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
   pass
else:
   snake_case_ :  Tuple     =					[
       'ELECTRA_PRETRAINED_MODEL_ARCHIVE_LIST',
       'ElectraForCausalLM',
       'ElectraForMaskedLM',
       'ElectraForMultipleChoice',
       'ElectraForPreTraining',
       'ElectraForQuestionAnswering',
       'ElectraForSequenceClassification',
       'ElectraForTokenClassification',
       'ElectraModel',
       'ElectraPreTrainedModel',
       'load_tf_weights_in_electra',
   ]

try:
   if not is_tf_available():
      raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
   pass
else:
   snake_case_ :  int     =					[
       'TF_ELECTRA_PRETRAINED_MODEL_ARCHIVE_LIST',
       'TFElectraForMaskedLM',
       'TFElectraForMultipleChoice',
       'TFElectraForPreTraining',
       'TFElectraForQuestionAnswering',
       'TFElectraForSequenceClassification',
       'TFElectraForTokenClassification',
       'TFElectraModel',
       'TFElectraPreTrainedModel',
   ]

try:
   if not is_flax_available():
      raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
   pass
else:
   snake_case_ :  Optional[int]     =					[
       'FlaxElectraForCausalLM',
       'FlaxElectraForMaskedLM',
       'FlaxElectraForMultipleChoice',
       'FlaxElectraForPreTraining',
       'FlaxElectraForQuestionAnswering',
       'FlaxElectraForSequenceClassification',
       'FlaxElectraForTokenClassification',
       'FlaxElectraModel',
       'FlaxElectraPreTrainedModel',
   ]


if TYPE_CHECKING:
   from .configuration_electra import ELECTRA_PRETRAINED_CONFIG_ARCHIVE_MAP, ElectraConfig, ElectraOnnxConfig
   from .tokenization_electra import ElectraTokenizer

   try:
      if not is_tokenizers_available():
         raise OptionalDependencyNotAvailable()
   except OptionalDependencyNotAvailable:
      pass
   else:
      from .tokenization_electra_fast import ElectraTokenizerFast

   try:
      if not is_torch_available():
         raise OptionalDependencyNotAvailable()
   except OptionalDependencyNotAvailable:
      pass
   else:
      from .modeling_electra import (
          ELECTRA_PRETRAINED_MODEL_ARCHIVE_LIST,
          ElectraForCausalLM,
          ElectraForMaskedLM,
          ElectraForMultipleChoice,
          ElectraForPreTraining,
          ElectraForQuestionAnswering,
          ElectraForSequenceClassification,
          ElectraForTokenClassification,
          ElectraModel,
          ElectraPreTrainedModel,
          load_tf_weights_in_electra,
      )

   try:
      if not is_tf_available():
         raise OptionalDependencyNotAvailable()
   except OptionalDependencyNotAvailable:
      pass
   else:
      from .modeling_tf_electra import (
          TF_ELECTRA_PRETRAINED_MODEL_ARCHIVE_LIST,
          TFElectraForMaskedLM,
          TFElectraForMultipleChoice,
          TFElectraForPreTraining,
          TFElectraForQuestionAnswering,
          TFElectraForSequenceClassification,
          TFElectraForTokenClassification,
          TFElectraModel,
          TFElectraPreTrainedModel,
      )

   try:
      if not is_flax_available():
         raise OptionalDependencyNotAvailable()
   except OptionalDependencyNotAvailable:
      pass
   else:
      from .modeling_flax_electra import (
          FlaxElectraForCausalLM,
          FlaxElectraForMaskedLM,
          FlaxElectraForMultipleChoice,
          FlaxElectraForPreTraining,
          FlaxElectraForQuestionAnswering,
          FlaxElectraForSequenceClassification,
          FlaxElectraForTokenClassification,
          FlaxElectraModel,
          FlaxElectraPreTrainedModel,
      )

else:
   import sys

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





