



from typing import TYPE_CHECKING

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


lowercase_						=       {
    """configuration_deberta""": ["""DEBERTA_PRETRAINED_CONFIG_ARCHIVE_MAP""", """DebertaConfig""", """DebertaOnnxConfig"""],
    """tokenization_deberta""": ["""DebertaTokenizer"""],
}

try:
							if not is_tokenizers_available():
														raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
							pass
else:
							lowercase_						=       ["""DebertaTokenizerFast"""]

try:
							if not is_torch_available():
														raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
							pass
else:
							lowercase_						=       [
							    """DEBERTA_PRETRAINED_MODEL_ARCHIVE_LIST""",
							    """DebertaForMaskedLM""",
							    """DebertaForQuestionAnswering""",
							    """DebertaForSequenceClassification""",
							    """DebertaForTokenClassification""",
							    """DebertaModel""",
							    """DebertaPreTrainedModel""",
							]

try:
							if not is_tf_available():
														raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
							pass
else:
							lowercase_						=       [
							    """TF_DEBERTA_PRETRAINED_MODEL_ARCHIVE_LIST""",
							    """TFDebertaForMaskedLM""",
							    """TFDebertaForQuestionAnswering""",
							    """TFDebertaForSequenceClassification""",
							    """TFDebertaForTokenClassification""",
							    """TFDebertaModel""",
							    """TFDebertaPreTrainedModel""",
							]


if TYPE_CHECKING:
							from .configuration_deberta import DEBERTA_PRETRAINED_CONFIG_ARCHIVE_MAP, DebertaConfig, DebertaOnnxConfig
							from .tokenization_deberta import DebertaTokenizer

							try:
														if not is_tokenizers_available():
																					raise OptionalDependencyNotAvailable()
							except OptionalDependencyNotAvailable:
														pass
							else:
														from .tokenization_deberta_fast import DebertaTokenizerFast

							try:
														if not is_torch_available():
																					raise OptionalDependencyNotAvailable()
							except OptionalDependencyNotAvailable:
														pass
							else:
														from .modeling_deberta import (
														    DEBERTA_PRETRAINED_MODEL_ARCHIVE_LIST,
														    DebertaForMaskedLM,
														    DebertaForQuestionAnswering,
														    DebertaForSequenceClassification,
														    DebertaForTokenClassification,
														    DebertaModel,
														    DebertaPreTrainedModel,
														)

							try:
														if not is_tf_available():
																					raise OptionalDependencyNotAvailable()
							except OptionalDependencyNotAvailable:
														pass
							else:
														from .modeling_tf_deberta import (
														    TF_DEBERTA_PRETRAINED_MODEL_ARCHIVE_LIST,
														    TFDebertaForMaskedLM,
														    TFDebertaForQuestionAnswering,
														    TFDebertaForSequenceClassification,
														    TFDebertaForTokenClassification,
														    TFDebertaModel,
														    TFDebertaPreTrainedModel,
														)


else:
							import sys

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









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


lowercase_						=       logging.get_logger(__name__)

lowercase_						=       {
    """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 			_snake_case     (   lowercase__):
				UpperCamelCase__			:   str       						="""dpr"""




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

							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




