

from collections import OrderedDict
from typing import Mapping

from packaging import version

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


UpperCAmelCase__	:       Optional[int]			      =      logging.get_logger(__name__)

UpperCAmelCase__	:       List[str]			      =      {
    """MBZUAI/swiftformer-xs""": """https://huggingface.co/MBZUAI/swiftformer-xs/resolve/main/config.json""",
}







class     a__    (				UpperCAmelCase    ):







  """simple docstring"""




  UpperCAmelCase__ :	str         ="""swiftformer"""


  def __init__(     self      :	Tuple			,			UpperCAmelCase__      :	Optional[Any]=3			,			UpperCAmelCase__      :	Optional[Any]=[3, 3, 6, 4]			,			UpperCAmelCase__      :	Union[str, Any]=[4_8, 5_6, 1_1_2, 2_2_0]			,			UpperCAmelCase__      :	Dict=4			,			UpperCAmelCase__      :	List[Any]=[True, True, True, True]			,			UpperCAmelCase__      :	Optional[int]="gelu"			,			UpperCAmelCase__      :	List[Any]=3			,			UpperCAmelCase__      :	int=2			,			UpperCAmelCase__      :	Optional[Any]=1			,			UpperCAmelCase__      :	int=0.0			,			UpperCAmelCase__      :	Union[str, Any]=True			,			UpperCAmelCase__      :	int=1e-5			,			UpperCAmelCase__      :	Any=1e-5			,			**UpperCAmelCase__      :	List[Any]			,			)   ->Optional[Any]:
        """simple docstring"""







        super().__init__(**UpperCAmelCase__						)
        SCREAMING_SNAKE_CASE	: str					       =				num_channels
        SCREAMING_SNAKE_CASE	: List[Any]					       =				depths
        SCREAMING_SNAKE_CASE	: List[Any]					       =				embed_dims
        SCREAMING_SNAKE_CASE	: Any					       =				mlp_ratio
        SCREAMING_SNAKE_CASE	: Optional[int]					       =				downsamples
        SCREAMING_SNAKE_CASE	: int					       =				hidden_act
        SCREAMING_SNAKE_CASE	: str					       =				down_patch_size
        SCREAMING_SNAKE_CASE	: Union[str, Any]					       =				down_stride
        SCREAMING_SNAKE_CASE	: List[str]					       =				down_pad
        SCREAMING_SNAKE_CASE	: Dict					       =				drop_path_rate
        SCREAMING_SNAKE_CASE	: Union[str, Any]					       =				use_layer_scale
        SCREAMING_SNAKE_CASE	: str					       =				layer_scale_init_value
        SCREAMING_SNAKE_CASE	: Tuple					       =				batch_norm_eps







class     a__    (				UpperCAmelCase    ):







  """simple docstring"""




  UpperCAmelCase__ :	Optional[int]         =version.parse("""1.11"""    )


  @property
  def 	_lowercase (     self      :	List[str]						)   ->Mapping[str, Mapping[int, str]]:
        """simple docstring"""







        return OrderedDict(
            [
                ("""pixel_values""", {0: """batch""", 1: """num_channels""", 2: """height""", 3: """width"""}),
            ]						)




  @property
  def 	_lowercase (     self      :	Optional[Any]						)   ->float:
        """simple docstring"""







        return 1e-4







from typing import TYPE_CHECKING

from ...utils import (
    OptionalDependencyNotAvailable,
    _LazyModule,
    is_sentencepiece_available,
    is_speech_available,
    is_torch_available,
)


UpperCAmelCase__	:       int			      =      {
    """configuration_speech_to_text_2""": ["""SPEECH_TO_TEXT_2_PRETRAINED_CONFIG_ARCHIVE_MAP""", """Speech2Text2Config"""],
    """processing_speech_to_text_2""": ["""Speech2Text2Processor"""],
    """tokenization_speech_to_text_2""": ["""Speech2Text2Tokenizer"""],
}


try:
  if not is_torch_available():
    raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
  pass
else:
  UpperCAmelCase__	:       int			      =      [
      """SPEECH_TO_TEXT_2_PRETRAINED_MODEL_ARCHIVE_LIST""",
      """Speech2Text2ForCausalLM""",
      """Speech2Text2PreTrainedModel""",
  ]


if TYPE_CHECKING:
  from .configuration_speech_to_text_a import SPEECH_TO_TEXT_2_PRETRAINED_CONFIG_ARCHIVE_MAP, SpeechaTextaConfig
  from .processing_speech_to_text_a import SpeechaTextaProcessor
  from .tokenization_speech_to_text_a import SpeechaTextaTokenizer

  try:
    if not is_torch_available():
      raise OptionalDependencyNotAvailable()
  except OptionalDependencyNotAvailable:
    pass
  else:
    from .modeling_speech_to_text_a import (
        SPEECH_TO_TEXT_2_PRETRAINED_MODEL_ARCHIVE_LIST,
        SpeechaTextaForCausalLM,
        SpeechaTextaPreTrainedModel,
    )

else:
  import sys

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




