






"""simple docstring"""







from collections import OrderedDict
from typing import Mapping

from ...configuration_utils import PretrainedConfig
from ...onnx import OnnxConfig
from ...utils import logging


_UpperCamelCase	     =    logging.get_logger(__name__)

_UpperCamelCase	     =    {
    """facebook/xmod-base""": """https://huggingface.co/facebook/xmod-base/resolve/main/config.json""",
    """facebook/xmod-large-prenorm""": """https://huggingface.co/facebook/xmod-large-prenorm/resolve/main/config.json""",
    """facebook/xmod-base-13-125k""": """https://huggingface.co/facebook/xmod-base-13-125k/resolve/main/config.json""",
    """facebook/xmod-base-30-125k""": """https://huggingface.co/facebook/xmod-base-30-125k/resolve/main/config.json""",
    """facebook/xmod-base-30-195k""": """https://huggingface.co/facebook/xmod-base-30-195k/resolve/main/config.json""",
    """facebook/xmod-base-60-125k""": """https://huggingface.co/facebook/xmod-base-60-125k/resolve/main/config.json""",
    """facebook/xmod-base-60-265k""": """https://huggingface.co/facebook/xmod-base-60-265k/resolve/main/config.json""",
    """facebook/xmod-base-75-125k""": """https://huggingface.co/facebook/xmod-base-75-125k/resolve/main/config.json""",
    """facebook/xmod-base-75-269k""": """https://huggingface.co/facebook/xmod-base-75-269k/resolve/main/config.json""",
}







class    lowerCamelCase__   (			__lowerCAmelCase					):
    SCREAMING_SNAKE_CASE						=     '''xmod'''






    def __init__(					self      ,A=30_522      ,A=768      ,A=12      ,A=12      ,A=3_072      ,A="gelu"      ,A=0.1      ,A=0.1      ,A=512      ,A=2      ,A=0.02      ,A=1e-1_2      ,A=1      ,A=0      ,A=2      ,A="absolute"      ,A=True      ,A=None      ,A=False      ,A=2      ,A=False      ,A=True      ,A=True      ,A=("en_XX",)      ,A=None      ,**A      ,):
          super().__init__(pad_token_id=_lowerCamelCase      ,bos_token_id=_lowerCamelCase      ,eos_token_id=_lowerCamelCase      ,**_lowerCamelCase   )

          UpperCAmelCase							     =			vocab_size
          UpperCAmelCase							     =			hidden_size
          UpperCAmelCase							     =			num_hidden_layers
          UpperCAmelCase							     =			num_attention_heads
          UpperCAmelCase							     =			hidden_act
          UpperCAmelCase							     =			intermediate_size
          UpperCAmelCase							     =			hidden_dropout_prob
          UpperCAmelCase							     =			attention_probs_dropout_prob
          UpperCAmelCase							     =			max_position_embeddings
          UpperCAmelCase							     =			type_vocab_size
          UpperCAmelCase							     =			initializer_range
          UpperCAmelCase							     =			layer_norm_eps
          UpperCAmelCase							     =			position_embedding_type
          UpperCAmelCase							     =			use_cache
          UpperCAmelCase							     =			classifier_dropout
          UpperCAmelCase							     =			pre_norm
          UpperCAmelCase							     =			adapter_reduction_factor
          UpperCAmelCase							     =			adapter_layer_norm
          UpperCAmelCase							     =			adapter_reuse_layer_norm
          UpperCAmelCase							     =			ln_before_adapter
          UpperCAmelCase							     =			list(_lowerCamelCase   )
          UpperCAmelCase							     =			default_language







class    lowerCamelCase__   (			__lowerCAmelCase					):






    @property
    def 							_UpperCamelCase				(					self   ):
          if self.task == "multiple-choice":
                UpperCAmelCase							     =			{0: """batch""", 1: """choice""", 2: """sequence"""}
          else:
                UpperCAmelCase							     =			{0: """batch""", 1: """sequence"""}
          return OrderedDict(
              [
                  ("""input_ids""", dynamic_axis),
                  ("""attention_mask""", dynamic_axis),
              ]   )




"""simple docstring"""


from .imports import is_rich_available


if is_rich_available():
	from rich.traceback import install

	install(show_locals=False)

else:
	raise ModuleNotFoundError('To use the rich extension, install rich with `pip install rich`')


