
'''simple docstring'''







from collections import OrderedDict
from typing import Mapping

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


lowercase    :							List[Any]      =					logging.get_logger(__name__)

lowercase    :							int      =					{
    "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 						__UpperCAmelCase      (					_lowerCAmelCase						):
							__lowercase      		=       "xmod"


							def __init__(       self    ,   lowerCAmelCase_=3_05_22    ,   lowerCAmelCase_=7_68    ,   lowerCAmelCase_=12    ,   lowerCAmelCase_=12    ,   lowerCAmelCase_=30_72    ,   lowerCAmelCase_="gelu"    ,   lowerCAmelCase_=0.1    ,   lowerCAmelCase_=0.1    ,   lowerCAmelCase_=5_12    ,   lowerCAmelCase_=2    ,   lowerCAmelCase_=0.02    ,   lowerCAmelCase_=1E-12    ,   lowerCAmelCase_=1    ,   lowerCAmelCase_=0    ,   lowerCAmelCase_=2    ,   lowerCAmelCase_="absolute"    ,   lowerCAmelCase_=True    ,   lowerCAmelCase_=None    ,   lowerCAmelCase_=False    ,   lowerCAmelCase_=2    ,   lowerCAmelCase_=False    ,   lowerCAmelCase_=True    ,   lowerCAmelCase_=True    ,   lowerCAmelCase_=("en_XX",)    ,   lowerCAmelCase_=None    ,   **lowerCAmelCase_    ,   ):





								"""simple docstring"""






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

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


class 						__UpperCAmelCase      (					_lowerCAmelCase						):


							@property
							def  lowerCamelCase				(       self  ):





								"""simple docstring"""






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









"""simple docstring"""


import os
import sys
from contextlib import contextmanager


# Windows only
if os.name == "nt":
       import ctypes
       import msvcrt  # noqa


       class 					snake_case		(							ctypes.Structure						):


          '''simple docstring'''

          A_						:	List[str]						 = [("size", ctypes.c_int), ("visible", ctypes.c_byte)]



def 					lowerCAmelCase				(    ):




  """simple docstring"""







  if os.name == "nt":
    __A									= CursorInfo()
    __A									= ctypes.windll.kernelaa.GetStdHandle(-1_1 )
    ctypes.windll.kernelaa.GetConsoleCursorInfo(__UpperCamelCase		,       ctypes.byref(__UpperCamelCase ) )
    __A									= False
    ctypes.windll.kernelaa.SetConsoleCursorInfo(__UpperCamelCase		,       ctypes.byref(__UpperCamelCase ) )
  elif os.name == "posix":
    sys.stdout.write('''\033[?25l''' )
    sys.stdout.flush()



def 					lowerCAmelCase				(    ):




  """simple docstring"""







  if os.name == "nt":
    __A									= CursorInfo()
    __A									= ctypes.windll.kernelaa.GetStdHandle(-1_1 )
    ctypes.windll.kernelaa.GetConsoleCursorInfo(__UpperCamelCase		,       ctypes.byref(__UpperCamelCase ) )
    __A									= True
    ctypes.windll.kernelaa.SetConsoleCursorInfo(__UpperCamelCase		,       ctypes.byref(__UpperCamelCase ) )
  elif os.name == "posix":
    sys.stdout.write('''\033[?25h''' )
    sys.stdout.flush()





@contextmanager
def 					lowerCAmelCase				(    ):




  """simple docstring"""







  try:
    hide_cursor()
    yield
  finally:
    show_cursor()




