




'''simple docstring'''

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


a  :				Tuple									=  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 						a				(   _lowerCamelCase     ):
				snake_case_      =		"realm"


				def __init__(		self    :					int       ,				lowercase_    :					Optional[Any]=3_0522       ,				lowercase_    :					List[str]=768       ,				lowercase_    :					Any=128       ,				lowercase_    :					int=12       ,				lowercase_    :					int=12       ,				lowercase_    :					Tuple=8       ,				lowercase_    :					Optional[Any]=3072       ,				lowercase_    :					List[Any]="gelu_new"       ,				lowercase_    :					List[str]=0.1       ,				lowercase_    :					Any=0.1       ,				lowercase_    :					List[Any]=512       ,				lowercase_    :					Any=2       ,				lowercase_    :					Optional[Any]=0.02       ,				lowercase_    :					str=1e-12       ,				lowercase_    :					Tuple=256       ,				lowercase_    :					List[str]=10       ,				lowercase_    :					List[str]=1e-3       ,				lowercase_    :					int=5       ,				lowercase_    :					Tuple=320       ,				lowercase_    :					int=1335_3718       ,				lowercase_    :					Optional[int]=5000       ,				lowercase_    :					Union[str, Any]=1       ,				lowercase_    :					List[str]=0       ,				lowercase_    :					str=2       ,				**lowercase_    :					Union[str, Any]       ,				):
									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







"""simple docstring"""






from typing import TYPE_CHECKING

from ...utils import OptionalDependencyNotAvailable, _LazyModule, is_torch_available


lowercase__     						=						{"""configuration_ibert""": ["""IBERT_PRETRAINED_CONFIG_ARCHIVE_MAP""", """IBertConfig""", """IBertOnnxConfig"""]}

try:
			if not is_torch_available():
						raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
			pass
else:
			lowercase__     						=						[
			    """IBERT_PRETRAINED_MODEL_ARCHIVE_LIST""",
			    """IBertForMaskedLM""",
			    """IBertForMultipleChoice""",
			    """IBertForQuestionAnswering""",
			    """IBertForSequenceClassification""",
			    """IBertForTokenClassification""",
			    """IBertModel""",
			    """IBertPreTrainedModel""",
			]

if TYPE_CHECKING:
			from .configuration_ibert import IBERT_PRETRAINED_CONFIG_ARCHIVE_MAP, IBertConfig, IBertOnnxConfig

			try:
						if not is_torch_available():
									raise OptionalDependencyNotAvailable()
			except OptionalDependencyNotAvailable:
						pass
			else:
						from .modeling_ibert import (
						    IBERT_PRETRAINED_MODEL_ARCHIVE_LIST,
						    IBertForMaskedLM,
						    IBertForMultipleChoice,
						    IBertForQuestionAnswering,
						    IBertForSequenceClassification,
						    IBertForTokenClassification,
						    IBertModel,
						    IBertPreTrainedModel,
						)

else:
			import sys

			lowercase__     						=						_LazyModule(__name__, globals()["""__file__"""], _import_structure, module_spec=__spec__)