





'''simple docstring'''

from collections import OrderedDict
from typing import Mapping

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


a   	=    logging.get_logger(__name__)

a   	=    {
    "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			( _snake_case      ):
   __UpperCamelCase :			List[str]						   =						'xlm'
   __UpperCamelCase :			Union[str, Any]						   =						{
       'hidden_size': 'emb_dim',
       'num_attention_heads': 'n_heads',
       'num_hidden_layers': 'n_layers',
       'n_words': 'vocab_size',  # For backward compatibility
   }





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

      '''simple docstring'''

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

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

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







class __a			( _snake_case      ):





   @property
   def   UpperCAmelCase__  (       self					:      Dict     ):

      '''simple docstring'''

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












'''simple docstring'''

from typing import TYPE_CHECKING

# rely on isort to merge the imports
from ...utils import OptionalDependencyNotAvailable, _LazyModule, is_torch_available


a   	=    {
    "configuration_informer": [
        "INFORMER_PRETRAINED_CONFIG_ARCHIVE_MAP",
        "InformerConfig",
    ],
}

try:
    if not is_torch_available():
        raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
    pass
else:
    a   	=    [
        "INFORMER_PRETRAINED_MODEL_ARCHIVE_LIST",
        "InformerForPrediction",
        "InformerModel",
        "InformerPreTrainedModel",
    ]


if TYPE_CHECKING:
    from .configuration_informer import INFORMER_PRETRAINED_CONFIG_ARCHIVE_MAP, InformerConfig

    try:
        if not is_torch_available():
            raise OptionalDependencyNotAvailable()
    except OptionalDependencyNotAvailable:
        pass
    else:
        from .modeling_informer import (
            INFORMER_PRETRAINED_MODEL_ARCHIVE_LIST,
            InformerForPrediction,
            InformerModel,
            InformerPreTrainedModel,
        )

else:
    import sys

    a   	=    _LazyModule(__name__, globals()["__file__"], _import_structure, module_spec=__spec__)





