



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  __lowerCAmelCase     (	lowerCAmelCase__   ):
 lowerCAmelCase__       					=  """realm"""




 def __init__(						self	,				__UpperCAmelCase=30522	,				__UpperCAmelCase=768	,				__UpperCAmelCase=128	,				__UpperCAmelCase=12	,				__UpperCAmelCase=12	,				__UpperCAmelCase=8	,				__UpperCAmelCase=3072	,				__UpperCAmelCase="gelu_new"	,				__UpperCAmelCase=0.1	,				__UpperCAmelCase=0.1	,				__UpperCAmelCase=512	,				__UpperCAmelCase=2	,				__UpperCAmelCase=0.02	,				__UpperCAmelCase=1E-1_2	,				__UpperCAmelCase=256	,				__UpperCAmelCase=10	,				__UpperCAmelCase=1E-3	,				__UpperCAmelCase=5	,				__UpperCAmelCase=320	,				__UpperCAmelCase=13353718	,				__UpperCAmelCase=5000	,				__UpperCAmelCase=1	,				__UpperCAmelCase=0	,				__UpperCAmelCase=2	,				**__UpperCAmelCase	,				):



    '''simple docstring'''
    super().__init__(pad_token_id=__UpperCAmelCase	,				bos_token_id=__UpperCAmelCase	,				eos_token_id=__UpperCAmelCase	,				**__UpperCAmelCase				)

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

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

    # Retrieval config
    __lowerCamelCase													=    num_block_records
    __lowerCamelCase													=    searcher_beam_size











def 		a__			(		_UpperCamelCase			: str ,_UpperCamelCase			: str = " "							):
   __lowerCamelCase													=    []

   __lowerCamelCase													=    0
   for index, char in enumerate(_UpperCamelCase							):
      if char == separator:
         split_words.append(string[last_index:index]							)
         __lowerCamelCase													=    index + 1
      elif index + 1 == len(_UpperCamelCase							):
         split_words.append(string[last_index : index + 1]							)
   return split_words


if __name__ == "__main__":
  from doctest import testmod

  testmod()






