






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


SCREAMING_SNAKE_CASE__		:							Dict 				=				logging.get_logger(__name__)

SCREAMING_SNAKE_CASE__		:							Tuple 				=				{
    """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_  (		__lowerCamelCase		):
     __lowerCamelCase      				=  'realm'




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

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

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

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








import copy
from dataclasses import dataclass
from pathlib import Path
from typing import Dict, Optional, Union




@dataclass
class   __lowercase						:
	_A       =   None
	_A       =   False
	_A       =   False
	_A       =   False
	_A       =   None
	_A       =   None
	_A       =   False
	_A       =   False
	_A       =   False
	_A       =   True
	_A       =   None
	_A       =   1
	_A       =   None
	_A       =   False
	_A       =   None
	_A       =   None






	def       _a(self				: str    ) ->			"DownloadConfig":
							return self.__class__(**{k: copy.deepcopy(snake_case    ) for k, v in self.__dict__.items()}    )




