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												={
    "junnyu/roformer_chinese_small": "https://huggingface.co/junnyu/roformer_chinese_small/resolve/main/config.json",
    "junnyu/roformer_chinese_base": "https://huggingface.co/junnyu/roformer_chinese_base/resolve/main/config.json",
    "junnyu/roformer_chinese_char_small": (
        "https://huggingface.co/junnyu/roformer_chinese_char_small/resolve/main/config.json"
    ),
    "junnyu/roformer_chinese_char_base": (
        "https://huggingface.co/junnyu/roformer_chinese_char_base/resolve/main/config.json"
    ),
    "junnyu/roformer_small_discriminator": (
        "https://huggingface.co/junnyu/roformer_small_discriminator/resolve/main/config.json"
    ),
    "junnyu/roformer_small_generator": (
        "https://huggingface.co/junnyu/roformer_small_generator/resolve/main/config.json"
    ),
    # See all RoFormer models at https://huggingface.co/models?filter=roformer
}




class    a__				(       UpperCAmelCase__			):
     lowerCamelCase  :					int							='''roformer'''






     def __init__(			self		:		int  ,    a		:		Union[str, Any]=5_00_00  ,    a		:		int=None  ,    a		:		str=7_68  ,    a		:		List[str]=12  ,    a		:		Any=12  ,    a		:		List[Any]=30_72  ,    a		:		List[Any]="gelu"  ,    a		:		Optional[int]=0.1  ,    a		:		str=0.1  ,    a		:		List[Any]=15_36  ,    a		:		Union[str, Any]=2  ,    a		:		Tuple=0.02  ,    a		:		int=1e-1_2  ,    a		:		List[str]=0  ,    a		:		Dict=False  ,    a		:		Dict=True  ,    **a		:		Tuple  ,    ):





         """simple docstring"""



         super().__init__(pad_token_id=_a  ,    **_a   )

         __lowerCamelCase          =  vocab_size
         __lowerCamelCase          =  hidden_size if embedding_size is None else embedding_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          =  rotary_value
         __lowerCamelCase          =  use_cache




class    a__				(       UpperCAmelCase__			):






     @property
     def        SCREAMING_SNAKE_CASE__       (			self		:		Optional[int]   ):





         """simple docstring"""



         if self.task == "multiple-choice":
             __lowerCamelCase          =  {0: '''batch''', 1: '''choice''', 2: '''sequence'''}
         else:
             __lowerCamelCase          =  {0: '''batch''', 1: '''sequence'''}
         __lowerCamelCase          =  {0: '''batch''', 1: '''sequence'''}
         return OrderedDict(
             [
                 ('''input_ids''', dynamic_axis),
                 ('''attention_mask''', dynamic_axis),
                 ('''token_type_ids''', dynamic_axis),
             ]   )

'''simple docstring'''




from typing import TYPE_CHECKING

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


__UpperCAmelCase												={
    "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:
  __UpperCAmelCase												=["WhisperTokenizerFast"]

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

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

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

  __UpperCAmelCase												=_LazyModule(__name__, globals()["__file__"], _import_structure, module_spec=__spec__)
