






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			:    List[str]					  =['''WhisperTokenizerFast''']

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

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

try:
			if not is_flax_available():
						raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
			pass
else:
			_A			:    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

			_A			:    Dict					  =_LazyModule(__name__, globals()['''__file__'''], _import_structure, module_spec=__spec__)









'''simple docstring'''







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


_A			:    str					  =logging.get_logger(__name__)

_A			:    int					  ={
    '''weiweishi/roc-bert-base-zh''': '''https://huggingface.co/weiweishi/roc-bert-base-zh/resolve/main/config.json''',
}

class _lowercase			(       _lowercase	):
							a          = """roc_bert"""




							def __init__(							self:       Optional[Any]    ,							UpperCamelCase__:       Any=30_522    ,							UpperCamelCase__:       Optional[Any]=768    ,							UpperCamelCase__:       Union[str, Any]=12    ,							UpperCamelCase__:       Tuple=12    ,							UpperCamelCase__:       Tuple=3_072    ,							UpperCamelCase__:       str="gelu"    ,							UpperCamelCase__:       List[Any]=0.1    ,							UpperCamelCase__:       List[str]=0.1    ,							UpperCamelCase__:       Dict=512    ,							UpperCamelCase__:       str=2    ,							UpperCamelCase__:       str=0.02    ,							UpperCamelCase__:       Tuple=1e-12    ,							UpperCamelCase__:       Any=True    ,							UpperCamelCase__:       Union[str, Any]=0    ,							UpperCamelCase__:       List[Any]="absolute"    ,							UpperCamelCase__:       Any=None    ,							UpperCamelCase__:       Any=True    ,							UpperCamelCase__:       Optional[int]=True    ,							UpperCamelCase__:       Union[str, Any]=768    ,							UpperCamelCase__:       int=910    ,							UpperCamelCase__:       Tuple=512    ,							UpperCamelCase__:       int=24_858    ,							UpperCamelCase__:       Optional[Any]=True    ,							**UpperCamelCase__:       Optional[Any]    ,							):
														lowerCamelCase__      :			Optional[Any] 						= vocab_size
														lowerCamelCase__      :			Tuple 						= max_position_embeddings
														lowerCamelCase__      :			List[Any] 						= hidden_size
														lowerCamelCase__      :			int 						= num_hidden_layers
														lowerCamelCase__      :			Tuple 						= num_attention_heads
														lowerCamelCase__      :			Any 						= intermediate_size
														lowerCamelCase__      :			List[str] 						= hidden_act
														lowerCamelCase__      :			str 						= hidden_dropout_prob
														lowerCamelCase__      :			Dict 						= attention_probs_dropout_prob
														lowerCamelCase__      :			Union[str, Any] 						= initializer_range
														lowerCamelCase__      :			Tuple 						= type_vocab_size
														lowerCamelCase__      :			Optional[Any] 						= layer_norm_eps
														lowerCamelCase__      :			List[Any] 						= use_cache
														lowerCamelCase__      :			Tuple 						= enable_pronunciation
														lowerCamelCase__      :			Union[str, Any] 						= enable_shape
														lowerCamelCase__      :			Union[str, Any] 						= pronunciation_embed_dim
														lowerCamelCase__      :			Any 						= pronunciation_vocab_size
														lowerCamelCase__      :			int 						= shape_embed_dim
														lowerCamelCase__      :			Tuple 						= shape_vocab_size
														lowerCamelCase__      :			Optional[Any] 						= concat_input
														lowerCamelCase__      :			str 						= position_embedding_type
														lowerCamelCase__      :			Dict 						= classifier_dropout
														super().__init__(pad_token_id=UpperCamelCase__    ,							**UpperCamelCase__  )

