


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


_snake_case					:		str      =    logging.get_logger(__name__)

_snake_case					:		Optional[int]      =    {
    "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     a		(_lowerCAmelCase				):




							"""simple docstring"""


							__UpperCAmelCase   :							List[Any]					  =  "realm"

							def __init__(							self	:  Any   ,     lowerCamelCase	:  int=30522   ,     lowerCamelCase	:  List[Any]=768   ,     lowerCamelCase	:  Tuple=128   ,     lowerCamelCase	:  List[str]=12   ,     lowerCamelCase	:  Optional[Any]=12   ,     lowerCamelCase	:  str=8   ,     lowerCamelCase	:  Any=3072   ,     lowerCamelCase	:  List[str]="gelu_new"   ,     lowerCamelCase	:  Dict=0.1   ,     lowerCamelCase	:  int=0.1   ,     lowerCamelCase	:  Union[str, Any]=512   ,     lowerCamelCase	:  str=2   ,     lowerCamelCase	:  Dict=0.02   ,     lowerCamelCase	:  Any=1E-12   ,     lowerCamelCase	:  int=256   ,     lowerCamelCase	:  Tuple=10   ,     lowerCamelCase	:  List[Any]=1E-3   ,     lowerCamelCase	:  str=5   ,     lowerCamelCase	:  List[str]=320   ,     lowerCamelCase	:  Dict=13353718   ,     lowerCamelCase	:  Optional[Any]=5000   ,     lowerCamelCase	:  Any=1   ,     lowerCamelCase	:  List[str]=0   ,     lowerCamelCase	:  Dict=2   ,     **lowerCamelCase	:  Dict   ,     )     ->   Optional[Any]:
														super().__init__(pad_token_id=lowerCamelCase   ,     bos_token_id=lowerCamelCase   ,     eos_token_id=lowerCamelCase   ,     **lowerCamelCase    )

														# Common config
														__snake_case		:      Dict										=       vocab_size
														__snake_case		:      Union[str, Any]										=       max_position_embeddings
														__snake_case		:      Optional[int]										=       hidden_size
														__snake_case		:      Dict										=       retriever_proj_size
														__snake_case		:      Optional[Any]										=       num_hidden_layers
														__snake_case		:      int										=       num_attention_heads
														__snake_case		:      Optional[Any]										=       num_candidates
														__snake_case		:      Any										=       intermediate_size
														__snake_case		:      Optional[int]										=       hidden_act
														__snake_case		:      Dict										=       hidden_dropout_prob
														__snake_case		:      str										=       attention_probs_dropout_prob
														__snake_case		:      Dict										=       initializer_range
														__snake_case		:      Optional[int]										=       type_vocab_size
														__snake_case		:      List[str]										=       layer_norm_eps

														# Reader config
														__snake_case		:      int										=       span_hidden_size
														__snake_case		:      str										=       max_span_width
														__snake_case		:      Tuple										=       reader_layer_norm_eps
														__snake_case		:      Optional[int]										=       reader_beam_size
														__snake_case		:      Dict										=       reader_seq_len

														# Retrieval config
														__snake_case		:      List[Any]										=       num_block_records
														__snake_case		:      List[Any]										=       searcher_beam_size





import logging

from transformers.configuration_utils import PretrainedConfig


_snake_case					:		Optional[Any]      =    logging.getLogger(__name__)

class     a		(_lowerCAmelCase				):




							"""simple docstring"""


							__UpperCAmelCase   :							Tuple					  =  "masked_bert"

							def __init__(							self	:  Optional[int]   ,     lowerCamelCase	:  Any=30522   ,     lowerCamelCase	:  Tuple=768   ,     lowerCamelCase	:  str=12   ,     lowerCamelCase	:  Dict=12   ,     lowerCamelCase	:  List[str]=3072   ,     lowerCamelCase	:  List[str]="gelu"   ,     lowerCamelCase	:  Any=0.1   ,     lowerCamelCase	:  Any=0.1   ,     lowerCamelCase	:  List[Any]=512   ,     lowerCamelCase	:  int=2   ,     lowerCamelCase	:  str=0.02   ,     lowerCamelCase	:  List[str]=1E-12   ,     lowerCamelCase	:  Any=0   ,     lowerCamelCase	:  Dict="topK"   ,     lowerCamelCase	:  List[Any]="constant"   ,     lowerCamelCase	:  Dict=0.0   ,     **lowerCamelCase	:  List[Any]   ,     )     ->   Dict:
														super().__init__(pad_token_id=lowerCamelCase   ,     **lowerCamelCase    )

														__snake_case		:      Optional[Any]										=       vocab_size
														__snake_case		:      Optional[int]										=       hidden_size
														__snake_case		:      Tuple										=       num_hidden_layers
														__snake_case		:      Union[str, Any]										=       num_attention_heads
														__snake_case		:      Optional[Any]										=       hidden_act
														__snake_case		:      str										=       intermediate_size
														__snake_case		:      Tuple										=       hidden_dropout_prob
														__snake_case		:      Dict										=       attention_probs_dropout_prob
														__snake_case		:      List[str]										=       max_position_embeddings
														__snake_case		:      Union[str, Any]										=       type_vocab_size
														__snake_case		:      Any										=       initializer_range
														__snake_case		:      str										=       layer_norm_eps
														__snake_case		:      str										=       pruning_method
														__snake_case		:      int										=       mask_init
														__snake_case		:      Any										=       mask_scale

