





'''simple docstring'''






from collections import OrderedDict
from typing import Mapping

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


A__				:   int      =logging.get_logger(__name__)

A__				:   List[Any]      ={
    '''facebook/data2vec-text-base''': '''https://huggingface.co/data2vec/resolve/main/config.json''',
}




class  UpperCAmelCase     (			snake_case_   ):
      _lowercase:			Optional[int]						     =   '''data2vec-text'''




      def __init__(			self			: str			,			__snake_case			: Optional[int]=3_05_22			,			__snake_case			: str=7_68			,			__snake_case			: Union[str, Any]=12			,			__snake_case			: Dict=12			,			__snake_case			: Union[str, Any]=30_72			,			__snake_case			: Any="gelu"			,			__snake_case			: List[Any]=0.1			,			__snake_case			: str=0.1			,			__snake_case			: List[str]=5_12			,			__snake_case			: List[str]=2			,			__snake_case			: List[Any]=0.02			,			__snake_case			: Tuple=1E-1_2			,			__snake_case			: Tuple=1			,			__snake_case			: List[str]=0			,			__snake_case			: List[Any]=2			,			__snake_case			: Union[str, Any]="absolute"			,			__snake_case			: Optional[Any]=True			,			__snake_case			: Union[str, Any]=None			,			**__snake_case			: List[str]			,			)				->      int:
            super().__init__(pad_token_id=__snake_case			,			bos_token_id=__snake_case			,			eos_token_id=__snake_case			,			**__snake_case  )

            _lowerCAmelCase							     =							vocab_size
            _lowerCAmelCase							     =							hidden_size
            _lowerCAmelCase							     =							num_hidden_layers
            _lowerCAmelCase							     =							num_attention_heads
            _lowerCAmelCase							     =							hidden_act
            _lowerCAmelCase							     =							intermediate_size
            _lowerCAmelCase							     =							hidden_dropout_prob
            _lowerCAmelCase							     =							attention_probs_dropout_prob
            _lowerCAmelCase							     =							max_position_embeddings
            _lowerCAmelCase							     =							type_vocab_size
            _lowerCAmelCase							     =							initializer_range
            _lowerCAmelCase							     =							layer_norm_eps
            _lowerCAmelCase							     =							position_embedding_type
            _lowerCAmelCase							     =							use_cache
            _lowerCAmelCase							     =							classifier_dropout




class  UpperCAmelCase     (			snake_case_   ):




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








from typing import TYPE_CHECKING

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


A     :	Optional[int]    = {
    '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:
					A     :	int    = ['WhisperTokenizerFast']

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

try:
					if not is_tf_available():
										raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
					pass
else:
					A     :	Tuple    = [
					    'TF_WHISPER_PRETRAINED_MODEL_ARCHIVE_LIST',
					    'TFWhisperForConditionalGeneration',
					    'TFWhisperModel',
					    'TFWhisperPreTrainedModel',
					]

try:
					if not is_flax_available():
										raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
					pass
else:
					A     :	int    = [
					    '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

					A     :	Tuple    = _LazyModule(__name__, globals()['__file__'], _import_structure, module_spec=__spec__)