





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__       = {
    "facebook/xlm-roberta-xl": "https://huggingface.co/facebook/xlm-roberta-xl/resolve/main/config.json",
    "facebook/xlm-roberta-xxl": "https://huggingface.co/facebook/xlm-roberta-xxl/resolve/main/config.json",
    # See all XLM-RoBERTa-XL models at https://huggingface.co/models?filter=xlm-roberta-xl
}






class 						__magic_name__    (       _snake_case    ):
 UpperCAmelCase							    =						"""xlm-roberta-xl"""


 def __init__(						self		: Any			,						lowerCAmelCase__		: Optional[int]=2_5_0_8_8_0			,						lowerCAmelCase__		: int=2_5_6_0			,						lowerCAmelCase__		: Optional[Any]=3_6			,						lowerCAmelCase__		: List[Any]=3_2			,						lowerCAmelCase__		: Optional[int]=1_0_2_4_0			,						lowerCAmelCase__		: Optional[Any]="gelu"			,						lowerCAmelCase__		: Tuple=0.1			,						lowerCAmelCase__		: Dict=0.1			,						lowerCAmelCase__		: str=5_1_4			,						lowerCAmelCase__		: List[Any]=1			,						lowerCAmelCase__		: Dict=0.02			,						lowerCAmelCase__		: Tuple=1e-0_5			,						lowerCAmelCase__		: Union[str, Any]=1			,						lowerCAmelCase__		: Union[str, Any]=0			,						lowerCAmelCase__		: int=2			,						lowerCAmelCase__		: Optional[int]="absolute"			,						lowerCAmelCase__		: str=True			,						lowerCAmelCase__		: Optional[Any]=None			,						**lowerCAmelCase__		: Tuple			,						)    ->      Any:
   super().__init__(pad_token_id=_UpperCAmelCase			,						bos_token_id=_UpperCAmelCase			,						eos_token_id=_UpperCAmelCase			,						**_UpperCAmelCase    )
   UpperCAmelCase					      =  vocab_size
   UpperCAmelCase					      =  hidden_size
   UpperCAmelCase					      =  num_hidden_layers
   UpperCAmelCase					      =  num_attention_heads
   UpperCAmelCase					      =  hidden_act
   UpperCAmelCase					      =  intermediate_size
   UpperCAmelCase					      =  hidden_dropout_prob
   UpperCAmelCase					      =  attention_probs_dropout_prob
   UpperCAmelCase					      =  max_position_embeddings
   UpperCAmelCase					      =  type_vocab_size
   UpperCAmelCase					      =  initializer_range
   UpperCAmelCase					      =  layer_norm_eps
   UpperCAmelCase					      =  position_embedding_type
   UpperCAmelCase					      =  use_cache
   UpperCAmelCase					      =  classifier_dropout






class 						__magic_name__    (       _snake_case    ):


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




   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),
       ]    )






def      _lowerCAmelCase(	__A			):

  if not isinstance(__A   ,       __A			):
    raise TypeError("only integers accepted as input"			)
  else:
    UpperCAmelCase					      =  str(abs(__A			)			)
    UpperCAmelCase					      =  [list(__A			) for char in range(len(__A			)			)]
    for index in range(len(__A			)			):
      num_transpositions[index].pop(__A			)
    return max(
        int("".join(list(__A			)			)			) for transposition in num_transpositions			)


if __name__ == "__main__":
      __import__("doctest").testmod()



