





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


UpperCAmelCase	:	Any		     =       logging.get_logger(__name__)

# TODO: upload to AWS
UpperCAmelCase	:	Dict		     =       {
    """yjernite/retribert-base-uncased""": (
        """https://huggingface.co/yjernite/retribert-base-uncased/resolve/main/config.json"""
    ),
}







class 				__lowerCAmelCase       (    UpperCamelCase__):
      _lowercase				:					Optional[Any]						=			"""retribert"""







      def __init__(    self		,      lowerCAmelCase__=3_0_5_2_2		,      lowerCAmelCase__=7_6_8		,      lowerCAmelCase__=8		,      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-12		,      lowerCAmelCase__=True		,      lowerCAmelCase__=1_2_8		,      lowerCAmelCase__=0		,      **lowerCAmelCase__		,      )   ->						str:



        '''simple docstring'''




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

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








from typing import TYPE_CHECKING

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


SCREAMING_SNAKE_CASE__   :			List[str]												=    {
    "configuration_blip": [
        "BLIP_PRETRAINED_CONFIG_ARCHIVE_MAP",
        "BlipConfig",
        "BlipTextConfig",
        "BlipVisionConfig",
    ],
    "processing_blip": ["BlipProcessor"],
}

try:
					if not is_vision_available():
										raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
					pass
else:
					SCREAMING_SNAKE_CASE__   :			str												=    ["BlipImageProcessor"]


try:
					if not is_torch_available():
										raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
					pass
else:
					SCREAMING_SNAKE_CASE__   :			int												=    [
					    "BLIP_PRETRAINED_MODEL_ARCHIVE_LIST",
					    "BlipModel",
					    "BlipPreTrainedModel",
					    "BlipForConditionalGeneration",
					    "BlipForQuestionAnswering",
					    "BlipVisionModel",
					    "BlipTextModel",
					    "BlipForImageTextRetrieval",
					]

try:
					if not is_tf_available():
										raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
					pass
else:
					SCREAMING_SNAKE_CASE__   :			Any												=    [
					    "TF_BLIP_PRETRAINED_MODEL_ARCHIVE_LIST",
					    "TFBlipModel",
					    "TFBlipPreTrainedModel",
					    "TFBlipForConditionalGeneration",
					    "TFBlipForQuestionAnswering",
					    "TFBlipVisionModel",
					    "TFBlipTextModel",
					    "TFBlipForImageTextRetrieval",
					]

if TYPE_CHECKING:
					from .configuration_blip import BLIP_PRETRAINED_CONFIG_ARCHIVE_MAP, BlipConfig, BlipTextConfig, BlipVisionConfig
					from .processing_blip import BlipProcessor

					try:
										if not is_vision_available():
															raise OptionalDependencyNotAvailable()
					except OptionalDependencyNotAvailable:
										pass
					else:
										from .image_processing_blip import BlipImageProcessor

					try:
										if not is_torch_available():
															raise OptionalDependencyNotAvailable()
					except OptionalDependencyNotAvailable:
										pass
					else:
										from .modeling_blip import (
										    BLIP_PRETRAINED_MODEL_ARCHIVE_LIST,
										    BlipForConditionalGeneration,
										    BlipForImageTextRetrieval,
										    BlipForQuestionAnswering,
										    BlipModel,
										    BlipPreTrainedModel,
										    BlipTextModel,
										    BlipVisionModel,
										)

					try:
										if not is_tf_available():
															raise OptionalDependencyNotAvailable()
					except OptionalDependencyNotAvailable:
										pass
					else:
										from .modeling_tf_blip import (
										    TF_BLIP_PRETRAINED_MODEL_ARCHIVE_LIST,
										    TFBlipForConditionalGeneration,
										    TFBlipForImageTextRetrieval,
										    TFBlipForQuestionAnswering,
										    TFBlipModel,
										    TFBlipPreTrainedModel,
										    TFBlipTextModel,
										    TFBlipVisionModel,
										)

else:
					import sys

					SCREAMING_SNAKE_CASE__   :			Tuple												=    _LazyModule(__name__, globals()["__file__"], _import_structure, module_spec=__spec__)



