




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


SCREAMING_SNAKE_CASE:     Optional[int]									= logging.get_logger(__name__)

SCREAMING_SNAKE_CASE:     List[Any]									= {
    'google/realm-cc-news-pretrained-embedder': (
        'https://huggingface.co/google/realm-cc-news-pretrained-embedder/resolve/main/config.json'
    ),
    'google/realm-cc-news-pretrained-encoder': (
        'https://huggingface.co/google/realm-cc-news-pretrained-encoder/resolve/main/config.json'
    ),
    'google/realm-cc-news-pretrained-scorer': (
        'https://huggingface.co/google/realm-cc-news-pretrained-scorer/resolve/main/config.json'
    ),
    'google/realm-cc-news-pretrained-openqa': (
        'https://huggingface.co/google/realm-cc-news-pretrained-openqa/aresolve/main/config.json'
    ),
    'google/realm-orqa-nq-openqa': 'https://huggingface.co/google/realm-orqa-nq-openqa/resolve/main/config.json',
    'google/realm-orqa-nq-reader': 'https://huggingface.co/google/realm-orqa-nq-reader/resolve/main/config.json',
    'google/realm-orqa-wq-openqa': 'https://huggingface.co/google/realm-orqa-wq-openqa/resolve/main/config.json',
    'google/realm-orqa-wq-reader': 'https://huggingface.co/google/realm-orqa-wq-reader/resolve/main/config.json',
    # See all REALM models at https://huggingface.co/models?filter=realm
}



class    lowercase_		(SCREAMING_SNAKE_CASE__ ):
						lowerCAmelCase__			      ="realm"



						def __init__(			self	:   List[Any]					,							snake_case__	:   List[Any]=3_05_22					,							snake_case__	:   Union[str, Any]=7_68					,							snake_case__	:   str=1_28					,							snake_case__	:   Any=12					,							snake_case__	:   List[str]=12					,							snake_case__	:   int=8					,							snake_case__	:   str=30_72					,							snake_case__	:   Dict="gelu_new"					,							snake_case__	:   Tuple=0.1					,							snake_case__	:   List[Any]=0.1					,							snake_case__	:   List[Any]=5_12					,							snake_case__	:   List[str]=2					,							snake_case__	:   str=0.02					,							snake_case__	:   int=1e-12					,							snake_case__	:   Optional[Any]=2_56					,							snake_case__	:   Optional[Any]=10					,							snake_case__	:   Optional[int]=1e-3					,							snake_case__	:   Optional[int]=5					,							snake_case__	:   List[str]=3_20					,							snake_case__	:   int=13_35_37_18					,							snake_case__	:   List[Any]=50_00					,							snake_case__	:   str=1					,							snake_case__	:   Optional[Any]=0					,							snake_case__	:   Tuple=2					,							**snake_case__	:   Union[str, Any]					,							):

								"""simple docstring"""

								super().__init__(pad_token_id=a_					,							bos_token_id=a_					,							eos_token_id=a_					,							**a_  )

								# Common config
								SCREAMING_SNAKE_CASE_					      =							vocab_size
								SCREAMING_SNAKE_CASE_					      =							max_position_embeddings
								SCREAMING_SNAKE_CASE_					      =							hidden_size
								SCREAMING_SNAKE_CASE_					      =							retriever_proj_size
								SCREAMING_SNAKE_CASE_					      =							num_hidden_layers
								SCREAMING_SNAKE_CASE_					      =							num_attention_heads
								SCREAMING_SNAKE_CASE_					      =							num_candidates
								SCREAMING_SNAKE_CASE_					      =							intermediate_size
								SCREAMING_SNAKE_CASE_					      =							hidden_act
								SCREAMING_SNAKE_CASE_					      =							hidden_dropout_prob
								SCREAMING_SNAKE_CASE_					      =							attention_probs_dropout_prob
								SCREAMING_SNAKE_CASE_					      =							initializer_range
								SCREAMING_SNAKE_CASE_					      =							type_vocab_size
								SCREAMING_SNAKE_CASE_					      =							layer_norm_eps

								# Reader config
								SCREAMING_SNAKE_CASE_					      =							span_hidden_size
								SCREAMING_SNAKE_CASE_					      =							max_span_width
								SCREAMING_SNAKE_CASE_					      =							reader_layer_norm_eps
								SCREAMING_SNAKE_CASE_					      =							reader_beam_size
								SCREAMING_SNAKE_CASE_					      =							reader_seq_len

								# Retrieval config
								SCREAMING_SNAKE_CASE_					      =							num_block_records
								SCREAMING_SNAKE_CASE_					      =							searcher_beam_size


'''simple docstring'''




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


_a					:			str							=    logging.get_logger(__name__)

_a					:			Dict							=    {
    'microsoft/cvt-13': 'https://huggingface.co/microsoft/cvt-13/resolve/main/config.json',
    # See all Cvt models at https://huggingface.co/models?filter=cvt
}



class 							lowercase_						(		a			):

  '''simple docstring'''





  __lowerCAmelCase       :			List[Any]     	= "cvt"
  def __init__(  self ,			a_=3 ,			a_=[7, 3, 3] ,			a_=[4, 2, 2] ,			a_=[2, 1, 1] ,			a_=[6_4, 1_9_2, 3_8_4] ,			a_=[1, 3, 6] ,			a_=[1, 2, 1_0] ,			a_=[4.0, 4.0, 4.0] ,			a_=[0.0, 0.0, 0.0] ,			a_=[0.0, 0.0, 0.0] ,			a_=[0.0, 0.0, 0.1] ,			a_=[True, True, True] ,			a_=[False, False, True] ,			a_=["dw_bn", "dw_bn", "dw_bn"] ,			a_=[3, 3, 3] ,			a_=[1, 1, 1] ,			a_=[2, 2, 2] ,			a_=[1, 1, 1] ,			a_=[1, 1, 1] ,			a_=0.02 ,			a_=1E-12 ,			**a_ ,			)				->					Union[str, Any]:


    """simple docstring"""
    super().__init__(**a_  )
    UpperCAmelCase    				=						num_channels
    UpperCAmelCase    				=						patch_sizes
    UpperCAmelCase    				=						patch_stride
    UpperCAmelCase    				=						patch_padding
    UpperCAmelCase    				=						embed_dim
    UpperCAmelCase    				=						num_heads
    UpperCAmelCase    				=						depth
    UpperCAmelCase    				=						mlp_ratio
    UpperCAmelCase    				=						attention_drop_rate
    UpperCAmelCase    				=						drop_rate
    UpperCAmelCase    				=						drop_path_rate
    UpperCAmelCase    				=						qkv_bias
    UpperCAmelCase    				=						cls_token
    UpperCAmelCase    				=						qkv_projection_method
    UpperCAmelCase    				=						kernel_qkv
    UpperCAmelCase    				=						padding_kv
    UpperCAmelCase    				=						stride_kv
    UpperCAmelCase    				=						padding_q
    UpperCAmelCase    				=						stride_q
    UpperCAmelCase    				=						initializer_range
    UpperCAmelCase    				=						layer_norm_eps


