
'''simple docstring'''
from collections import OrderedDict
from typing import Mapping

from packaging import version

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


A__   :		str 		=logging.get_logger(__name__)

A__   :		Union[str, Any] 		={
    'facebook/deit-base-distilled-patch16-224': (
        'https://huggingface.co/facebook/deit-base-patch16-224/resolve/main/config.json'
    ),
    # See all DeiT models at https://huggingface.co/models?filter=deit
}







class  __A				( _SCREAMING_SNAKE_CASE			):
 lowerCamelCase				       ='''deit'''
 def __init__(   self			:    Optional[int]				,   lowerCamelCase			:    str=7_68				,   lowerCamelCase			:    int=12				,   lowerCamelCase			:    Tuple=12				,   lowerCamelCase			:    Optional[int]=30_72				,   lowerCamelCase			:    Union[str, Any]="gelu"				,   lowerCamelCase			:    int=0.0				,   lowerCamelCase			:    Dict=0.0				,   lowerCamelCase			:    int=0.02				,   lowerCamelCase			:    Dict=1e-1_2				,   lowerCamelCase			:    str=2_24				,   lowerCamelCase			:    Dict=16				,   lowerCamelCase			:    List[str]=3				,   lowerCamelCase			:    List[str]=True				,   lowerCamelCase			:    Tuple=16				,   **lowerCamelCase			:    Union[str, Any]				,   ):



   """simple docstring"""





   super().__init__(**lowerCamelCase       )

   __A		:     str												=		hidden_size
   __A		:     List[Any]												=		num_hidden_layers
   __A		:     Union[str, Any]												=		num_attention_heads
   __A		:     int												=		intermediate_size
   __A		:     Union[str, Any]												=		hidden_act
   __A		:     str												=		hidden_dropout_prob
   __A		:     Dict												=		attention_probs_dropout_prob
   __A		:     int												=		initializer_range
   __A		:     List[Any]												=		layer_norm_eps
   __A		:     Optional[Any]												=		image_size
   __A		:     Dict												=		patch_size
   __A		:     int												=		num_channels
   __A		:     int												=		qkv_bias
   __A		:     Union[str, Any]												=		encoder_stride







class  __A				( _SCREAMING_SNAKE_CASE			):
 lowerCamelCase				       =version.parse('''1.11'''			)
 @property
 def 		lowercase_(   self			:    List[str]       ):



   """simple docstring"""





   return OrderedDict(
       [
           ("""pixel_values""", {0: """batch""", 1: """num_channels""", 2: """height""", 3: """width"""}),
       ]       )






 @property
 def 		lowercase_(   self			:    Optional[Any]       ):



   """simple docstring"""





   return 1e-4





'''simple docstring'''
from ...configuration_utils import PretrainedConfig
from ...utils import logging


A__   :		int 		=logging.get_logger(__name__)

A__   :		Union[str, Any] 		={
    '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				( _SCREAMING_SNAKE_CASE			):
 lowerCamelCase				       ='''dpr'''
 def __init__(   self			:    Optional[int]				,   lowerCamelCase			:    Tuple=3_05_22				,   lowerCamelCase			:    List[str]=7_68				,   lowerCamelCase			:    Union[str, Any]=12				,   lowerCamelCase			:    Tuple=12				,   lowerCamelCase			:    Dict=30_72				,   lowerCamelCase			:    List[Any]="gelu"				,   lowerCamelCase			:    List[Any]=0.1				,   lowerCamelCase			:    Union[str, Any]=0.1				,   lowerCamelCase			:    Optional[Any]=5_12				,   lowerCamelCase			:    List[Any]=2				,   lowerCamelCase			:    int=0.02				,   lowerCamelCase			:    Union[str, Any]=1e-1_2				,   lowerCamelCase			:    int=0				,   lowerCamelCase			:    List[str]="absolute"				,   lowerCamelCase			:    int = 0				,   **lowerCamelCase			:    List[Any]				,   ):



   """simple docstring"""





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

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



