






from collections import OrderedDict
from typing import Mapping

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


__a:     Union[str, Any]   					=					logging.get_logger(__name__)

__a:     Tuple   					=					{
    '''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 		SCREAMING_SNAKE_CASE__	(  UpperCAmelCase     ):

  '''simple docstring'''







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


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


         """simple docstring"""
         _UpperCAmelCase							=    vocab_size
         _UpperCAmelCase							=    emb_dim
         _UpperCAmelCase							=    n_layers
         _UpperCAmelCase							=    n_heads
         _UpperCAmelCase							=    dropout
         _UpperCAmelCase							=    attention_dropout
         _UpperCAmelCase							=    gelu_activation
         _UpperCAmelCase							=    sinusoidal_embeddings
         _UpperCAmelCase							=    causal
         _UpperCAmelCase							=    asm
         _UpperCAmelCase							=    n_langs
         _UpperCAmelCase							=    use_lang_emb
         _UpperCAmelCase							=    layer_norm_eps
         _UpperCAmelCase							=    bos_index
         _UpperCAmelCase							=    eos_index
         _UpperCAmelCase							=    pad_index
         _UpperCAmelCase							=    unk_index
         _UpperCAmelCase							=    mask_index
         _UpperCAmelCase							=    is_encoder
         _UpperCAmelCase							=    max_position_embeddings
         _UpperCAmelCase							=    embed_init_std
         _UpperCAmelCase							=    init_std
         _UpperCAmelCase							=    summary_type
         _UpperCAmelCase							=    summary_use_proj
         _UpperCAmelCase							=    summary_activation
         _UpperCAmelCase							=    summary_proj_to_labels
         _UpperCAmelCase							=    summary_first_dropout
         _UpperCAmelCase							=    start_n_top
         _UpperCAmelCase							=    end_n_top
         _UpperCAmelCase							=    mask_token_id
         _UpperCAmelCase							=    lang_id

         if "n_words" in kwargs:
                _UpperCAmelCase							=    kwargs["""n_words"""]

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



class 		SCREAMING_SNAKE_CASE__	(  UpperCAmelCase     ):

  '''simple docstring'''







  @property
  def  lowerCamelCase       (      self		:			Any							)						->	Mapping[str, Mapping[int, str]]:


         """simple docstring"""
         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),
                 ("""token_type_ids""", dynamic_axis),
             ]							)







__a:     List[Any]   					=					{
    '''Pillow''': '''Pillow''',
    '''accelerate''': '''accelerate>=0.11.0''',
    '''compel''': '''compel==0.1.8''',
    '''black''': '''black~=23.1''',
    '''datasets''': '''datasets''',
    '''filelock''': '''filelock''',
    '''flax''': '''flax>=0.4.1''',
    '''hf-doc-builder''': '''hf-doc-builder>=0.3.0''',
    '''huggingface-hub''': '''huggingface-hub>=0.13.2''',
    '''requests-mock''': '''requests-mock==1.10.0''',
    '''importlib_metadata''': '''importlib_metadata''',
    '''invisible-watermark''': '''invisible-watermark''',
    '''isort''': '''isort>=5.5.4''',
    '''jax''': '''jax>=0.2.8,!=0.3.2''',
    '''jaxlib''': '''jaxlib>=0.1.65''',
    '''Jinja2''': '''Jinja2''',
    '''k-diffusion''': '''k-diffusion>=0.0.12''',
    '''torchsde''': '''torchsde''',
    '''note_seq''': '''note_seq''',
    '''librosa''': '''librosa''',
    '''numpy''': '''numpy''',
    '''omegaconf''': '''omegaconf''',
    '''parameterized''': '''parameterized''',
    '''protobuf''': '''protobuf>=3.20.3,<4''',
    '''pytest''': '''pytest''',
    '''pytest-timeout''': '''pytest-timeout''',
    '''pytest-xdist''': '''pytest-xdist''',
    '''ruff''': '''ruff>=0.0.241''',
    '''safetensors''': '''safetensors''',
    '''sentencepiece''': '''sentencepiece>=0.1.91,!=0.1.92''',
    '''scipy''': '''scipy''',
    '''onnx''': '''onnx''',
    '''regex''': '''regex!=2019.12.17''',
    '''requests''': '''requests''',
    '''tensorboard''': '''tensorboard''',
    '''torch''': '''torch>=1.4''',
    '''torchvision''': '''torchvision''',
    '''transformers''': '''transformers>=4.25.1''',
    '''urllib3''': '''urllib3<=2.0.0''',
}