


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


snake_case							:       Optional[int]     			=      logging.get_logger(__name__)

snake_case							:       Union[str, Any]     			=      {
    '''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        snake_case_   (lowerCamelCase_      ):
					UpperCAmelCase__					:    List[Any]          =			'''mctct'''
					def __init__(      self   :Optional[int]			,__snake_case   :Union[str, Any]=80_65			,__snake_case   :str=15_36			,__snake_case   :Optional[Any]=36			,__snake_case   :Any=61_44			,__snake_case   :List[str]=4			,__snake_case   :Optional[int]=3_84			,__snake_case   :Optional[Any]=9_20			,__snake_case   :Union[str, Any]=1E-5			,__snake_case   :Tuple=0.3			,__snake_case   :List[Any]="relu"			,__snake_case   :Union[str, Any]=0.02			,__snake_case   :Any=0.3			,__snake_case   :List[str]=0.3			,__snake_case   :Optional[int]=1			,__snake_case   :Dict=0			,__snake_case   :Union[str, Any]=2			,__snake_case   :List[Any]=1			,__snake_case   :List[Any]=0.3			,__snake_case   :Any=1			,__snake_case   :Tuple=(7,)			,__snake_case   :Union[str, Any]=(3,)			,__snake_case   :str=80			,__snake_case   :str=1			,__snake_case   :int=None			,__snake_case   :Tuple="sum"			,__snake_case   :str=False			,**__snake_case   :str			,)					->    Union[str, Any]:
												super().__init__(**__snake_case			,pad_token_id=__snake_case			,bos_token_id=__snake_case			,eos_token_id=__snake_case      )
												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(__snake_case      )
												a__             =     list(__snake_case      )

												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}`.'      )








from typing import TYPE_CHECKING

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


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

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

try:
						if not is_tf_available():
												raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
						pass
else:
						snake_case							:       Optional[int]     			=      [
						    '''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

						snake_case							:       int     			=      _LazyModule(__name__, globals()['''__file__'''], _import_structure, module_spec=__spec__)




