





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					(					lowerCAmelCase				):

			'''simple docstring'''







			lowerCAmelCase_							  =		"""realm"""





			def __init__(					self ,						__lowerCAmelCase=3_0_5_2_2 ,						__lowerCAmelCase=7_6_8 ,						__lowerCAmelCase=1_2_8 ,						__lowerCAmelCase=1_2 ,						__lowerCAmelCase=1_2 ,						__lowerCAmelCase=8 ,						__lowerCAmelCase=3_0_7_2 ,						__lowerCAmelCase="gelu_new" ,						__lowerCAmelCase=0.1 ,						__lowerCAmelCase=0.1 ,						__lowerCAmelCase=5_1_2 ,						__lowerCAmelCase=2 ,						__lowerCAmelCase=0.02 ,						__lowerCAmelCase=1E-12 ,						__lowerCAmelCase=2_5_6 ,						__lowerCAmelCase=1_0 ,						__lowerCAmelCase=1E-3 ,						__lowerCAmelCase=5 ,						__lowerCAmelCase=3_2_0 ,						__lowerCAmelCase=1_3_3_5_3_7_1_8 ,						__lowerCAmelCase=5_0_0_0 ,						__lowerCAmelCase=1 ,						__lowerCAmelCase=0 ,						__lowerCAmelCase=2 ,						**__lowerCAmelCase ,						):



				'''simple docstring'''







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

				# 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










# This is the module that test_patching.py uses to test patch_submodule()

import os  # noqa: this is just for tests
import os as renamed_os  # noqa: this is just for tests
from os import path  # noqa: this is just for tests
from os import path as renamed_path  # noqa: this is just for tests
from os.path import join  # noqa: this is just for tests
from os.path import join as renamed_join  # noqa: this is just for tests


_a						=   open  # noqa: we just need to have a builtin inside this module to test it properly



