



'''simple docstring'''


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


lowercase							       =			logging.get_logger(__name__)

lowercase							       =			{
    '''speechbrain/m-ctc-t-large''': '''https://huggingface.co/speechbrain/m-ctc-t-large/resolve/main/config.json''',
    # See all M-CTC-T models at https://huggingface.co/models?filter=mctct
}







class 	UpperCAmelCase	(		__a):


 '''simple docstring'''




 __magic_name__					: Tuple  =      "mctct"




 def __init__(   self							,  lowerCAmelCase_=8_0_6_5							,  lowerCAmelCase_=1_5_3_6							,  lowerCAmelCase_=3_6							,  lowerCAmelCase_=6_1_4_4							,  lowerCAmelCase_=4							,  lowerCAmelCase_=3_8_4							,  lowerCAmelCase_=9_2_0							,  lowerCAmelCase_=1e-5							,  lowerCAmelCase_=0.3							,  lowerCAmelCase_="relu"							,  lowerCAmelCase_=0.0_2							,  lowerCAmelCase_=0.3							,  lowerCAmelCase_=0.3							,  lowerCAmelCase_=1							,  lowerCAmelCase_=0							,  lowerCAmelCase_=2							,  lowerCAmelCase_=1							,  lowerCAmelCase_=0.3							,  lowerCAmelCase_=1							,  lowerCAmelCase_=(7,)							,  lowerCAmelCase_=(3,)							,  lowerCAmelCase_=8_0							,  lowerCAmelCase_=1							,  lowerCAmelCase_=None							,  lowerCAmelCase_="sum"							,  lowerCAmelCase_=False							,  **lowerCAmelCase_							,  ) ->      List[Any]:



      """simple docstring"""







      super().__init__(**lowerCAmelCase_							,  pad_token_id=lowerCAmelCase_							,  bos_token_id=lowerCAmelCase_							,  eos_token_id=lowerCAmelCase_)
      a_       		=vocab_size
      a_       		=hidden_size
      a_       		=num_hidden_layers
      a_       		=intermediate_size
      a_       		=num_attention_heads
      a_       		=attention_head_dim
      a_       		=max_position_embeddings
      a_       		=layer_norm_eps
      a_       		=layerdrop
      a_       		=hidden_act
      a_       		=initializer_range
      a_       		=hidden_dropout_prob
      a_       		=attention_probs_dropout_prob
      a_       		=pad_token_id
      a_       		=bos_token_id
      a_       		=eos_token_id
      a_       		=conv_glu_dim
      a_       		=conv_dropout
      a_       		=num_conv_layers
      a_       		=input_feat_per_channel
      a_       		=input_channels
      a_       		=conv_channels
      a_       		=ctc_loss_reduction
      a_       		=ctc_zero_infinity

      # prevents config testing fail with exporting to json
      a_       		=list(lowerCAmelCase_)
      a_       		=list(lowerCAmelCase_)

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







'''simple docstring'''


from typing import TYPE_CHECKING

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


lowercase							       =			{
    '''configuration_rag''': ['''RagConfig'''],
    '''retrieval_rag''': ['''RagRetriever'''],
    '''tokenization_rag''': ['''RagTokenizer'''],
}

try:
  if not is_torch_available():
    raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
  pass
else:
  lowercase							       =			[
      '''RagModel''',
      '''RagPreTrainedModel''',
      '''RagSequenceForGeneration''',
      '''RagTokenForGeneration''',
  ]

try:
  if not is_tf_available():
    raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
  pass
else:
  lowercase							       =			[
      '''TFRagModel''',
      '''TFRagPreTrainedModel''',
      '''TFRagSequenceForGeneration''',
      '''TFRagTokenForGeneration''',
  ]


if TYPE_CHECKING:
  from .configuration_rag import RagConfig
  from .retrieval_rag import RagRetriever
  from .tokenization_rag import RagTokenizer

  try:
    if not is_torch_available():
      raise OptionalDependencyNotAvailable()
  except OptionalDependencyNotAvailable:
    pass
  else:
    from .modeling_rag import RagModel, RagPreTrainedModel, RagSequenceForGeneration, RagTokenForGeneration

  try:
    if not is_tf_available():
      raise OptionalDependencyNotAvailable()
  except OptionalDependencyNotAvailable:
    pass
  else:
    from .modeling_tf_rag import (
        TFRagModel,
        TFRagPreTrainedModel,
        TFRagSequenceForGeneration,
        TFRagTokenForGeneration,
    )

else:
  import sys

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


