
'''simple docstring'''







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


_snake_case				:   str     =				logging.get_logger(__name__)

_snake_case				:   Tuple     =				{
    """uclanlp/visualbert-vqa""": """https://huggingface.co/uclanlp/visualbert-vqa/resolve/main/config.json""",
    """uclanlp/visualbert-vqa-pre""": """https://huggingface.co/uclanlp/visualbert-vqa-pre/resolve/main/config.json""",
    """uclanlp/visualbert-vqa-coco-pre""": (
        """https://huggingface.co/uclanlp/visualbert-vqa-coco-pre/resolve/main/config.json"""
    ),
    """uclanlp/visualbert-vcr""": """https://huggingface.co/uclanlp/visualbert-vcr/resolve/main/config.json""",
    """uclanlp/visualbert-vcr-pre""": """https://huggingface.co/uclanlp/visualbert-vcr-pre/resolve/main/config.json""",
    """uclanlp/visualbert-vcr-coco-pre""": (
        """https://huggingface.co/uclanlp/visualbert-vcr-coco-pre/resolve/main/config.json"""
    ),
    """uclanlp/visualbert-nlvr2""": """https://huggingface.co/uclanlp/visualbert-nlvr2/resolve/main/config.json""",
    """uclanlp/visualbert-nlvr2-pre""": """https://huggingface.co/uclanlp/visualbert-nlvr2-pre/resolve/main/config.json""",
    """uclanlp/visualbert-nlvr2-coco-pre""": (
        """https://huggingface.co/uclanlp/visualbert-nlvr2-coco-pre/resolve/main/config.json"""
    )
    # See all VisualBERT models at https://huggingface.co/models?filter=visual_bert
}


class 			lowerCAmelCase (				__UpperCAmelCase			):
		a							:					Any       =					"""visual_bert"""




		def __init__(				self					,						UpperCamelCase=30_522					,						UpperCamelCase=768					,						UpperCamelCase=512					,						UpperCamelCase=12					,						UpperCamelCase=12					,						UpperCamelCase=3_072					,						UpperCamelCase="gelu"					,						UpperCamelCase=0.1					,						UpperCamelCase=0.1					,						UpperCamelCase=512					,						UpperCamelCase=2					,						UpperCamelCase=0.02					,						UpperCamelCase=1e-12					,						UpperCamelCase=False					,						UpperCamelCase=True					,						UpperCamelCase=1					,						UpperCamelCase=0					,						UpperCamelCase=2					,						**UpperCamelCase					,						):
								super().__init__(pad_token_id=UpperCamelCase					,						bos_token_id=UpperCamelCase					,						eos_token_id=UpperCamelCase					,						**UpperCamelCase      )

								_SCREAMING_SNAKE_CASE				= vocab_size
								_SCREAMING_SNAKE_CASE				= max_position_embeddings
								_SCREAMING_SNAKE_CASE				= hidden_size
								_SCREAMING_SNAKE_CASE				= visual_embedding_dim
								_SCREAMING_SNAKE_CASE				= num_hidden_layers
								_SCREAMING_SNAKE_CASE				= num_attention_heads
								_SCREAMING_SNAKE_CASE				= intermediate_size
								_SCREAMING_SNAKE_CASE				= hidden_act
								_SCREAMING_SNAKE_CASE				= hidden_dropout_prob
								_SCREAMING_SNAKE_CASE				= attention_probs_dropout_prob
								_SCREAMING_SNAKE_CASE				= initializer_range
								_SCREAMING_SNAKE_CASE				= type_vocab_size
								_SCREAMING_SNAKE_CASE				= layer_norm_eps
								_SCREAMING_SNAKE_CASE				= bypass_transformer
								_SCREAMING_SNAKE_CASE				= special_visual_initialize

'''simple docstring'''







from typing import TYPE_CHECKING

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


_snake_case				:   int     =				{
    """configuration_longformer""": [
        """LONGFORMER_PRETRAINED_CONFIG_ARCHIVE_MAP""",
        """LongformerConfig""",
        """LongformerOnnxConfig""",
    ],
    """tokenization_longformer""": ["""LongformerTokenizer"""],
}

try:
						if not is_tokenizers_available():
												raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
						pass
else:
						_snake_case				:   Optional[int]     =				["""LongformerTokenizerFast"""]

try:
						if not is_torch_available():
												raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
						pass
else:
						_snake_case				:   int     =				[
						    """LONGFORMER_PRETRAINED_MODEL_ARCHIVE_LIST""",
						    """LongformerForMaskedLM""",
						    """LongformerForMultipleChoice""",
						    """LongformerForQuestionAnswering""",
						    """LongformerForSequenceClassification""",
						    """LongformerForTokenClassification""",
						    """LongformerModel""",
						    """LongformerPreTrainedModel""",
						    """LongformerSelfAttention""",
						]

try:
						if not is_tf_available():
												raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
						pass
else:
						_snake_case				:   Tuple     =				[
						    """TF_LONGFORMER_PRETRAINED_MODEL_ARCHIVE_LIST""",
						    """TFLongformerForMaskedLM""",
						    """TFLongformerForMultipleChoice""",
						    """TFLongformerForQuestionAnswering""",
						    """TFLongformerForSequenceClassification""",
						    """TFLongformerForTokenClassification""",
						    """TFLongformerModel""",
						    """TFLongformerPreTrainedModel""",
						    """TFLongformerSelfAttention""",
						]


if TYPE_CHECKING:
						from .configuration_longformer import (
						    LONGFORMER_PRETRAINED_CONFIG_ARCHIVE_MAP,
						    LongformerConfig,
						    LongformerOnnxConfig,
						)
						from .tokenization_longformer import LongformerTokenizer

						try:
												if not is_tokenizers_available():
																		raise OptionalDependencyNotAvailable()
						except OptionalDependencyNotAvailable:
												pass
						else:
												from .tokenization_longformer_fast import LongformerTokenizerFast

						try:
												if not is_torch_available():
																		raise OptionalDependencyNotAvailable()
						except OptionalDependencyNotAvailable:
												pass
						else:
												from .modeling_longformer import (
												    LONGFORMER_PRETRAINED_MODEL_ARCHIVE_LIST,
												    LongformerForMaskedLM,
												    LongformerForMultipleChoice,
												    LongformerForQuestionAnswering,
												    LongformerForSequenceClassification,
												    LongformerForTokenClassification,
												    LongformerModel,
												    LongformerPreTrainedModel,
												    LongformerSelfAttention,
												)

						try:
												if not is_tf_available():
																		raise OptionalDependencyNotAvailable()
						except OptionalDependencyNotAvailable:
												pass
						else:
												from .modeling_tf_longformer import (
												    TF_LONGFORMER_PRETRAINED_MODEL_ARCHIVE_LIST,
												    TFLongformerForMaskedLM,
												    TFLongformerForMultipleChoice,
												    TFLongformerForQuestionAnswering,
												    TFLongformerForSequenceClassification,
												    TFLongformerForTokenClassification,
												    TFLongformerModel,
												    TFLongformerPreTrainedModel,
												    TFLongformerSelfAttention,
												)

else:
						import sys

						_snake_case				:   Dict     =				_LazyModule(__name__, globals()["""__file__"""], _import_structure, module_spec=__spec__)