

'''simple docstring'''





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


A_	= logging.get_logger(__name__)

A_	= {
    "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__    ):

		'''simple docstring'''






		SCREAMING_SNAKE_CASE_           =					'realm'
		def __init__(					self   ,			SCREAMING_SNAKE_CASE_=30522   ,			SCREAMING_SNAKE_CASE_=768   ,			SCREAMING_SNAKE_CASE_=128   ,			SCREAMING_SNAKE_CASE_=12   ,			SCREAMING_SNAKE_CASE_=12   ,			SCREAMING_SNAKE_CASE_=8   ,			SCREAMING_SNAKE_CASE_=3072   ,			SCREAMING_SNAKE_CASE_="gelu_new"   ,			SCREAMING_SNAKE_CASE_=0.1   ,			SCREAMING_SNAKE_CASE_=0.1   ,			SCREAMING_SNAKE_CASE_=512   ,			SCREAMING_SNAKE_CASE_=2   ,			SCREAMING_SNAKE_CASE_=0.02   ,			SCREAMING_SNAKE_CASE_=1E-12   ,			SCREAMING_SNAKE_CASE_=256   ,			SCREAMING_SNAKE_CASE_=10   ,			SCREAMING_SNAKE_CASE_=1E-3   ,			SCREAMING_SNAKE_CASE_=5   ,			SCREAMING_SNAKE_CASE_=320   ,			SCREAMING_SNAKE_CASE_=13353718   ,			SCREAMING_SNAKE_CASE_=5000   ,			SCREAMING_SNAKE_CASE_=1   ,			SCREAMING_SNAKE_CASE_=0   ,			SCREAMING_SNAKE_CASE_=2   ,			**SCREAMING_SNAKE_CASE_   ,			)  ->     List[str]:






							'''simple docstring'''



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

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

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

							# Retrieval config
							lowerCamelCase_  				=      num_block_records
							lowerCamelCase_  				=      searcher_beam_size











"""simple docstring"""


from typing import TYPE_CHECKING

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


__SCREAMING_SNAKE_CASE   =   {
    'configuration_transfo_xl': ['TRANSFO_XL_PRETRAINED_CONFIG_ARCHIVE_MAP', 'TransfoXLConfig'],
    'tokenization_transfo_xl': ['TransfoXLCorpus', 'TransfoXLTokenizer'],
}

try:
		if not is_torch_available():
				raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
		pass
else:
		__SCREAMING_SNAKE_CASE   =   [
		    'TRANSFO_XL_PRETRAINED_MODEL_ARCHIVE_LIST',
		    'AdaptiveEmbedding',
		    'TransfoXLForSequenceClassification',
		    'TransfoXLLMHeadModel',
		    'TransfoXLModel',
		    'TransfoXLPreTrainedModel',
		    'load_tf_weights_in_transfo_xl',
		]

try:
		if not is_tf_available():
				raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
		pass
else:
		__SCREAMING_SNAKE_CASE   =   [
		    'TF_TRANSFO_XL_PRETRAINED_MODEL_ARCHIVE_LIST',
		    'TFAdaptiveEmbedding',
		    'TFTransfoXLForSequenceClassification',
		    'TFTransfoXLLMHeadModel',
		    'TFTransfoXLMainLayer',
		    'TFTransfoXLModel',
		    'TFTransfoXLPreTrainedModel',
		]


if TYPE_CHECKING:
		from .configuration_transfo_xl import TRANSFO_XL_PRETRAINED_CONFIG_ARCHIVE_MAP, TransfoXLConfig
		from .tokenization_transfo_xl import TransfoXLCorpus, TransfoXLTokenizer

		try:
				if not is_torch_available():
						raise OptionalDependencyNotAvailable()
		except OptionalDependencyNotAvailable:
				pass
		else:
				from .modeling_transfo_xl import (
				    TRANSFO_XL_PRETRAINED_MODEL_ARCHIVE_LIST,
				    AdaptiveEmbedding,
				    TransfoXLForSequenceClassification,
				    TransfoXLLMHeadModel,
				    TransfoXLModel,
				    TransfoXLPreTrainedModel,
				    load_tf_weights_in_transfo_xl,
				)

		try:
				if not is_tf_available():
						raise OptionalDependencyNotAvailable()
		except OptionalDependencyNotAvailable:
				pass
		else:
				from .modeling_tf_transfo_xl import (
				    TF_TRANSFO_XL_PRETRAINED_MODEL_ARCHIVE_LIST,
				    TFAdaptiveEmbedding,
				    TFTransfoXLForSequenceClassification,
				    TFTransfoXLLMHeadModel,
				    TFTransfoXLMainLayer,
				    TFTransfoXLModel,
				    TFTransfoXLPreTrainedModel,
				)

else:
		import sys

		__SCREAMING_SNAKE_CASE   =   _LazyModule(__name__, globals()['__file__'], _import_structure, module_spec=__spec__)