






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


__A					=	logging.get_logger(__name__)

__A					=	{
    "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			(     UpperCamelCase				):
    """simple docstring"""

    lowerCamelCase	:							Optional[Any]				= 'realm'



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

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

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

           # Retrieval config
           __UpperCAmelCase     				=num_block_records
           __UpperCAmelCase     				=searcher_beam_size









'''simple docstring'''



def        UpperCAmelCase (    A	:					int					):
							if not isinstance(A       ,		A					):
														SCREAMING_SNAKE_CASE       :   List[str]         =      F"""Input value of [number={number}] must be an integer"""
														raise TypeError(A					)
							if number < 0:
														return False
							SCREAMING_SNAKE_CASE       :   List[str]         =      number * number
							while number > 0:
														if number % 10 != number_square % 10:
																					return False
														number //= 10
														number_square //= 10
							return True


if __name__ == "__main__":
							import doctest

							doctest.testmod()




