





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       (      lowerCamelCase__  ):




      """simple docstring"""







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


      def __init__(		self      ,							a__=3_0145      ,							a__=2048      ,							a__=12      ,							a__=16      ,							a__=0.1      ,							a__=0.1      ,							a__=True      ,							a__=False      ,							a__=False      ,							a__=False      ,							a__=1      ,							a__=True      ,							a__=512      ,							a__=2048**-0.5      ,							a__=1e-12      ,							a__=0.02      ,							a__=0      ,							a__=1      ,							a__=2      ,							a__=3      ,							a__=5      ,							a__=True      ,							a__="first"      ,							a__=True      ,							a__=None      ,							a__=True      ,							a__=0.1      ,							a__=5      ,							a__=5      ,							a__=0      ,							a__=0      ,							a__=2      ,							a__=0      ,							**a__      ,							):



             """simple docstring"""





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

             if "n_words" in kwargs:
                    _lowerCamelCase							:     int	=		kwargs['''n_words''']

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







class 			__A       (      lowerCamelCase__  ):




      """simple docstring"""







      @property
      def 				__snake_case			(		self):



             """simple docstring"""





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








def    __UpperCAmelCase(      lowercase_ ,    lowercase_ ,    lowercase_      ):
       return round(float(moles / volume      ) * nfactor      )




def    __UpperCAmelCase(      lowercase_ ,    lowercase_ ,    lowercase_      ):
       return round(float((moles * 0.0_8_2_1 * temperature) / (volume)      )      )




def    __UpperCAmelCase(      lowercase_ ,    lowercase_ ,    lowercase_      ):
       return round(float((moles * 0.0_8_2_1 * temperature) / (pressure)      )      )




def    __UpperCAmelCase(      lowercase_ ,    lowercase_ ,    lowercase_      ):
       return round(float((pressure * volume) / (0.0_8_2_1 * moles)      )      )


if __name__ == "__main__":
       import doctest

       doctest.testmod()

