

'''simple docstring'''




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


_a					:			Optional[int]							=    logging.get_logger(__name__)

_a					:			List[Any]							=    {
    '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 							lowercase_						(		a			):

  '''simple docstring'''





  __lowerCAmelCase       :			Any     	= "realm"
  def __init__(  self ,			a_=3_0_5_2_2 ,			a_=7_6_8 ,			a_=1_2_8 ,			a_=1_2 ,			a_=1_2 ,			a_=8 ,			a_=3_0_7_2 ,			a_="gelu_new" ,			a_=0.1 ,			a_=0.1 ,			a_=5_1_2 ,			a_=2 ,			a_=0.02 ,			a_=1E-12 ,			a_=2_5_6 ,			a_=1_0 ,			a_=1E-3 ,			a_=5 ,			a_=3_2_0 ,			a_=1_3_3_5_3_7_1_8 ,			a_=5_0_0_0 ,			a_=1 ,			a_=0 ,			a_=2 ,			**a_ ,			)				->					str:


    """simple docstring"""
    super().__init__(pad_token_id=a_ ,			bos_token_id=a_ ,			eos_token_id=a_ ,			**a_  )

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

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

    # Retrieval config
    UpperCAmelCase    				=						num_block_records
    UpperCAmelCase    				=						searcher_beam_size





'''simple docstring'''




from typing import TYPE_CHECKING

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


_a					:			Dict							=    {
    'configuration_xlm': ['XLM_PRETRAINED_CONFIG_ARCHIVE_MAP', 'XLMConfig', 'XLMOnnxConfig'],
    'tokenization_xlm': ['XLMTokenizer'],
}

try:
  if not is_torch_available():
    raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
  pass
else:
  _a					:			Optional[Any]							=    [
      'XLM_PRETRAINED_MODEL_ARCHIVE_LIST',
      'XLMForMultipleChoice',
      'XLMForQuestionAnswering',
      'XLMForQuestionAnsweringSimple',
      'XLMForSequenceClassification',
      'XLMForTokenClassification',
      'XLMModel',
      'XLMPreTrainedModel',
      'XLMWithLMHeadModel',
  ]

try:
  if not is_tf_available():
    raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
  pass
else:
  _a					:			int							=    [
      'TF_XLM_PRETRAINED_MODEL_ARCHIVE_LIST',
      'TFXLMForMultipleChoice',
      'TFXLMForQuestionAnsweringSimple',
      'TFXLMForSequenceClassification',
      'TFXLMForTokenClassification',
      'TFXLMMainLayer',
      'TFXLMModel',
      'TFXLMPreTrainedModel',
      'TFXLMWithLMHeadModel',
  ]


if TYPE_CHECKING:
  from .configuration_xlm import XLM_PRETRAINED_CONFIG_ARCHIVE_MAP, XLMConfig, XLMOnnxConfig
  from .tokenization_xlm import XLMTokenizer

  try:
    if not is_torch_available():
      raise OptionalDependencyNotAvailable()
  except OptionalDependencyNotAvailable:
    pass
  else:
    from .modeling_xlm import (
        XLM_PRETRAINED_MODEL_ARCHIVE_LIST,
        XLMForMultipleChoice,
        XLMForQuestionAnswering,
        XLMForQuestionAnsweringSimple,
        XLMForSequenceClassification,
        XLMForTokenClassification,
        XLMModel,
        XLMPreTrainedModel,
        XLMWithLMHeadModel,
    )

  try:
    if not is_tf_available():
      raise OptionalDependencyNotAvailable()
  except OptionalDependencyNotAvailable:
    pass
  else:
    from .modeling_tf_xlm import (
        TF_XLM_PRETRAINED_MODEL_ARCHIVE_LIST,
        TFXLMForMultipleChoice,
        TFXLMForQuestionAnsweringSimple,
        TFXLMForSequenceClassification,
        TFXLMForTokenClassification,
        TFXLMMainLayer,
        TFXLMModel,
        TFXLMPreTrainedModel,
        TFXLMWithLMHeadModel,
    )

else:
  import sys

  _a					:			Union[str, Any]							=    _LazyModule(__name__, globals()['__file__'], _import_structure, module_spec=__spec__)


