





from collections import OrderedDict
from typing import Mapping

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


UpperCAmelCase		:  int         =	logging.get_logger(__name__)

UpperCAmelCase		:  str         =	{
    '''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 		_A(   snake_case__  ):


				"""simple docstring"""


				UpperCamelCase       :    Optional[Any]          =      '''xlm-roberta-xl'''



				def __init__(     self	,   _A=250880	,   _A=2560	,   _A=36	,   _A=32	,   _A=10240	,   _A="gelu"	,   _A=0.1	,   _A=0.1	,   _A=514	,   _A=1	,   _A=0.0_2	,   _A=1e-0_5	,   _A=1	,   _A=0	,   _A=2	,   _A="absolute"	,   _A=True	,   _A=None	,   **_A	,   ):
									super().__init__(pad_token_id=__UpperCamelCase	,   bos_token_id=__UpperCamelCase	,   eos_token_id=__UpperCamelCase	,   **__UpperCamelCase	)
									__A      :		Union[str, Any]         =							vocab_size
									__A      :		int         =							hidden_size
									__A      :		List[Any]         =							num_hidden_layers
									__A      :		Dict         =							num_attention_heads
									__A      :		Optional[Any]         =							hidden_act
									__A      :		Dict         =							intermediate_size
									__A      :		str         =							hidden_dropout_prob
									__A      :		List[Any]         =							attention_probs_dropout_prob
									__A      :		Optional[Any]         =							max_position_embeddings
									__A      :		Optional[Any]         =							type_vocab_size
									__A      :		Dict         =							initializer_range
									__A      :		int         =							layer_norm_eps
									__A      :		Any         =							position_embedding_type
									__A      :		Tuple         =							use_cache
									__A      :		Tuple         =							classifier_dropout





class 		_A(   snake_case__  ):


				"""simple docstring"""


				@property
				def    UpperCAmelCase_						(     self	):
									if self.task == "multiple-choice":
														__A      :		List[Any]         =							{0: 'batch', 1: 'choice', 2: 'sequence'}
									else:
														__A      :		Union[str, Any]         =							{0: 'batch', 1: 'sequence'}
									return OrderedDict(
									    [
									        ('input_ids', dynamic_axis),
									        ('attention_mask', dynamic_axis),
									    ]	)






import os
import sys

lowercase   =	os.path.join(os.path.dirname(__file__), '''src''')
sys.path.append(SRC_DIR)


from transformers import (
    AutoConfig,
    AutoModel,
    AutoModelForCausalLM,
    AutoModelForMaskedLM,
    AutoModelForQuestionAnswering,
    AutoModelForSequenceClassification,
    AutoTokenizer,
    add_start_docstrings,
)


lowercase   =	[
    '''torch''',
    '''numpy''',
    '''tokenizers''',
    '''filelock''',
    '''requests''',
    '''tqdm''',
    '''regex''',
    '''sentencepiece''',
    '''sacremoses''',
    '''importlib_metadata''',
    '''huggingface_hub''',
]



@add_start_docstrings(AutoConfig.__doc__							)
def   __lowerCAmelCase    (				*UpperCAmelCase__					:   List[Any]      ,					**UpperCAmelCase__					:   List[str]							)	->     List[str]:
							return AutoConfig.from_pretrained(*UpperCAmelCase__      ,					**UpperCAmelCase__							)



@add_start_docstrings(AutoTokenizer.__doc__							)
def   __lowerCAmelCase    (				*UpperCAmelCase__					:   List[str]      ,					**UpperCAmelCase__					:   List[Any]							)	->     Any:
							return AutoTokenizer.from_pretrained(*UpperCAmelCase__      ,					**UpperCAmelCase__							)



@add_start_docstrings(AutoModel.__doc__							)
def   __lowerCAmelCase    (				*UpperCAmelCase__					:   Union[str, Any]      ,					**UpperCAmelCase__					:   Dict							)	->     Union[str, Any]:
							return AutoModel.from_pretrained(*UpperCAmelCase__      ,					**UpperCAmelCase__							)



@add_start_docstrings(AutoModelForCausalLM.__doc__							)
def   __lowerCAmelCase    (				*UpperCAmelCase__					:   List[str]      ,					**UpperCAmelCase__					:   List[Any]							)	->     Optional[Any]:
							return AutoModelForCausalLM.from_pretrained(*UpperCAmelCase__      ,					**UpperCAmelCase__							)



@add_start_docstrings(AutoModelForMaskedLM.__doc__							)
def   __lowerCAmelCase    (				*UpperCAmelCase__					:   Union[str, Any]      ,					**UpperCAmelCase__					:   Dict							)	->     int:
							return AutoModelForMaskedLM.from_pretrained(*UpperCAmelCase__      ,					**UpperCAmelCase__							)



@add_start_docstrings(AutoModelForSequenceClassification.__doc__							)
def   __lowerCAmelCase    (				*UpperCAmelCase__					:   List[Any]      ,					**UpperCAmelCase__					:   Dict							)	->     Dict:
							return AutoModelForSequenceClassification.from_pretrained(*UpperCAmelCase__      ,					**UpperCAmelCase__							)



@add_start_docstrings(AutoModelForQuestionAnswering.__doc__							)
def   __lowerCAmelCase    (				*UpperCAmelCase__					:   Any      ,					**UpperCAmelCase__					:   List[str]							)	->     Union[str, Any]:
							return AutoModelForQuestionAnswering.from_pretrained(*UpperCAmelCase__      ,					**UpperCAmelCase__							)





