

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


lowerCamelCase           =					logging.get_logger(__name__)

lowerCamelCase           =					{
    '''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 						__magic_name__			(							lowerCamelCase__							):

   '''simple docstring'''




   lowerCamelCase__ :	Dict    =   'speech_to_text'
   lowerCamelCase__ :	str    =   ['past_key_values']
   lowerCamelCase__ :	List[str]    =   {'num_attention_heads': 'encoder_attention_heads', 'hidden_size': 'd_model'}



   def __init__(				self,    lowercase_=10000,    lowercase_=12,    lowercase_=2048,    lowercase_=4,    lowercase_=6,    lowercase_=2048,    lowercase_=4,    lowercase_=0.0,    lowercase_=0.0,    lowercase_=True,    lowercase_=True,    lowercase_="relu",    lowercase_=256,    lowercase_=0.1,    lowercase_=0.0,    lowercase_=0.0,    lowercase_=0.02,    lowercase_=2,    lowercase_=True,    lowercase_=1,    lowercase_=0,    lowercase_=2,    lowercase_=6000,    lowercase_=1024,    lowercase_=2,    lowercase_=(5, 5),    lowercase_=1024,    lowercase_=80,    lowercase_=1,    **lowercase_,    )							->    Any:






     """simple docstring"""






     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(lowercase_       )
     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=lowercase_,    bos_token_id=lowercase_,    eos_token_id=lowercase_,    is_encoder_decoder=lowercase_,    decoder_start_token_id=lowercase_,    **lowercase_,    )



from typing import TYPE_CHECKING

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


lowerCamelCase           =					{
    '''configuration_canine''': ['''CANINE_PRETRAINED_CONFIG_ARCHIVE_MAP''', '''CanineConfig'''],
    '''tokenization_canine''': ['''CanineTokenizer'''],
}

try:
       if not is_torch_available():
              raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
       pass
else:
       lowerCamelCase           =					[
           '''CANINE_PRETRAINED_MODEL_ARCHIVE_LIST''',
           '''CanineForMultipleChoice''',
           '''CanineForQuestionAnswering''',
           '''CanineForSequenceClassification''',
           '''CanineForTokenClassification''',
           '''CanineLayer''',
           '''CanineModel''',
           '''CaninePreTrainedModel''',
           '''load_tf_weights_in_canine''',
       ]


if TYPE_CHECKING:
       from .configuration_canine import CANINE_PRETRAINED_CONFIG_ARCHIVE_MAP, CanineConfig
       from .tokenization_canine import CanineTokenizer

       try:
              if not is_torch_available():
                     raise OptionalDependencyNotAvailable()
       except OptionalDependencyNotAvailable:
              pass
       else:
              from .modeling_canine import (
                  CANINE_PRETRAINED_MODEL_ARCHIVE_LIST,
                  CanineForMultipleChoice,
                  CanineForQuestionAnswering,
                  CanineForSequenceClassification,
                  CanineForTokenClassification,
                  CanineLayer,
                  CanineModel,
                  CaninePreTrainedModel,
                  load_tf_weights_in_canine,
              )


else:
       import sys

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