

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


A__							=				logging.get_logger(__name__)

A__							=				{
    '''uw-madison/nystromformer-512''': '''https://huggingface.co/uw-madison/nystromformer-512/resolve/main/config.json''',
    # See all Nystromformer models at https://huggingface.co/models?filter=nystromformer
}

class 					__UpperCamelCase					(       _lowercase      ):
	_lowercase	: Optional[int]												=	"nystromformer"







	def __init__( self:			List[Any]	,			__UpperCamelCase:			Union[str, Any]=3_00_00	,			__UpperCamelCase:			List[str]=7_68	,			__UpperCamelCase:			Tuple=12	,			__UpperCamelCase:			str=12	,			__UpperCamelCase:			Tuple=30_72	,			__UpperCamelCase:			Union[str, Any]="gelu_new"	,			__UpperCamelCase:			str=0.1	,			__UpperCamelCase:			Optional[int]=0.1	,			__UpperCamelCase:			Optional[int]=5_10	,			__UpperCamelCase:			int=2	,			__UpperCamelCase:			List[Any]=64	,			__UpperCamelCase:			Optional[Any]=64	,			__UpperCamelCase:			List[Any]=65	,			__UpperCamelCase:			Any=False	,			__UpperCamelCase:			List[str]=0.02	,			__UpperCamelCase:			Union[str, Any]=1E-5	,			__UpperCamelCase:			Optional[Any]=1	,			__UpperCamelCase:			Any=0	,			__UpperCamelCase:			Union[str, Any]=2	,			**__UpperCamelCase:			List[Any]	,			):

						'''simple docstring'''





						__magic_name__				=     vocab_size
						__magic_name__				=     max_position_embeddings
						__magic_name__				=     hidden_size
						__magic_name__				=     num_hidden_layers
						__magic_name__				=     num_attention_heads
						__magic_name__				=     intermediate_size
						__magic_name__				=     hidden_act
						__magic_name__				=     hidden_dropout_prob
						__magic_name__				=     attention_probs_dropout_prob
						__magic_name__				=     initializer_range
						__magic_name__				=     type_vocab_size
						__magic_name__				=     segment_means_seq_len
						__magic_name__				=     num_landmarks
						__magic_name__				=     conv_kernel_size
						__magic_name__				=     inv_coeff_init_option
						__magic_name__				=     layer_norm_eps
						super().__init__(pad_token_id=UpperCamelCase__	,			bos_token_id=UpperCamelCase__	,			eos_token_id=UpperCamelCase__	,			**UpperCamelCase__   )












'''simple docstring'''







from typing import TYPE_CHECKING

from ...utils import OptionalDependencyNotAvailable, _LazyModule, is_tokenizers_available, is_torch_available


_A      :     Optional[Any]       	={
    '''configuration_realm''': ['''REALM_PRETRAINED_CONFIG_ARCHIVE_MAP''', '''RealmConfig'''],
    '''tokenization_realm''': ['''RealmTokenizer'''],
}

try:
			if not is_tokenizers_available():
						raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
			pass
else:
			_A      :     str       	=['''RealmTokenizerFast''']

try:
			if not is_torch_available():
						raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
			pass
else:
			_A      :     List[Any]       	=[
			    '''REALM_PRETRAINED_MODEL_ARCHIVE_LIST''',
			    '''RealmEmbedder''',
			    '''RealmForOpenQA''',
			    '''RealmKnowledgeAugEncoder''',
			    '''RealmPreTrainedModel''',
			    '''RealmReader''',
			    '''RealmScorer''',
			    '''load_tf_weights_in_realm''',
			]
			_A      :     Union[str, Any]       	=['''RealmRetriever''']


if TYPE_CHECKING:
			from .configuration_realm import REALM_PRETRAINED_CONFIG_ARCHIVE_MAP, RealmConfig
			from .tokenization_realm import RealmTokenizer

			try:
						if not is_tokenizers_available():
									raise OptionalDependencyNotAvailable()
			except OptionalDependencyNotAvailable:
						pass
			else:
						from .tokenization_realm import RealmTokenizerFast

			try:
						if not is_torch_available():
									raise OptionalDependencyNotAvailable()
			except OptionalDependencyNotAvailable:
						pass
			else:
						from .modeling_realm import (
						    REALM_PRETRAINED_MODEL_ARCHIVE_LIST,
						    RealmEmbedder,
						    RealmForOpenQA,
						    RealmKnowledgeAugEncoder,
						    RealmPreTrainedModel,
						    RealmReader,
						    RealmScorer,
						    load_tf_weights_in_realm,
						)
						from .retrieval_realm import RealmRetriever


else:
			import sys

			_A      :     int       	=_LazyModule(__name__, globals()['''__file__'''], _import_structure, module_spec=__spec__)

