




"""simple docstring"""


from typing import TYPE_CHECKING

# rely on isort to merge the imports
from ...utils import OptionalDependencyNotAvailable, _LazyModule, is_torch_available


_A						=     {"""configuration_focalnet""": ["""FOCALNET_PRETRAINED_CONFIG_ARCHIVE_MAP""", """FocalNetConfig"""]}


try:
  if not is_torch_available():
    raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
  pass
else:
  _A						=     [
      """FOCALNET_PRETRAINED_MODEL_ARCHIVE_LIST""",
      """FocalNetForImageClassification""",
      """FocalNetForMaskedImageModeling""",
      """FocalNetBackbone""",
      """FocalNetModel""",
      """FocalNetPreTrainedModel""",
  ]

if TYPE_CHECKING:
  from .configuration_focalnet import FOCALNET_PRETRAINED_CONFIG_ARCHIVE_MAP, FocalNetConfig

  try:
    if not is_torch_available():
      raise OptionalDependencyNotAvailable()
  except OptionalDependencyNotAvailable:
    pass
  else:
    from .modeling_focalnet import (
        FOCALNET_PRETRAINED_MODEL_ARCHIVE_LIST,
        FocalNetBackbone,
        FocalNetForImageClassification,
        FocalNetForMaskedImageModeling,
        FocalNetModel,
        FocalNetPreTrainedModel,
    )

else:
  import sys

  _A						=     _LazyModule(__name__, globals()["""__file__"""], _import_structure, module_spec=__spec__)







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


lowerCamelCase_    :			Any    =	logging.get_logger(__name__)

lowerCamelCase_    :			Dict    =	{
    """facebook/dpr-ctx_encoder-single-nq-base""": (
        """https://huggingface.co/facebook/dpr-ctx_encoder-single-nq-base/resolve/main/config.json"""
    ),
    """facebook/dpr-question_encoder-single-nq-base""": (
        """https://huggingface.co/facebook/dpr-question_encoder-single-nq-base/resolve/main/config.json"""
    ),
    """facebook/dpr-reader-single-nq-base""": (
        """https://huggingface.co/facebook/dpr-reader-single-nq-base/resolve/main/config.json"""
    ),
    """facebook/dpr-ctx_encoder-multiset-base""": (
        """https://huggingface.co/facebook/dpr-ctx_encoder-multiset-base/resolve/main/config.json"""
    ),
    """facebook/dpr-question_encoder-multiset-base""": (
        """https://huggingface.co/facebook/dpr-question_encoder-multiset-base/resolve/main/config.json"""
    ),
    """facebook/dpr-reader-multiset-base""": (
        """https://huggingface.co/facebook/dpr-reader-multiset-base/resolve/main/config.json"""
    ),
}

class 							_UpperCamelCase					(       _A	):






			'''simple docstring'''

			__UpperCamelCase   :    Any          =			"""dpr"""

			def __init__(							self			:							str    ,						snake_case_			:							Any=3_0522    ,						snake_case_			:							List[str]=768    ,						snake_case_			:							List[str]=12    ,						snake_case_			:							Union[str, Any]=12    ,						snake_case_			:							Tuple=3072    ,						snake_case_			:							Any="gelu"    ,						snake_case_			:							Optional[Any]=0.1    ,						snake_case_			:							str=0.1    ,						snake_case_			:							Dict=512    ,						snake_case_			:							int=2    ,						snake_case_			:							Union[str, Any]=0.02    ,						snake_case_			:							str=1e-12    ,						snake_case_			:							List[str]=0    ,						snake_case_			:							Any="absolute"    ,						snake_case_			:							int = 0    ,						**snake_case_			:							int    ,						):
							super().__init__(pad_token_id=snake_case_    ,						**snake_case_   )

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






