


from typing import TYPE_CHECKING

from ...utils import (
    OptionalDependencyNotAvailable,
    _LazyModule,
    is_sentencepiece_available,
    is_tokenizers_available,
    is_torch_available,
)


lowerCamelCase						=		{'''configuration_plbart''': ['''PLBART_PRETRAINED_CONFIG_ARCHIVE_MAP''', '''PLBartConfig''']}

try:
		if not is_sentencepiece_available():
				raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
		pass
else:
		lowerCamelCase						=		['''PLBartTokenizer''']

try:
		if not is_torch_available():
				raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
		pass
else:
		lowerCamelCase						=		[
		    '''PLBART_PRETRAINED_MODEL_ARCHIVE_LIST''',
		    '''PLBartForCausalLM''',
		    '''PLBartForConditionalGeneration''',
		    '''PLBartForSequenceClassification''',
		    '''PLBartModel''',
		    '''PLBartPreTrainedModel''',
		]


if TYPE_CHECKING:
		from .configuration_plbart import PLBART_PRETRAINED_CONFIG_ARCHIVE_MAP, PLBartConfig

		try:
				if not is_sentencepiece_available():
						raise OptionalDependencyNotAvailable()
		except OptionalDependencyNotAvailable:
				pass
		else:
				from .tokenization_plbart import PLBartTokenizer

		try:
				if not is_torch_available():
						raise OptionalDependencyNotAvailable()
		except OptionalDependencyNotAvailable:
				pass
		else:
				from .modeling_plbart import (
				    PLBART_PRETRAINED_MODEL_ARCHIVE_LIST,
				    PLBartForCausalLM,
				    PLBartForConditionalGeneration,
				    PLBartForSequenceClassification,
				    PLBartModel,
				    PLBartPreTrainedModel,
				)


else:
		import sys

		lowerCamelCase						=		_LazyModule(__name__, globals()['''__file__'''], _import_structure)








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  _a							(    _lowercase):
	_a  :  Optional[int]				   =							'''xlm-roberta-xl'''




	def __init__( self						:		Any		, _SCREAMING_SNAKE_CASE						:		str=25_0880		, _SCREAMING_SNAKE_CASE						:		Optional[Any]=2560		, _SCREAMING_SNAKE_CASE						:		int=36		, _SCREAMING_SNAKE_CASE						:		Optional[int]=32		, _SCREAMING_SNAKE_CASE						:		Any=1_0240		, _SCREAMING_SNAKE_CASE						:		List[str]="gelu"		, _SCREAMING_SNAKE_CASE						:		Optional[Any]=0.1		, _SCREAMING_SNAKE_CASE						:		Dict=0.1		, _SCREAMING_SNAKE_CASE						:		Optional[int]=514		, _SCREAMING_SNAKE_CASE						:		Optional[int]=1		, _SCREAMING_SNAKE_CASE						:		Tuple=0.02		, _SCREAMING_SNAKE_CASE						:		Dict=1E-05		, _SCREAMING_SNAKE_CASE						:		Tuple=1		, _SCREAMING_SNAKE_CASE						:		Optional[int]=0		, _SCREAMING_SNAKE_CASE						:		Tuple=2		, _SCREAMING_SNAKE_CASE						:		Union[str, Any]="absolute"		, _SCREAMING_SNAKE_CASE						:		Any=True		, _SCREAMING_SNAKE_CASE						:		Any=None		, **_SCREAMING_SNAKE_CASE						:		Tuple		, )->	str:
			super().__init__(pad_token_id=_SCREAMING_SNAKE_CASE		, bos_token_id=_SCREAMING_SNAKE_CASE		, eos_token_id=_SCREAMING_SNAKE_CASE		, **_SCREAMING_SNAKE_CASE		)
			lowerCAmelCase__       :      Any   					= vocab_size
			lowerCAmelCase__       :      List[Any]   					= hidden_size
			lowerCAmelCase__       :      int   					= num_hidden_layers
			lowerCAmelCase__       :      Dict   					= num_attention_heads
			lowerCAmelCase__       :      str   					= hidden_act
			lowerCAmelCase__       :      List[Any]   					= intermediate_size
			lowerCAmelCase__       :      Tuple   					= hidden_dropout_prob
			lowerCAmelCase__       :      str   					= attention_probs_dropout_prob
			lowerCAmelCase__       :      List[str]   					= max_position_embeddings
			lowerCAmelCase__       :      Any   					= type_vocab_size
			lowerCAmelCase__       :      Optional[Any]   					= initializer_range
			lowerCAmelCase__       :      Optional[int]   					= layer_norm_eps
			lowerCAmelCase__       :      Optional[int]   					= position_embedding_type
			lowerCAmelCase__       :      Any   					= use_cache
			lowerCAmelCase__       :      List[Any]   					= classifier_dropout





class  _a							(    _lowercase):




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




