




"""simple docstring"""


from collections import OrderedDict
from typing import Mapping

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


A_ :    int      =    logging.get_logger(__name__)

A_ :    Any      =    {
    '''xlm-mlm-en-2048''': '''https://huggingface.co/xlm-mlm-en-2048/resolve/main/config.json''',
    '''xlm-mlm-ende-1024''': '''https://huggingface.co/xlm-mlm-ende-1024/resolve/main/config.json''',
    '''xlm-mlm-enfr-1024''': '''https://huggingface.co/xlm-mlm-enfr-1024/resolve/main/config.json''',
    '''xlm-mlm-enro-1024''': '''https://huggingface.co/xlm-mlm-enro-1024/resolve/main/config.json''',
    '''xlm-mlm-tlm-xnli15-1024''': '''https://huggingface.co/xlm-mlm-tlm-xnli15-1024/resolve/main/config.json''',
    '''xlm-mlm-xnli15-1024''': '''https://huggingface.co/xlm-mlm-xnli15-1024/resolve/main/config.json''',
    '''xlm-clm-enfr-1024''': '''https://huggingface.co/xlm-clm-enfr-1024/resolve/main/config.json''',
    '''xlm-clm-ende-1024''': '''https://huggingface.co/xlm-clm-ende-1024/resolve/main/config.json''',
    '''xlm-mlm-17-1280''': '''https://huggingface.co/xlm-mlm-17-1280/resolve/main/config.json''',
    '''xlm-mlm-100-1280''': '''https://huggingface.co/xlm-mlm-100-1280/resolve/main/config.json''',
}






class  lowercase(					__UpperCamelCase			):







 '''simple docstring'''





 lowercase__			 = "xlm"
 lowercase__			 = {
     "hidden_size": "emb_dim",
     "num_attention_heads": "n_heads",
     "num_hidden_layers": "n_layers",
     "n_words": "vocab_size",  # For backward compatibility
 }


 def __init__(    self:		List[Any],				a_:		Optional[Any]=30_145,				a_:		Optional[Any]=2_048,				a_:		Dict=12,				a_:		int=16,				a_:		Tuple=0.1,				a_:		List[Any]=0.1,				a_:		str=True,				a_:		List[str]=False,				a_:		Tuple=False,				a_:		Dict=False,				a_:		Dict=1,				a_:		Tuple=True,				a_:		Optional[Any]=512,				a_:		List[Any]=2_048**-0.5,				a_:		List[str]=1E-12,				a_:		List[Any]=0.02,				a_:		List[str]=0,				a_:		Optional[Any]=1,				a_:		Dict=2,				a_:		List[str]=3,				a_:		Tuple=5,				a_:		Optional[int]=True,				a_:		Tuple="first",				a_:		List[Any]=True,				a_:		Dict=None,				a_:		List[Any]=True,				a_:		Any=0.1,				a_:		Tuple=5,				a_:		List[str]=5,				a_:		Optional[Any]=0,				a_:		Tuple=0,				a_:		Union[str, Any]=2,				a_:		Union[str, Any]=0,				**a_:		Tuple,				):




   '''simple docstring'''



   _snake_case							:		Optional[Any]								=  vocab_size
   _snake_case							:		Tuple								=  emb_dim
   _snake_case							:		int								=  n_layers
   _snake_case							:		List[str]								=  n_heads
   _snake_case							:		Union[str, Any]								=  dropout
   _snake_case							:		Optional[int]								=  attention_dropout
   _snake_case							:		Optional[Any]								=  gelu_activation
   _snake_case							:		Tuple								=  sinusoidal_embeddings
   _snake_case							:		List[Any]								=  causal
   _snake_case							:		Dict								=  asm
   _snake_case							:		int								=  n_langs
   _snake_case							:		str								=  use_lang_emb
   _snake_case							:		Dict								=  layer_norm_eps
   _snake_case							:		List[Any]								=  bos_index
   _snake_case							:		Union[str, Any]								=  eos_index
   _snake_case							:		Dict								=  pad_index
   _snake_case							:		Any								=  unk_index
   _snake_case							:		Dict								=  mask_index
   _snake_case							:		Any								=  is_encoder
   _snake_case							:		Dict								=  max_position_embeddings
   _snake_case							:		Optional[Any]								=  embed_init_std
   _snake_case							:		List[Any]								=  init_std
   _snake_case							:		str								=  summary_type
   _snake_case							:		Optional[Any]								=  summary_use_proj
   _snake_case							:		str								=  summary_activation
   _snake_case							:		Optional[int]								=  summary_proj_to_labels
   _snake_case							:		Dict								=  summary_first_dropout
   _snake_case							:		Dict								=  start_n_top
   _snake_case							:		int								=  end_n_top
   _snake_case							:		str								=  mask_token_id
   _snake_case							:		int								=  lang_id

   if "n_words" in kwargs:
     _snake_case							:		Dict								=  kwargs["""n_words"""]

   super().__init__(pad_token_id=_lowerCAmelCase,				bos_token_id=_lowerCAmelCase,				**_lowerCAmelCase		)







class  lowercase(					__UpperCamelCase			):







 '''simple docstring'''





 @property
 def 			UpperCamelCase_       (    self:		Dict		):




   '''simple docstring'''



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








"""simple docstring"""


def  UpperCAmelCase__	(snake_case__							: int   ):
  """simple docstring"""

  _snake_case							:		Optional[Any]								=  (1 + 24 * n) ** 0.5
  return ((1 + root) / 6) % 1 == 0


def  UpperCAmelCase__	(snake_case__							: int = 50_00   ):
  """simple docstring"""

  _snake_case							:		List[str]								=  [(i * (3 * i - 1)) // 2 for i in range(1		,       snake_case__   )]
  for i, pentagonal_i in enumerate(snake_case__   ):
    for j in range(snake_case__		,       len(snake_case__   )   ):
      _snake_case							:		Dict								=  pentagonal_nums[j]
      _snake_case							:		Optional[Any]								=  pentagonal_i + pentagonal_j
      _snake_case							:		List[str]								=  pentagonal_j - pentagonal_i
      if is_pentagonal(snake_case__   ) and is_pentagonal(snake_case__   ):
        return b

  return -1


if __name__ == "__main__":
     print(F'''{solution() = }''')


