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


_lowerCamelCase       :				int       =			logging.get_logger(__name__)

_lowerCamelCase       :				str       =			{
    '''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    SCREAMING_SNAKE_CASE__     (	UpperCAmelCase					):





	'''simple docstring'''



	_UpperCAmelCase       :		Tuple       =					"realm"



	def __init__(  self	:    int			,  lowercase	:    Tuple=30_522			,  lowercase	:    Any=768			,  lowercase	:    str=128			,  lowercase	:    Dict=12			,  lowercase	:    Union[str, Any]=12			,  lowercase	:    int=8			,  lowercase	:    Union[str, Any]=3_072			,  lowercase	:    List[str]="gelu_new"			,  lowercase	:    int=0.1			,  lowercase	:    List[Any]=0.1			,  lowercase	:    Optional[int]=512			,  lowercase	:    Optional[int]=2			,  lowercase	:    Union[str, Any]=0.02			,  lowercase	:    Any=1E-12			,  lowercase	:    Optional[Any]=256			,  lowercase	:    Any=10			,  lowercase	:    List[Any]=1E-3			,  lowercase	:    Optional[int]=5			,  lowercase	:    List[str]=320			,  lowercase	:    List[Any]=13_353_718			,  lowercase	:    List[str]=5_000			,  lowercase	:    int=1			,  lowercase	:    Optional[int]=0			,  lowercase	:    List[str]=2			,  **lowercase	:    Union[str, Any]			,  ):


				'''simple docstring'''


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

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

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

				# Retrieval config
				_snake_case		=			num_block_records
				_snake_case		=			searcher_beam_size

import numpy as np






def        a_		(       __lowercase   :	np.array ) ->  np.array:
			return 1 / (1 + np.exp(-vector ))


if __name__ == "__main__":
			import doctest

			doctest.testmod()