




"""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     ):
		lowerCAmelCase_       :	int 							=     "realm"



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






									'''simple docstring'''

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

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

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

									# Retrieval config
									A         =					num_block_records
									A         =					searcher_beam_size








"""simple docstring"""







# Copyright 2023 The HuggingFace Team. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
from typing import TYPE_CHECKING

# rely on isort to merge the imports
from ...utils import OptionalDependencyNotAvailable, _LazyModule, is_tokenizers_available, is_torch_available


A    =			{'configuration_mra': ['MRA_PRETRAINED_CONFIG_ARCHIVE_MAP', 'MraConfig']}

try:
							if not is_torch_available():
														raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
							pass
else:
							A    =			[
							    'MRA_PRETRAINED_MODEL_ARCHIVE_LIST',
							    'MraForMaskedLM',
							    'MraForMultipleChoice',
							    'MraForQuestionAnswering',
							    'MraForSequenceClassification',
							    'MraForTokenClassification',
							    'MraLayer',
							    'MraModel',
							    'MraPreTrainedModel',
							]


if TYPE_CHECKING:
							from .configuration_mra import MRA_PRETRAINED_CONFIG_ARCHIVE_MAP, MraConfig

							try:
														if not is_torch_available():
																					raise OptionalDependencyNotAvailable()
							except OptionalDependencyNotAvailable:
														pass
							else:
														from .modeling_mra import (
														    MRA_PRETRAINED_MODEL_ARCHIVE_LIST,
														    MraForMaskedLM,
														    MraForMultipleChoice,
														    MraForQuestionAnswering,
														    MraForSequenceClassification,
														    MraForTokenClassification,
														    MraLayer,
														    MraModel,
														    MraPreTrainedModel,
														)
else:
							import sys

							A    =			_LazyModule(__name__, globals()['__file__'], _import_structure)



