





'''simple docstring'''




from typing import TYPE_CHECKING

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


_A:					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:
       _A:					Union[str, Any]							=				["""WhisperTokenizerFast"""]

try:
       if not is_torch_available():
              raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
       pass
else:
       _A:					Optional[Any]							=				[
           """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:					Union[str, 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:					int							=				_LazyModule(__name__, globals()["""__file__"""], _import_structure, module_spec=__spec__)












'''simple docstring'''




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


_A:					Union[str, Any]							=				logging.get_logger(__name__)

_A:					List[str]							=				{
    """weiweishi/roc-bert-base-zh""": """https://huggingface.co/weiweishi/roc-bert-base-zh/resolve/main/config.json""",
}






class UpperCAmelCase							(		UpperCAmelCase_							):
    _A :			int						   =       """roc_bert"""



    def __init__(  self     ,			__A=30_522     ,			__A=768     ,			__A=12     ,			__A=12     ,			__A=3_072     ,			__A="gelu"     ,			__A=0.1     ,			__A=0.1     ,			__A=512     ,			__A=2     ,			__A=0.0_2     ,			__A=1E-12     ,			__A=True     ,			__A=0     ,			__A="absolute"     ,			__A=None     ,			__A=True     ,			__A=True     ,			__A=768     ,			__A=910     ,			__A=512     ,			__A=24_858     ,			__A=True     ,			**__A     ,			):
     __UpperCAmelCase					=   vocab_size
     __UpperCAmelCase					=   max_position_embeddings
     __UpperCAmelCase					=   hidden_size
     __UpperCAmelCase					=   num_hidden_layers
     __UpperCAmelCase					=   num_attention_heads
     __UpperCAmelCase					=   intermediate_size
     __UpperCAmelCase					=   hidden_act
     __UpperCAmelCase					=   hidden_dropout_prob
     __UpperCAmelCase					=   attention_probs_dropout_prob
     __UpperCAmelCase					=   initializer_range
     __UpperCAmelCase					=   type_vocab_size
     __UpperCAmelCase					=   layer_norm_eps
     __UpperCAmelCase					=   use_cache
     __UpperCAmelCase					=   enable_pronunciation
     __UpperCAmelCase					=   enable_shape
     __UpperCAmelCase					=   pronunciation_embed_dim
     __UpperCAmelCase					=   pronunciation_vocab_size
     __UpperCAmelCase					=   shape_embed_dim
     __UpperCAmelCase					=   shape_vocab_size
     __UpperCAmelCase					=   concat_input
     __UpperCAmelCase					=   position_embedding_type
     __UpperCAmelCase					=   classifier_dropout
     super().__init__(pad_token_id=__A     ,			**__A					)





