


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


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

__UpperCamelCase       :       Any						       =				{
    "facebook/s2t-wav2vec2-large-en-de": (
        "https://huggingface.co/facebook/s2t-wav2vec2-large-en-de/resolve/main/config.json"
    ),
    # See all Speech2Text models at https://huggingface.co/models?filter=speech2text2
}

class       __magic_name__	(     __lowerCAmelCase):
     A:		List[str]			=      "speech_to_text_2"
     A:		str			=      ["past_key_values"]
     A:		int			=      {"num_attention_heads": "decoder_attention_heads", "hidden_size": "d_model"}


     def __init__(      self							:     int							,	lowerCamelCase__							:     Dict=10000							,	lowerCamelCase__							:     int=6							,	lowerCamelCase__							:     Optional[int]=2048							,	lowerCamelCase__							:     Union[str, Any]=4							,	lowerCamelCase__							:     Union[str, Any]=0.0							,	lowerCamelCase__							:     List[Any]=True							,	lowerCamelCase__							:     str="relu"							,	lowerCamelCase__							:     Any=256							,	lowerCamelCase__							:     Union[str, Any]=0.1							,	lowerCamelCase__							:     Tuple=0.0							,	lowerCamelCase__							:     Optional[int]=0.0							,	lowerCamelCase__							:     List[str]=0.02							,	lowerCamelCase__							:     Optional[Any]=2							,	lowerCamelCase__							:     str=True							,	lowerCamelCase__							:     List[Any]=1							,	lowerCamelCase__							:     Any=0							,	lowerCamelCase__							:     Any=2							,	lowerCamelCase__							:     Any=1024							,	**lowerCamelCase__							:     Optional[Any]							,	)  ->      Dict:





      '''simple docstring'''






      UpperCamelCase__					:    List[str]          =   vocab_size
      UpperCamelCase__					:    Any          =   d_model
      UpperCamelCase__					:    Any          =   decoder_ffn_dim
      UpperCamelCase__					:    List[str]          =   decoder_layers
      UpperCamelCase__					:    Dict          =   decoder_attention_heads
      UpperCamelCase__					:    Tuple          =   dropout
      UpperCamelCase__					:    Optional[Any]          =   attention_dropout
      UpperCamelCase__					:    Union[str, Any]          =   activation_dropout
      UpperCamelCase__					:    Optional[int]          =   activation_function
      UpperCamelCase__					:    Optional[int]          =   init_std
      UpperCamelCase__					:    Union[str, Any]          =   decoder_layerdrop
      UpperCamelCase__					:    Optional[Any]          =   use_cache
      UpperCamelCase__					:    List[str]          =   decoder_layers
      UpperCamelCase__					:    Tuple          =   scale_embedding  # scale factor will be sqrt(d_model) if True
      UpperCamelCase__					:    Any          =   max_target_positions

      super().__init__(
          pad_token_id=lowerCamelCase__							,	bos_token_id=lowerCamelCase__							,	eos_token_id=lowerCamelCase__							,	decoder_start_token_id=lowerCamelCase__							,	**lowerCamelCase__							,	)






from typing import TYPE_CHECKING

from ...utils import (
    OptionalDependencyNotAvailable,
    _LazyModule,
    is_tf_available,
    is_torch_available,
    is_vision_available,
)


__UpperCamelCase       :       Dict						       =				{
    "configuration_mobilevit": ["MOBILEVIT_PRETRAINED_CONFIG_ARCHIVE_MAP", "MobileViTConfig", "MobileViTOnnxConfig"],
}

try:
       if not is_vision_available():
              raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
       pass
else:
       __UpperCamelCase       :       str						       =				["MobileViTFeatureExtractor"]
       __UpperCamelCase       :       Optional[Any]						       =				["MobileViTImageProcessor"]

try:
       if not is_torch_available():
              raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
       pass
else:
       __UpperCamelCase       :       Union[str, Any]						       =				[
           "MOBILEVIT_PRETRAINED_MODEL_ARCHIVE_LIST",
           "MobileViTForImageClassification",
           "MobileViTForSemanticSegmentation",
           "MobileViTModel",
           "MobileViTPreTrainedModel",
       ]

try:
       if not is_tf_available():
              raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
       pass
else:
       __UpperCamelCase       :       Optional[int]						       =				[
           "TF_MOBILEVIT_PRETRAINED_MODEL_ARCHIVE_LIST",
           "TFMobileViTForImageClassification",
           "TFMobileViTForSemanticSegmentation",
           "TFMobileViTModel",
           "TFMobileViTPreTrainedModel",
       ]

if TYPE_CHECKING:
       from .configuration_mobilevit import MOBILEVIT_PRETRAINED_CONFIG_ARCHIVE_MAP, MobileViTConfig, MobileViTOnnxConfig

       try:
              if not is_vision_available():
                     raise OptionalDependencyNotAvailable()
       except OptionalDependencyNotAvailable:
              pass
       else:
              from .feature_extraction_mobilevit import MobileViTFeatureExtractor
              from .image_processing_mobilevit import MobileViTImageProcessor

       try:
              if not is_torch_available():
                     raise OptionalDependencyNotAvailable()
       except OptionalDependencyNotAvailable:
              pass
       else:
              from .modeling_mobilevit import (
                  MOBILEVIT_PRETRAINED_MODEL_ARCHIVE_LIST,
                  MobileViTForImageClassification,
                  MobileViTForSemanticSegmentation,
                  MobileViTModel,
                  MobileViTPreTrainedModel,
              )

       try:
              if not is_tf_available():
                     raise OptionalDependencyNotAvailable()
       except OptionalDependencyNotAvailable:
              pass
       else:
              from .modeling_tf_mobilevit import (
                  TF_MOBILEVIT_PRETRAINED_MODEL_ARCHIVE_LIST,
                  TFMobileViTForImageClassification,
                  TFMobileViTForSemanticSegmentation,
                  TFMobileViTModel,
                  TFMobileViTPreTrainedModel,
              )


else:
       import sys

       __UpperCamelCase       :       str						       =				_LazyModule(__name__, globals()["__file__"], _import_structure, module_spec=__spec__)


