



from collections import OrderedDict
from typing import Mapping

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


__snake_case     :int			       =logging.get_logger(__name__)

__snake_case     :Dict			       ={
    '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        lowerCAmelCase__					(  _lowerCamelCase       ):
				A_   :     int								=     'xlm-roberta-xl'


				def __init__(							self      :  Optional[int]						, __UpperCamelCase      :  Union[str, Any]=250_880						, __UpperCamelCase      :  Optional[int]=2_560						, __UpperCamelCase      :  Optional[int]=36						, __UpperCamelCase      :  Union[str, Any]=32						, __UpperCamelCase      :  int=10_240						, __UpperCamelCase      :  Optional[Any]="gelu"						, __UpperCamelCase      :  Optional[Any]=0.1						, __UpperCamelCase      :  List[Any]=0.1						, __UpperCamelCase      :  Union[str, Any]=514						, __UpperCamelCase      :  List[str]=1						, __UpperCamelCase      :  Tuple=0.0_2						, __UpperCamelCase      :  Any=1e-05						, __UpperCamelCase      :  int=1						, __UpperCamelCase      :  int=0						, __UpperCamelCase      :  int=2						, __UpperCamelCase      :  List[str]="absolute"						, __UpperCamelCase      :  Any=True						, __UpperCamelCase      :  str=None						, **__UpperCamelCase      :  Optional[int]						, )		->     List[Any]:
											super().__init__(pad_token_id=__UpperCamelCase						, bos_token_id=__UpperCamelCase						, eos_token_id=__UpperCamelCase						, **__UpperCamelCase       )
											A      						=    vocab_size
											A      						=    hidden_size
											A      						=    num_hidden_layers
											A      						=    num_attention_heads
											A      						=    hidden_act
											A      						=    intermediate_size
											A      						=    hidden_dropout_prob
											A      						=    attention_probs_dropout_prob
											A      						=    max_position_embeddings
											A      						=    type_vocab_size
											A      						=    initializer_range
											A      						=    layer_norm_eps
											A      						=    position_embedding_type
											A      						=    use_cache
											A      						=    classifier_dropout





class        lowerCAmelCase__					(  _lowerCamelCase       ):


				@property
				def __UpperCamelCase						(							self      :  Optional[Any]       )		->     Mapping[str, Mapping[int, str]]:
											if self.task == "multiple-choice":
																		A      						=    {0: 'batch', 1: 'choice', 2: 'sequence'}
											else:
																		A      						=    {0: 'batch', 1: 'sequence'}
											return OrderedDict(
											    [
											        ('input_ids', dynamic_axis),
											        ('attention_mask', dynamic_axis),
											    ]       )




from ...configuration_utils import PretrainedConfig
from ...utils import logging


__snake_case     :List[str]			       =logging.get_logger(__name__)

__snake_case     :int			       ={'openai-gpt': 'https://huggingface.co/openai-gpt/resolve/main/config.json'}



class        lowerCAmelCase__					(  _lowerCamelCase       ):
				A_   :     Optional[Any]								=     'openai-gpt'
				A_   :     Any								=     {
				    'max_position_embeddings': 'n_positions',
				    'hidden_size': 'n_embd',
				    'num_attention_heads': 'n_head',
				    'num_hidden_layers': 'n_layer',
				}


				def __init__(							self      :  List[Any]						, __UpperCamelCase      :  List[str]=40_478						, __UpperCamelCase      :  List[Any]=512						, __UpperCamelCase      :  List[Any]=768						, __UpperCamelCase      :  Optional[int]=12						, __UpperCamelCase      :  Dict=12						, __UpperCamelCase      :  List[str]="gelu"						, __UpperCamelCase      :  str=0.1						, __UpperCamelCase      :  Optional[Any]=0.1						, __UpperCamelCase      :  Union[str, Any]=0.1						, __UpperCamelCase      :  List[str]=1e-5						, __UpperCamelCase      :  List[Any]=0.0_2						, __UpperCamelCase      :  str="cls_index"						, __UpperCamelCase      :  int=True						, __UpperCamelCase      :  int=None						, __UpperCamelCase      :  Optional[int]=True						, __UpperCamelCase      :  Tuple=0.1						, **__UpperCamelCase      :  List[Any]						, )		->     List[str]:
											A      						=    vocab_size
											A      						=    n_positions
											A      						=    n_embd
											A      						=    n_layer
											A      						=    n_head
											A      						=    afn
											A      						=    resid_pdrop
											A      						=    embd_pdrop
											A      						=    attn_pdrop
											A      						=    layer_norm_epsilon
											A      						=    initializer_range
											A      						=    summary_type
											A      						=    summary_use_proj
											A      						=    summary_activation
											A      						=    summary_first_dropout
											A      						=    summary_proj_to_labels
											super().__init__(**__UpperCamelCase       )