






'''simple docstring'''







from collections import OrderedDict
from typing import Mapping

from ...configuration_utils import PretrainedConfig
from ...onnx import OnnxConfig
from ...utils import logging


_A	:			Any         =logging.get_logger(__name__)

_A	:			Any         ={
    '''distilbert-base-uncased''': '''https://huggingface.co/distilbert-base-uncased/resolve/main/config.json''',
    '''distilbert-base-uncased-distilled-squad''': (
        '''https://huggingface.co/distilbert-base-uncased-distilled-squad/resolve/main/config.json'''
    ),
    '''distilbert-base-cased''': '''https://huggingface.co/distilbert-base-cased/resolve/main/config.json''',
    '''distilbert-base-cased-distilled-squad''': (
        '''https://huggingface.co/distilbert-base-cased-distilled-squad/resolve/main/config.json'''
    ),
    '''distilbert-base-german-cased''': '''https://huggingface.co/distilbert-base-german-cased/resolve/main/config.json''',
    '''distilbert-base-multilingual-cased''': (
        '''https://huggingface.co/distilbert-base-multilingual-cased/resolve/main/config.json'''
    ),
    '''distilbert-base-uncased-finetuned-sst-2-english''': (
        '''https://huggingface.co/distilbert-base-uncased-finetuned-sst-2-english/resolve/main/config.json'''
    ),
}

class _lowercase	(				_lowercase		):
							a				      =       """distilbert"""
							a				      =       {
							    """hidden_size""": """dim""",
							    """num_attention_heads""": """n_heads""",
							    """num_hidden_layers""": """n_layers""",
							}




							def __init__(							self:				Union[str, Any]			,							UpperCamelCase__:				Dict=30_522			,							UpperCamelCase__:				str=512			,							UpperCamelCase__:				Union[str, Any]=False			,							UpperCamelCase__:				Optional[int]=6			,							UpperCamelCase__:				Dict=12			,							UpperCamelCase__:				int=768			,							UpperCamelCase__:				Dict=4 * 768			,							UpperCamelCase__:				int=0.1			,							UpperCamelCase__:				str=0.1			,							UpperCamelCase__:				str="gelu"			,							UpperCamelCase__:				Tuple=0.02			,							UpperCamelCase__:				List[Any]=0.1			,							UpperCamelCase__:				Tuple=0.2			,							UpperCamelCase__:				Dict=0			,							**UpperCamelCase__:				List[str]			,							):
														lowerCamelCase__					:	str         =       vocab_size
														lowerCamelCase__					:	Optional[int]         =       max_position_embeddings
														lowerCamelCase__					:	Dict         =       sinusoidal_pos_embds
														lowerCamelCase__					:	Optional[int]         =       n_layers
														lowerCamelCase__					:	int         =       n_heads
														lowerCamelCase__					:	Tuple         =       dim
														lowerCamelCase__					:	List[str]         =       hidden_dim
														lowerCamelCase__					:	Union[str, Any]         =       dropout
														lowerCamelCase__					:	Optional[int]         =       attention_dropout
														lowerCamelCase__					:	List[str]         =       activation
														lowerCamelCase__					:	Dict         =       initializer_range
														lowerCamelCase__					:	Optional[int]         =       qa_dropout
														lowerCamelCase__					:	Any         =       seq_classif_dropout
														super().__init__(**UpperCamelCase__			,							pad_token_id=UpperCamelCase__     )



class _lowercase	(				_lowercase		):




							@property
							def 		lowerCamelCase_				(							self:				Optional[int]     ):
														if self.task == "multiple-choice":
																					lowerCamelCase__					:	Dict         =       {0: """batch""", 1: """choice""", 2: """sequence"""}
														else:
																					lowerCamelCase__					:	Dict         =       {0: """batch""", 1: """sequence"""}
														return OrderedDict(
														    [
														        ("""input_ids""", dynamic_axis),
														        ("""attention_mask""", dynamic_axis),
														    ]     )


"""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



