

"""simple docstring"""


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


UpperCAmelCase													=logging.get_logger(__name__)

UpperCAmelCase													={
    "facebook/s2t-small-librispeech-asr": (
        "https://huggingface.co/facebook/s2t-small-librispeech-asr/resolve/main/config.json"
    ),
    # See all Speech2Text models at https://huggingface.co/models?filter=speech_to_text
}





class lowerCamelCase__   (				SCREAMING_SNAKE_CASE    ):



    '''simple docstring'''




    _lowerCamelCase					=   '''speech_to_text'''
    _lowerCamelCase					=   ['''past_key_values''']
    _lowerCamelCase					=   {'''num_attention_heads''': '''encoder_attention_heads''', '''hidden_size''': '''d_model'''}




    def __init__( self ,lowerCamelCase_=1_0_0_0_0 ,lowerCamelCase_=1_2 ,lowerCamelCase_=2_0_4_8 ,lowerCamelCase_=4 ,lowerCamelCase_=6 ,lowerCamelCase_=2_0_4_8 ,lowerCamelCase_=4 ,lowerCamelCase_=0.0 ,lowerCamelCase_=0.0 ,lowerCamelCase_=True ,lowerCamelCase_=True ,lowerCamelCase_="relu" ,lowerCamelCase_=2_5_6 ,lowerCamelCase_=0.1 ,lowerCamelCase_=0.0 ,lowerCamelCase_=0.0 ,lowerCamelCase_=0.02 ,lowerCamelCase_=2 ,lowerCamelCase_=True ,lowerCamelCase_=1 ,lowerCamelCase_=0 ,lowerCamelCase_=2 ,lowerCamelCase_=6_0_0_0 ,lowerCamelCase_=1_0_2_4 ,lowerCamelCase_=2 ,lowerCamelCase_=(5, 5) ,lowerCamelCase_=1_0_2_4 ,lowerCamelCase_=8_0 ,lowerCamelCase_=1 ,**lowerCamelCase_ ,)    ->      List[str]:
          A				  =		vocab_size
          A				  =		d_model
          A				  =		encoder_ffn_dim
          A				  =		encoder_layers
          A				  =		encoder_attention_heads
          A				  =		decoder_ffn_dim
          A				  =		decoder_layers
          A				  =		decoder_attention_heads
          A				  =		dropout
          A				  =		attention_dropout
          A				  =		activation_dropout
          A				  =		activation_function
          A				  =		init_std
          A				  =		encoder_layerdrop
          A				  =		decoder_layerdrop
          A				  =		use_cache
          A				  =		encoder_layers
          A				  =		scale_embedding  # scale factor will be sqrt(d_model) if True
          A				  =		max_source_positions
          A				  =		max_target_positions
          A				  =		num_conv_layers
          A				  =		list(lowerCamelCase_    )
          A				  =		conv_channels
          A				  =		input_feat_per_channel
          A				  =		input_channels

          if len(self.conv_kernel_sizes    ) != self.num_conv_layers:
                raise ValueError(
                    """Configuration for convolutional module is incorrect. """
                    """It is required that `len(config.conv_kernel_sizes)` == `config.num_conv_layers` """
                    f'but is `len(config.conv_kernel_sizes) = {len(self.conv_kernel_sizes    )}`, '
                    f'`config.num_conv_layers = {self.num_conv_layers}`.'    )

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







"""simple docstring"""


from typing import TYPE_CHECKING

# rely on isort to merge the imports
from ...utils import OptionalDependencyNotAvailable, _LazyModule, is_torch_available


UpperCAmelCase													={
    "configuration_informer": [
        "INFORMER_PRETRAINED_CONFIG_ARCHIVE_MAP",
        "InformerConfig",
    ],
}

try:
  if not is_torch_available():
    raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
  pass
else:
  UpperCAmelCase													=[
      "INFORMER_PRETRAINED_MODEL_ARCHIVE_LIST",
      "InformerForPrediction",
      "InformerModel",
      "InformerPreTrainedModel",
  ]


if TYPE_CHECKING:
  from .configuration_informer import INFORMER_PRETRAINED_CONFIG_ARCHIVE_MAP, InformerConfig

  try:
    if not is_torch_available():
      raise OptionalDependencyNotAvailable()
  except OptionalDependencyNotAvailable:
    pass
  else:
    from .modeling_informer import (
        INFORMER_PRETRAINED_MODEL_ARCHIVE_LIST,
        InformerForPrediction,
        InformerModel,
        InformerPreTrainedModel,
    )

else:
  import sys

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




