


"""simple docstring"""






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


__snake_case		=       logging.get_logger(__name__)

__snake_case		=       {
    '''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     __lowerCamelCase  (					a__				):

     '''simple docstring'''
     A_       :	Optional[int]    =		'speech_to_text_2'
     A_       :	Optional[int]    =		['past_key_values']
     A_       :	Optional[Any]    =		{'num_attention_heads': 'decoder_attention_heads', 'hidden_size': 'd_model'}


     def __init__(      self    ,				__UpperCAmelCase=10000    ,				__UpperCAmelCase=6    ,				__UpperCAmelCase=2048    ,				__UpperCAmelCase=4    ,				__UpperCAmelCase=0.0    ,				__UpperCAmelCase=True    ,				__UpperCAmelCase="relu"    ,				__UpperCAmelCase=256    ,				__UpperCAmelCase=0.1    ,				__UpperCAmelCase=0.0    ,				__UpperCAmelCase=0.0    ,				__UpperCAmelCase=0.02    ,				__UpperCAmelCase=2    ,				__UpperCAmelCase=True    ,				__UpperCAmelCase=1    ,				__UpperCAmelCase=0    ,				__UpperCAmelCase=2    ,				__UpperCAmelCase=1024    ,				**__UpperCAmelCase    ,				)       ->							str:
          _a    	=				vocab_size
          _a    	=				d_model
          _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    	=				decoder_layerdrop
          _a    	=				use_cache
          _a    	=				decoder_layers
          _a    	=				scale_embedding  # scale factor will be sqrt(d_model) if True
          _a    	=				max_target_positions

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



"""simple docstring"""






from typing import TYPE_CHECKING

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


__snake_case		=       {
    '''configuration_lxmert''': ['''LXMERT_PRETRAINED_CONFIG_ARCHIVE_MAP''', '''LxmertConfig'''],
    '''tokenization_lxmert''': ['''LxmertTokenizer'''],
}

try:
   if not is_tokenizers_available():
      raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
   pass
else:
   __snake_case		=       ['''LxmertTokenizerFast''']

try:
   if not is_torch_available():
      raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
   pass
else:
   __snake_case		=       [
       '''LxmertEncoder''',
       '''LxmertForPreTraining''',
       '''LxmertForQuestionAnswering''',
       '''LxmertModel''',
       '''LxmertPreTrainedModel''',
       '''LxmertVisualFeatureEncoder''',
       '''LxmertXLayer''',
   ]

try:
   if not is_tf_available():
      raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
   pass
else:
   __snake_case		=       [
       '''TF_LXMERT_PRETRAINED_MODEL_ARCHIVE_LIST''',
       '''TFLxmertForPreTraining''',
       '''TFLxmertMainLayer''',
       '''TFLxmertModel''',
       '''TFLxmertPreTrainedModel''',
       '''TFLxmertVisualFeatureEncoder''',
   ]


if TYPE_CHECKING:
   from .configuration_lxmert import LXMERT_PRETRAINED_CONFIG_ARCHIVE_MAP, LxmertConfig
   from .tokenization_lxmert import LxmertTokenizer

   try:
      if not is_tokenizers_available():
         raise OptionalDependencyNotAvailable()
   except OptionalDependencyNotAvailable:
      pass
   else:
      from .tokenization_lxmert_fast import LxmertTokenizerFast

   try:
      if not is_torch_available():
         raise OptionalDependencyNotAvailable()
   except OptionalDependencyNotAvailable:
      pass
   else:
      from .modeling_lxmert import (
          LxmertEncoder,
          LxmertForPreTraining,
          LxmertForQuestionAnswering,
          LxmertModel,
          LxmertPreTrainedModel,
          LxmertVisualFeatureEncoder,
          LxmertXLayer,
      )

   try:
      if not is_tf_available():
         raise OptionalDependencyNotAvailable()
   except OptionalDependencyNotAvailable:
      pass
   else:
      from .modeling_tf_lxmert import (
          TF_LXMERT_PRETRAINED_MODEL_ARCHIVE_LIST,
          TFLxmertForPreTraining,
          TFLxmertMainLayer,
          TFLxmertModel,
          TFLxmertPreTrainedModel,
          TFLxmertVisualFeatureEncoder,
      )

else:
   import sys

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