"""simple docstring"""






from typing import TYPE_CHECKING

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


__lowerCAmelCase    :       List[str]					     ={"""configuration_xlnet""": ["""XLNET_PRETRAINED_CONFIG_ARCHIVE_MAP""", """XLNetConfig"""]}

try:
       if not is_sentencepiece_available():
              raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
       pass
else:
       __lowerCAmelCase    :       Optional[int]					     =["""XLNetTokenizer"""]

try:
       if not is_tokenizers_available():
              raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
       pass
else:
       __lowerCAmelCase    :       str					     =["""XLNetTokenizerFast"""]

try:
       if not is_torch_available():
              raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
       pass
else:
       __lowerCAmelCase    :       List[Any]					     =[
           """XLNET_PRETRAINED_MODEL_ARCHIVE_LIST""",
           """XLNetForMultipleChoice""",
           """XLNetForQuestionAnswering""",
           """XLNetForQuestionAnsweringSimple""",
           """XLNetForSequenceClassification""",
           """XLNetForTokenClassification""",
           """XLNetLMHeadModel""",
           """XLNetModel""",
           """XLNetPreTrainedModel""",
           """load_tf_weights_in_xlnet""",
       ]

try:
       if not is_tf_available():
              raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
       pass
else:
       __lowerCAmelCase    :       str					     =[
           """TF_XLNET_PRETRAINED_MODEL_ARCHIVE_LIST""",
           """TFXLNetForMultipleChoice""",
           """TFXLNetForQuestionAnsweringSimple""",
           """TFXLNetForSequenceClassification""",
           """TFXLNetForTokenClassification""",
           """TFXLNetLMHeadModel""",
           """TFXLNetMainLayer""",
           """TFXLNetModel""",
           """TFXLNetPreTrainedModel""",
       ]


if TYPE_CHECKING:
       from .configuration_xlnet import XLNET_PRETRAINED_CONFIG_ARCHIVE_MAP, XLNetConfig

       try:
              if not is_sentencepiece_available():
                     raise OptionalDependencyNotAvailable()
       except OptionalDependencyNotAvailable:
              pass
       else:
              from .tokenization_xlnet import XLNetTokenizer

       try:
              if not is_tokenizers_available():
                     raise OptionalDependencyNotAvailable()
       except OptionalDependencyNotAvailable:
              pass
       else:
              from .tokenization_xlnet_fast import XLNetTokenizerFast

       try:
              if not is_torch_available():
                     raise OptionalDependencyNotAvailable()
       except OptionalDependencyNotAvailable:
              pass
       else:
              from .modeling_xlnet import (
                  XLNET_PRETRAINED_MODEL_ARCHIVE_LIST,
                  XLNetForMultipleChoice,
                  XLNetForQuestionAnswering,
                  XLNetForQuestionAnsweringSimple,
                  XLNetForSequenceClassification,
                  XLNetForTokenClassification,
                  XLNetLMHeadModel,
                  XLNetModel,
                  XLNetPreTrainedModel,
                  load_tf_weights_in_xlnet,
              )

       try:
              if not is_tf_available():
                     raise OptionalDependencyNotAvailable()
       except OptionalDependencyNotAvailable:
              pass
       else:
              from .modeling_tf_xlnet import (
                  TF_XLNET_PRETRAINED_MODEL_ARCHIVE_LIST,
                  TFXLNetForMultipleChoice,
                  TFXLNetForQuestionAnsweringSimple,
                  TFXLNetForSequenceClassification,
                  TFXLNetForTokenClassification,
                  TFXLNetLMHeadModel,
                  TFXLNetMainLayer,
                  TFXLNetModel,
                  TFXLNetPreTrainedModel,
              )

else:
       import sys

       __lowerCAmelCase    :       str					     =_LazyModule(__name__, globals()["""__file__"""], _import_structure, module_spec=__spec__)




"""simple docstring"""






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


__lowerCAmelCase    :       List[str]					     =logging.get_logger(__name__)

__lowerCAmelCase    :       str					     ={
    """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  _A						(       lowerCAmelCase	):
      snake_case__			:   Tuple							  =	'dpr'

      def __init__(						self		,       __lowerCAmelCase=3_0522		,       __lowerCAmelCase=768		,       __lowerCAmelCase=12		,       __lowerCAmelCase=12		,       __lowerCAmelCase=3072		,       __lowerCAmelCase="gelu"		,       __lowerCAmelCase=0.1		,       __lowerCAmelCase=0.1		,       __lowerCAmelCase=512		,       __lowerCAmelCase=2		,       __lowerCAmelCase=0.0_2		,       __lowerCAmelCase=1E-12		,       __lowerCAmelCase=0		,       __lowerCAmelCase="absolute"		,       __lowerCAmelCase = 0		,       **__lowerCAmelCase		,       ):







            """simple docstring"""



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

            lowercase														=	vocab_size
            lowercase														=	hidden_size
            lowercase														=	num_hidden_layers
            lowercase														=	num_attention_heads
            lowercase														=	hidden_act
            lowercase														=	intermediate_size
            lowercase														=	hidden_dropout_prob
            lowercase														=	attention_probs_dropout_prob
            lowercase														=	max_position_embeddings
            lowercase														=	type_vocab_size
            lowercase														=	initializer_range
            lowercase														=	layer_norm_eps
            lowercase														=	projection_dim
            lowercase														=	position_embedding_type



