


from collections import OrderedDict
from typing import Mapping

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


lowercase_	   =     logging.get_logger(__name__)

lowercase_	   =     {
    '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 	A_ (	__UpperCamelCase   ):




      '''simple docstring'''


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




      def __init__(    self:	Union[str, Any]						,				a:	Any=3_0145						,				a:	Union[str, Any]=2048						,				a:	List[Any]=12						,				a:	Optional[Any]=16						,				a:	Tuple=0.1						,				a:	Tuple=0.1						,				a:	Optional[int]=True						,				a:	List[str]=False						,				a:	List[Any]=False						,				a:	str=False						,				a:	Union[str, Any]=1						,				a:	str=True						,				a:	str=512						,				a:	str=2048**-0.5						,				a:	Union[str, Any]=1e-12						,				a:	int=0.0_2						,				a:	str=0						,				a:	Tuple=1						,				a:	Optional[int]=2						,				a:	int=3						,				a:	Optional[int]=5						,				a:	Any=True						,				a:	Any="first"						,				a:	str=True						,				a:	Optional[Any]=None						,				a:	Union[str, Any]=True						,				a:	Dict=0.1						,				a:	Any=5						,				a:	List[str]=5						,				a:	str=0						,				a:	Union[str, Any]=0						,				a:	Dict=2						,				a:	Optional[Any]=0						,				**a:	Optional[int]						,				):
       __lowerCamelCase		:							Union[str, Any]		 =						vocab_size
       __lowerCamelCase		:							Dict		 =						emb_dim
       __lowerCamelCase		:							Dict		 =						n_layers
       __lowerCamelCase		:							Optional[int]		 =						n_heads
       __lowerCamelCase		:							Tuple		 =						dropout
       __lowerCamelCase		:							int		 =						attention_dropout
       __lowerCamelCase		:							Dict		 =						gelu_activation
       __lowerCamelCase		:							int		 =						sinusoidal_embeddings
       __lowerCamelCase		:							List[Any]		 =						causal
       __lowerCamelCase		:							Union[str, Any]		 =						asm
       __lowerCamelCase		:							Any		 =						n_langs
       __lowerCamelCase		:							int		 =						use_lang_emb
       __lowerCamelCase		:							int		 =						layer_norm_eps
       __lowerCamelCase		:							Dict		 =						bos_index
       __lowerCamelCase		:							Optional[int]		 =						eos_index
       __lowerCamelCase		:							Any		 =						pad_index
       __lowerCamelCase		:							Tuple		 =						unk_index
       __lowerCamelCase		:							List[Any]		 =						mask_index
       __lowerCamelCase		:							Tuple		 =						is_encoder
       __lowerCamelCase		:							Union[str, Any]		 =						max_position_embeddings
       __lowerCamelCase		:							int		 =						embed_init_std
       __lowerCamelCase		:							str		 =						init_std
       __lowerCamelCase		:							Optional[int]		 =						summary_type
       __lowerCamelCase		:							Union[str, Any]		 =						summary_use_proj
       __lowerCamelCase		:							Dict		 =						summary_activation
       __lowerCamelCase		:							Dict		 =						summary_proj_to_labels
       __lowerCamelCase		:							int		 =						summary_first_dropout
       __lowerCamelCase		:							List[Any]		 =						start_n_top
       __lowerCamelCase		:							Dict		 =						end_n_top
       __lowerCamelCase		:							Dict		 =						mask_token_id
       __lowerCamelCase		:							Optional[int]		 =						lang_id

       if "n_words" in kwargs:
        __lowerCamelCase		:							Optional[Any]		 =						kwargs['n_words']

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



class 	A_ (	__UpperCamelCase   ):




      '''simple docstring'''


      @property
      def 					_snake_case     (    self:	Dict    ):
       if self.task == "multiple-choice":
        __lowerCamelCase		:							Optional[int]		 =						{0: 'batch', 1: 'choice', 2: 'sequence'}
       else:
        __lowerCamelCase		:							Union[str, Any]		 =						{0: 'batch', 1: 'sequence'}
       return OrderedDict(
           [
               ('input_ids', dynamic_axis),
               ('attention_mask', dynamic_axis),
               ('token_type_ids', dynamic_axis),
           ]    )





from __future__ import annotations
def 				UpperCamelCase__					(  SCREAMING_SNAKE_CASE__						):
 __lowerCamelCase		:							List[Any]		 =						str(SCREAMING_SNAKE_CASE__						)
 return len(SCREAMING_SNAKE_CASE__						) == 9 and set(SCREAMING_SNAKE_CASE__						) == set('123456789'						)
def 				UpperCamelCase__					(  ):
 for base_num in range(9_999      ,	4_999      ,	-1						):
  __lowerCamelCase		:							Tuple		 =						100_002 * base_num
  if is_9_pandigital(SCREAMING_SNAKE_CASE__						):
   return candidate

 for base_num in range(333      ,	99      ,	-1						):
  __lowerCamelCase		:							Union[str, Any]		 =						1_002_003 * base_num
  if is_9_pandigital(SCREAMING_SNAKE_CASE__						):
   return candidate

 return None


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

