

from collections import OrderedDict
from typing import Mapping

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


lowerCAmelCase_			      =      logging.get_logger(__name__)

lowerCAmelCase_			      =      {
    '''facebook/data2vec-text-base''': '''https://huggingface.co/data2vec/resolve/main/config.json''',
}





class       snake_case_  (						__A   ):







			'''simple docstring'''

			SCREAMING_SNAKE_CASE	:  Tuple		     =							"data2vec-text"







			def __init__(	self					:							Dict				,  _UpperCamelCase					:							int=3_0_5_2_2				,  _UpperCamelCase					:							Dict=7_6_8				,  _UpperCamelCase					:							Tuple=1_2				,  _UpperCamelCase					:							List[Any]=1_2				,  _UpperCamelCase					:							Tuple=3_0_7_2				,  _UpperCamelCase					:							Union[str, Any]="gelu"				,  _UpperCamelCase					:							Optional[int]=0.1				,  _UpperCamelCase					:							List[Any]=0.1				,  _UpperCamelCase					:							Any=5_1_2				,  _UpperCamelCase					:							str=2				,  _UpperCamelCase					:							List[str]=0.02				,  _UpperCamelCase					:							List[str]=1e-12				,  _UpperCamelCase					:							Any=1				,  _UpperCamelCase					:							Union[str, Any]=0				,  _UpperCamelCase					:							Optional[Any]=2				,  _UpperCamelCase					:							Optional[Any]="absolute"				,  _UpperCamelCase					:							int=True				,  _UpperCamelCase					:							int=None				,  **_UpperCamelCase					:							Union[str, Any]				,  ) ->Dict:
									super().__init__(pad_token_id=_UpperCamelCase				,  bos_token_id=_UpperCamelCase				,  eos_token_id=_UpperCamelCase				,  **_UpperCamelCase				)

									snake_case_  =      vocab_size
									snake_case_  =      hidden_size
									snake_case_  =      num_hidden_layers
									snake_case_  =      num_attention_heads
									snake_case_  =      hidden_act
									snake_case_  =      intermediate_size
									snake_case_  =      hidden_dropout_prob
									snake_case_  =      attention_probs_dropout_prob
									snake_case_  =      max_position_embeddings
									snake_case_  =      type_vocab_size
									snake_case_  =      initializer_range
									snake_case_  =      layer_norm_eps
									snake_case_  =      position_embedding_type
									snake_case_  =      use_cache
									snake_case_  =      classifier_dropout






class       snake_case_  (						__A   ):







			'''simple docstring'''

			@property
			def 							snake_case__(	self					:							List[Any]				) ->Mapping[str, Mapping[int, str]]:
									if self.task == "multiple-choice":
															snake_case_  =      {0: '''batch''', 1: '''choice''', 2: '''sequence'''}
									else:
															snake_case_  =      {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


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