
"""simple docstring"""

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


UpperCamelCase			:       Dict									=				logging.get_logger(__name__)

UpperCamelCase			:       Any									=				{
    # See all MEGATRON_BERT models at https://huggingface.co/models?filter=bert
}

class __lowerCAmelCase	(   __SCREAMING_SNAKE_CASE    ):
					lowercase		     =		"megatron-bert"





					def __init__(			self			,  __UpperCAmelCase=2_9056			,  __UpperCAmelCase=1024			,  __UpperCAmelCase=24			,  __UpperCAmelCase=16			,  __UpperCAmelCase=4096			,  __UpperCAmelCase="gelu"			,  __UpperCAmelCase=0.1			,  __UpperCAmelCase=0.1			,  __UpperCAmelCase=512			,  __UpperCAmelCase=2			,  __UpperCAmelCase=0.0_2			,  __UpperCAmelCase=1E-12			,  __UpperCAmelCase=0			,  __UpperCAmelCase="absolute"			,  __UpperCAmelCase=True			,  **__UpperCAmelCase			,  ):

						'''simple docstring'''




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

						__UpperCamelCase       						= vocab_size
						__UpperCamelCase       						= hidden_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       						= position_embedding_type
						__UpperCamelCase       						= use_cache





"""simple docstring"""

from typing import TYPE_CHECKING

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


UpperCamelCase			:       Dict									=				{
    "configuration_lxmert": ["LXMERT_PRETRAINED_CONFIG_ARCHIVE_MAP", "LxmertConfig"],
    "tokenization_lxmert": ["LxmertTokenizer"],
}

try:
      if not is_tokenizers_available():
            raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
      pass
else:
      UpperCamelCase			:       List[str]									=				["LxmertTokenizerFast"]

try:
      if not is_torch_available():
            raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
      pass
else:
      UpperCamelCase			:       Optional[Any]									=				[
          "LxmertEncoder",
          "LxmertForPreTraining",
          "LxmertForQuestionAnswering",
          "LxmertModel",
          "LxmertPreTrainedModel",
          "LxmertVisualFeatureEncoder",
          "LxmertXLayer",
      ]

try:
      if not is_tf_available():
            raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
      pass
else:
      UpperCamelCase			:       List[Any]									=				[
          "TF_LXMERT_PRETRAINED_MODEL_ARCHIVE_LIST",
          "TFLxmertForPreTraining",
          "TFLxmertMainLayer",
          "TFLxmertModel",
          "TFLxmertPreTrainedModel",
          "TFLxmertVisualFeatureEncoder",
      ]


if TYPE_CHECKING:
      from .configuration_lxmert import LXMERT_PRETRAINED_CONFIG_ARCHIVE_MAP, LxmertConfig
      from .tokenization_lxmert import LxmertTokenizer

      try:
            if not is_tokenizers_available():
                  raise OptionalDependencyNotAvailable()
      except OptionalDependencyNotAvailable:
            pass
      else:
            from .tokenization_lxmert_fast import LxmertTokenizerFast

      try:
            if not is_torch_available():
                  raise OptionalDependencyNotAvailable()
      except OptionalDependencyNotAvailable:
            pass
      else:
            from .modeling_lxmert import (
                LxmertEncoder,
                LxmertForPreTraining,
                LxmertForQuestionAnswering,
                LxmertModel,
                LxmertPreTrainedModel,
                LxmertVisualFeatureEncoder,
                LxmertXLayer,
            )

      try:
            if not is_tf_available():
                  raise OptionalDependencyNotAvailable()
      except OptionalDependencyNotAvailable:
            pass
      else:
            from .modeling_tf_lxmert import (
                TF_LXMERT_PRETRAINED_MODEL_ARCHIVE_LIST,
                TFLxmertForPreTraining,
                TFLxmertMainLayer,
                TFLxmertModel,
                TFLxmertPreTrainedModel,
                TFLxmertVisualFeatureEncoder,
            )

else:
      import sys

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



