




from collections import OrderedDict
from typing import Mapping

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


_lowerCamelCase      			=       logging.get_logger(__name__)

_lowerCamelCase      			=       {
    '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					(       _A      ):

     '''simple docstring'''





     lowerCAmelCase    :	str       		=  'xlm'
     lowerCAmelCase    :	Optional[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       :      List[str] ,   __snake_case       :      str=3_01_45 ,   __snake_case       :      Union[str, Any]=20_48 ,   __snake_case       :      List[str]=12 ,   __snake_case       :      Union[str, Any]=16 ,   __snake_case       :      Union[str, Any]=0.1 ,   __snake_case       :      Any=0.1 ,   __snake_case       :      List[str]=True ,   __snake_case       :      Union[str, Any]=False ,   __snake_case       :      Union[str, Any]=False ,   __snake_case       :      Tuple=False ,   __snake_case       :      Union[str, Any]=1 ,   __snake_case       :      Any=True ,   __snake_case       :      Optional[Any]=5_12 ,   __snake_case       :      Any=20_48**-0.5 ,   __snake_case       :      Union[str, Any]=1E-12 ,   __snake_case       :      Union[str, Any]=0.02 ,   __snake_case       :      Optional[Any]=0 ,   __snake_case       :      List[Any]=1 ,   __snake_case       :      Optional[Any]=2 ,   __snake_case       :      Optional[Any]=3 ,   __snake_case       :      Tuple=5 ,   __snake_case       :      int=True ,   __snake_case       :      Any="first" ,   __snake_case       :      str=True ,   __snake_case       :      Any=None ,   __snake_case       :      Dict=True ,   __snake_case       :      Any=0.1 ,   __snake_case       :      int=5 ,   __snake_case       :      Optional[int]=5 ,   __snake_case       :      Optional[Any]=0 ,   __snake_case       :      Any=0 ,   __snake_case       :      Any=2 ,   __snake_case       :      Any=0 ,   **__snake_case       :      Any ,   ):
         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=__snake_case ,   bos_token_id=__snake_case ,   **__snake_case    )



class       a					(       _A      ):

     '''simple docstring'''





     @property
     def   lowerCamelCase_       (     self       :      int    ):
         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),
             ]    )











import numpy as np




def  SCREAMING_SNAKE_CASE     (	__UpperCamelCase      :						np.array				)  ->							np.array:
    return (2 / (1 + np.exp(-2 * vector				))) - 1


if __name__ == "__main__":
 import doctest

 doctest.testmod()





