





'''simple docstring'''




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


_A:					int							=				logging.get_logger(__name__)

_A:					Optional[Any]							=				{
    """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							(		_UpperCAmelCase							):
    _A :			List[Any]						   =       """realm"""



    def __init__(  self     ,			__A=30_522     ,			__A=768     ,			__A=128     ,			__A=12     ,			__A=12     ,			__A=8     ,			__A=3_072     ,			__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=13_353_718     ,			__A=5_000     ,			__A=1     ,			__A=0     ,			__A=2     ,			**__A     ,			):
     super().__init__(pad_token_id=lowercase__     ,			bos_token_id=lowercase__     ,			eos_token_id=lowercase__     ,			**lowercase__					)

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

     # Reader config
     __UpperCAmelCase     :   List[str]					=   span_hidden_size
     __UpperCAmelCase     :   int					=   max_span_width
     __UpperCAmelCase     :   Dict					=   reader_layer_norm_eps
     __UpperCAmelCase     :   List[str]					=   reader_beam_size
     __UpperCAmelCase     :   str					=   reader_seq_len

     # Retrieval config
     __UpperCAmelCase     :   Optional[int]					=   num_block_records
     __UpperCAmelCase     :   str					=   searcher_beam_size












'''simple docstring'''




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


_A:					Tuple							=				logging.get_logger(__name__)






class UpperCAmelCase							(		UpperCAmelCase_							):
    _A :			List[Any]						   =       """timm_backbone"""



    def __init__(  self     ,			__A=None     ,			__A=3     ,			__A=True     ,			__A=True     ,			__A=None     ,			**__A     ,			):
     super().__init__(**__A					)
     __UpperCAmelCase					=   backbone
     __UpperCAmelCase					=   num_channels
     __UpperCAmelCase					=   features_only
     __UpperCAmelCase					=   use_pretrained_backbone
     __UpperCAmelCase					=   True
     __UpperCAmelCase					=   out_indices if out_indices is not None else (-1,)





