


from typing import TYPE_CHECKING

from ...utils import (
    OptionalDependencyNotAvailable,
    _LazyModule,
    is_flax_available,
    is_tf_available,
    is_tokenizers_available,
    is_torch_available,
)


_snake_case	:						str         =							{
    "configuration_whisper": ["WHISPER_PRETRAINED_CONFIG_ARCHIVE_MAP", "WhisperConfig", "WhisperOnnxConfig"],
    "feature_extraction_whisper": ["WhisperFeatureExtractor"],
    "processing_whisper": ["WhisperProcessor"],
    "tokenization_whisper": ["WhisperTokenizer"],
}

try:
			if not is_tokenizers_available():
						raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
			pass
else:
			_snake_case	:						Optional[Any]         =							["WhisperTokenizerFast"]

try:
			if not is_torch_available():
						raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
			pass
else:
			_snake_case	:						List[str]         =							[
			    "WHISPER_PRETRAINED_MODEL_ARCHIVE_LIST",
			    "WhisperForConditionalGeneration",
			    "WhisperModel",
			    "WhisperPreTrainedModel",
			    "WhisperForAudioClassification",
			]

try:
			if not is_tf_available():
						raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
			pass
else:
			_snake_case	:						Optional[int]         =							[
			    "TF_WHISPER_PRETRAINED_MODEL_ARCHIVE_LIST",
			    "TFWhisperForConditionalGeneration",
			    "TFWhisperModel",
			    "TFWhisperPreTrainedModel",
			]

try:
			if not is_flax_available():
						raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
			pass
else:
			_snake_case	:						Optional[Any]         =							[
			    "FlaxWhisperForConditionalGeneration",
			    "FlaxWhisperModel",
			    "FlaxWhisperPreTrainedModel",
			    "FlaxWhisperForAudioClassification",
			]


if TYPE_CHECKING:
			from .configuration_whisper import WHISPER_PRETRAINED_CONFIG_ARCHIVE_MAP, WhisperConfig, WhisperOnnxConfig
			from .feature_extraction_whisper import WhisperFeatureExtractor
			from .processing_whisper import WhisperProcessor
			from .tokenization_whisper import WhisperTokenizer

			try:
						if not is_tokenizers_available():
									raise OptionalDependencyNotAvailable()
			except OptionalDependencyNotAvailable:
						pass
			else:
						from .tokenization_whisper_fast import WhisperTokenizerFast

			try:
						if not is_torch_available():
									raise OptionalDependencyNotAvailable()
			except OptionalDependencyNotAvailable:
						pass
			else:
						from .modeling_whisper import (
						    WHISPER_PRETRAINED_MODEL_ARCHIVE_LIST,
						    WhisperForAudioClassification,
						    WhisperForConditionalGeneration,
						    WhisperModel,
						    WhisperPreTrainedModel,
						)

			try:
						if not is_tf_available():
									raise OptionalDependencyNotAvailable()
			except OptionalDependencyNotAvailable:
						pass
			else:
						from .modeling_tf_whisper import (
						    TF_WHISPER_PRETRAINED_MODEL_ARCHIVE_LIST,
						    TFWhisperForConditionalGeneration,
						    TFWhisperModel,
						    TFWhisperPreTrainedModel,
						)

			try:
						if not is_flax_available():
									raise OptionalDependencyNotAvailable()
			except OptionalDependencyNotAvailable:
						pass
			else:
						from .modeling_flax_whisper import (
						    FlaxWhisperForAudioClassification,
						    FlaxWhisperForConditionalGeneration,
						    FlaxWhisperModel,
						    FlaxWhisperPreTrainedModel,
						)

else:
			import sys

			_snake_case	:						Optional[int]         =							_LazyModule(__name__, globals()["__file__"], _import_structure, module_spec=__spec__)





'''simple docstring'''





from collections import OrderedDict
from typing import Mapping

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


UpperCAmelCase__  			=				logging.get_logger(__name__)

UpperCAmelCase__  			=				{
    '''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__					(					a_   ):





			'''simple docstring'''

			A						:				Tuple					      =			'''xlm-roberta-xl'''
			def __init__(  self							:			Union[str, Any]			,    lowerCAmelCase_							:			Tuple=250_880			,    lowerCAmelCase_							:			Optional[int]=2_560			,    lowerCAmelCase_							:			Optional[Any]=36			,    lowerCAmelCase_							:			List[str]=32			,    lowerCAmelCase_							:			Optional[Any]=10_240			,    lowerCAmelCase_							:			Union[str, Any]="gelu"			,    lowerCAmelCase_							:			Optional[Any]=0.1			,    lowerCAmelCase_							:			Optional[Any]=0.1			,    lowerCAmelCase_							:			Optional[int]=514			,    lowerCAmelCase_							:			List[str]=1			,    lowerCAmelCase_							:			Optional[Any]=0.02			,    lowerCAmelCase_							:			List[str]=1E-05			,    lowerCAmelCase_							:			int=1			,    lowerCAmelCase_							:			List[str]=0			,    lowerCAmelCase_							:			List[Any]=2			,    lowerCAmelCase_							:			Optional[int]="absolute"			,    lowerCAmelCase_							:			List[Any]=True			,    lowerCAmelCase_							:			Tuple=None			,    **lowerCAmelCase_							:			List[str]			,    )      ->		str:
						super().__init__(pad_token_id=lowerCAmelCase_			,    bos_token_id=lowerCAmelCase_			,    eos_token_id=lowerCAmelCase_			,    **lowerCAmelCase_	)
						__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 						a__					(					a_   ):





			'''simple docstring'''

			@property
			def 					lowerCAmelCase     (  self							:			Optional[int]	)      ->		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),
						    ]	)



