



'''simple docstring'''

from typing import TYPE_CHECKING

from ...utils import OptionalDependencyNotAvailable, _LazyModule, is_torch_available


a							   =				{
    'configuration_megatron_bert': ['MEGATRON_BERT_PRETRAINED_CONFIG_ARCHIVE_MAP', 'MegatronBertConfig'],
}

try:
	if not is_torch_available():
		raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
	pass
else:
	a							   =				[
	    'MEGATRON_BERT_PRETRAINED_MODEL_ARCHIVE_LIST',
	    'MegatronBertForCausalLM',
	    'MegatronBertForMaskedLM',
	    'MegatronBertForMultipleChoice',
	    'MegatronBertForNextSentencePrediction',
	    'MegatronBertForPreTraining',
	    'MegatronBertForQuestionAnswering',
	    'MegatronBertForSequenceClassification',
	    'MegatronBertForTokenClassification',
	    'MegatronBertModel',
	    'MegatronBertPreTrainedModel',
	]

if TYPE_CHECKING:
	from .configuration_megatron_bert import MEGATRON_BERT_PRETRAINED_CONFIG_ARCHIVE_MAP, MegatronBertConfig

	try:
		if not is_torch_available():
			raise OptionalDependencyNotAvailable()
	except OptionalDependencyNotAvailable:
		pass
	else:
		from .modeling_megatron_bert import (
		    MEGATRON_BERT_PRETRAINED_MODEL_ARCHIVE_LIST,
		    MegatronBertForCausalLM,
		    MegatronBertForMaskedLM,
		    MegatronBertForMultipleChoice,
		    MegatronBertForNextSentencePrediction,
		    MegatronBertForPreTraining,
		    MegatronBertForQuestionAnswering,
		    MegatronBertForSequenceClassification,
		    MegatronBertForTokenClassification,
		    MegatronBertModel,
		    MegatronBertPreTrainedModel,
		)

else:
	import sys

	a							   =				_LazyModule(__name__, globals()['__file__'], _import_structure, module_spec=__spec__)










"""simple docstring"""






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 lowerCAmelCase__      (	lowercase		):






			'''simple docstring'''



			lowerCamelCase__ =     """dpr"""
			def __init__(    self    , lowercase=30522    , lowercase=768    , lowercase=12    , lowercase=12    , lowercase=3072    , lowercase="gelu"    , lowercase=0.1    , lowercase=0.1    , lowercase=512    , lowercase=2    , lowercase=0.02    , lowercase=1E-12    , lowercase=0    , lowercase="absolute"    , lowercase = 0    , **lowercase    , ):
							super().__init__(pad_token_id=lowercase    , **lowercase    )

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