


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


_SCREAMING_SNAKE_CASE     :			Any        =							logging.get_logger(__name__)

_SCREAMING_SNAKE_CASE     :			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_	):







     '''simple docstring'''







     lowerCamelCase :						Dict            =   'realm'

     def __init__(				self    :							Any			,				_UpperCamelCase    :							Optional[Any]=30_522			,				_UpperCamelCase    :							List[str]=768			,				_UpperCamelCase    :							Tuple=128			,				_UpperCamelCase    :							Dict=12			,				_UpperCamelCase    :							int=12			,				_UpperCamelCase    :							List[str]=8			,				_UpperCamelCase    :							List[str]=3_072			,				_UpperCamelCase    :							List[str]="gelu_new"			,				_UpperCamelCase    :							List[str]=0.1			,				_UpperCamelCase    :							Union[str, Any]=0.1			,				_UpperCamelCase    :							Dict=512			,				_UpperCamelCase    :							int=2			,				_UpperCamelCase    :							List[str]=0.0_2			,				_UpperCamelCase    :							str=1e-12			,				_UpperCamelCase    :							Dict=256			,				_UpperCamelCase    :							Any=10			,				_UpperCamelCase    :							str=1e-3			,				_UpperCamelCase    :							str=5			,				_UpperCamelCase    :							Dict=320			,				_UpperCamelCase    :							str=13_353_718			,				_UpperCamelCase    :							Tuple=5_000			,				_UpperCamelCase    :							Optional[Any]=1			,				_UpperCamelCase    :							List[Any]=0			,				_UpperCamelCase    :							int=2			,				**_UpperCamelCase    :							Optional[Any]			,				):
      super().__init__(pad_token_id=_UpperCamelCase			,				bos_token_id=_UpperCamelCase			,				eos_token_id=_UpperCamelCase			,				**_UpperCamelCase)

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

      # Reader config
      _lowercase:       Any						=				span_hidden_size
      _lowercase:       List[Any]						=				max_span_width
      _lowercase:       str						=				reader_layer_norm_eps
      _lowercase:       Optional[int]						=				reader_beam_size
      _lowercase:       Optional[int]						=				reader_seq_len

      # Retrieval config
      _lowercase:       int						=				num_block_records
      _lowercase:       int						=				searcher_beam_size



"""simple docstring"""


from typing import TYPE_CHECKING

from ...utils import OptionalDependencyNotAvailable, _LazyModule, is_torch_available


A_    							=					{
    """configuration_nllb_moe""": [
        """NLLB_MOE_PRETRAINED_CONFIG_ARCHIVE_MAP""",
        """NllbMoeConfig""",
    ]
}

try:
						if not is_torch_available():
												raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
						pass
else:
						A_    							=					[
						    """NLLB_MOE_PRETRAINED_MODEL_ARCHIVE_LIST""",
						    """NllbMoeForConditionalGeneration""",
						    """NllbMoeModel""",
						    """NllbMoePreTrainedModel""",
						    """NllbMoeTop2Router""",
						    """NllbMoeSparseMLP""",
						]


if TYPE_CHECKING:
						from .configuration_nllb_moe import (
						    NLLB_MOE_PRETRAINED_CONFIG_ARCHIVE_MAP,
						    NllbMoeConfig,
						)

						try:
												if not is_torch_available():
																		raise OptionalDependencyNotAvailable()
						except OptionalDependencyNotAvailable:
												pass
						else:
												from .modeling_nllb_moe import (
												    NLLB_MOE_PRETRAINED_MODEL_ARCHIVE_LIST,
												    NllbMoeForConditionalGeneration,
												    NllbMoeModel,
												    NllbMoePreTrainedModel,
												    NllbMoeSparseMLP,
												    NllbMoeTopaRouter,
												)


else:
						import sys

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



