


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


A       :		Tuple    =   logging.get_logger(__name__)

A       :		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 							A    (       __A							):
					'''simple docstring'''






					A__			= "speech_to_text_2"
					A__			= ["past_key_values"]
					A__			= {"num_attention_heads": "decoder_attention_heads", "hidden_size": "d_model"}

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




							"""simple docstring"""


							lowercase__     			=		vocab_size
							lowercase__     			=		d_model
							lowercase__     			=		decoder_ffn_dim
							lowercase__     			=		decoder_layers
							lowercase__     			=		decoder_attention_heads
							lowercase__     			=		dropout
							lowercase__     			=		attention_dropout
							lowercase__     			=		activation_dropout
							lowercase__     			=		activation_function
							lowercase__     			=		init_std
							lowercase__     			=		decoder_layerdrop
							lowercase__     			=		use_cache
							lowercase__     			=		decoder_layers
							lowercase__     			=		scale_embedding  # scale factor will be sqrt(d_model) if True
							lowercase__     			=		max_target_positions

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


from typing import TYPE_CHECKING

from ...utils import OptionalDependencyNotAvailable, _LazyModule, is_tf_available, is_torch_available


UpperCamelCase  							=						{
    '''configuration_groupvit''': [
        '''GROUPVIT_PRETRAINED_CONFIG_ARCHIVE_MAP''',
        '''GroupViTConfig''',
        '''GroupViTOnnxConfig''',
        '''GroupViTTextConfig''',
        '''GroupViTVisionConfig''',
    ],
}

try:
      if not is_torch_available():
            raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
      pass
else:
      UpperCamelCase  							=						[
          '''GROUPVIT_PRETRAINED_MODEL_ARCHIVE_LIST''',
          '''GroupViTModel''',
          '''GroupViTPreTrainedModel''',
          '''GroupViTTextModel''',
          '''GroupViTVisionModel''',
      ]

try:
      if not is_tf_available():
            raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
      pass
else:
      UpperCamelCase  							=						[
          '''TF_GROUPVIT_PRETRAINED_MODEL_ARCHIVE_LIST''',
          '''TFGroupViTModel''',
          '''TFGroupViTPreTrainedModel''',
          '''TFGroupViTTextModel''',
          '''TFGroupViTVisionModel''',
      ]

if TYPE_CHECKING:
      from .configuration_groupvit import (
          GROUPVIT_PRETRAINED_CONFIG_ARCHIVE_MAP,
          GroupViTConfig,
          GroupViTOnnxConfig,
          GroupViTTextConfig,
          GroupViTVisionConfig,
      )

      try:
            if not is_torch_available():
                  raise OptionalDependencyNotAvailable()
      except OptionalDependencyNotAvailable:
            pass
      else:
            from .modeling_groupvit import (
                GROUPVIT_PRETRAINED_MODEL_ARCHIVE_LIST,
                GroupViTModel,
                GroupViTPreTrainedModel,
                GroupViTTextModel,
                GroupViTVisionModel,
            )

      try:
            if not is_tf_available():
                  raise OptionalDependencyNotAvailable()
      except OptionalDependencyNotAvailable:
            pass
      else:
            from .modeling_tf_groupvit import (
                TF_GROUPVIT_PRETRAINED_MODEL_ARCHIVE_LIST,
                TFGroupViTModel,
                TFGroupViTPreTrainedModel,
                TFGroupViTTextModel,
                TFGroupViTVisionModel,
            )

else:
      import sys

      UpperCamelCase  							=						_LazyModule(__name__, globals()['''__file__'''], _import_structure, module_spec=__spec__)



