



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


a     :    List[Any]      						=					logging.get_logger(__name__)

a     :    Dict      						=					{
    """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     UpperCamelCase_				(							__magic_name__    ):
	lowercase    =				'realm'





	def __init__(						self	,	A=30522	,	A=768	,	A=128	,	A=12	,	A=12	,	A=8	,	A=3072	,	A="gelu_new"	,	A=0.1	,	A=0.1	,	A=512	,	A=2	,	A=0.0_2	,	A=1e-12	,	A=256	,	A=10	,	A=1e-3	,	A=5	,	A=320	,	A=13353718	,	A=5000	,	A=1	,	A=0	,	A=2	,	**A	,	)    ->    Tuple:
								super().__init__(pad_token_id=A	,	bos_token_id=A	,	eos_token_id=A	,	**A					)

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

								# Reader config
								UpperCAmelCase  :	Union[str, Any]							  =	span_hidden_size
								UpperCAmelCase  :	List[Any]							  =	max_span_width
								UpperCAmelCase  :	str							  =	reader_layer_norm_eps
								UpperCAmelCase  :	Tuple							  =	reader_beam_size
								UpperCAmelCase  :	Any							  =	reader_seq_len

								# Retrieval config
								UpperCAmelCase  :	Tuple							  =	num_block_records
								UpperCAmelCase  :	Dict							  =	searcher_beam_size






'''simple docstring'''




from ...utils import is_torch_available, is_transformers_available


if is_transformers_available() and is_torch_available():
							from .pipeline_vq_diffusion import LearnedClassifierFreeSamplingEmbeddings, VQDiffusionPipeline

