'''simple docstring'''




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


_lowercase		:				int	       =		logging.get_logger(__name__)

_lowercase		:				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 					__magic_name__		(					__a):
   UpperCamelCase__       = "mctct"







   def __init__(			self       :						Tuple       ,    lowercase_       :						Optional[int]=8065       ,    lowercase_       :						int=1536       ,    lowercase_       :						Optional[Any]=36       ,    lowercase_       :						Optional[int]=6144       ,    lowercase_       :						Optional[Any]=4       ,    lowercase_       :						int=384       ,    lowercase_       :						Union[str, Any]=920       ,    lowercase_       :						Any=1E-5       ,    lowercase_       :						int=0.3       ,    lowercase_       :						Any="relu"       ,    lowercase_       :						List[Any]=0.02       ,    lowercase_       :						int=0.3       ,    lowercase_       :						Any=0.3       ,    lowercase_       :						Optional[Any]=1       ,    lowercase_       :						List[Any]=0       ,    lowercase_       :						Union[str, Any]=2       ,    lowercase_       :						Dict=1       ,    lowercase_       :						Tuple=0.3       ,    lowercase_       :						List[str]=1       ,    lowercase_       :						Optional[Any]=(7,)       ,    lowercase_       :						Optional[int]=(3,)       ,    lowercase_       :						str=80       ,    lowercase_       :						int=1       ,    lowercase_       :						Any=None       ,    lowercase_       :						Optional[Any]="sum"       ,    lowercase_       :						Optional[int]=False       ,    **lowercase_       :						Any       ,    ):
          super().__init__(**lowerCAmelCase_       ,    pad_token_id=lowerCAmelCase_       ,    bos_token_id=lowerCAmelCase_       ,    eos_token_id=lowerCAmelCase_					)
          lowercase_      :    Tuple       		= vocab_size
          lowercase_      :    Tuple       		= hidden_size
          lowercase_      :    Optional[Any]       		= num_hidden_layers
          lowercase_      :    List[Any]       		= intermediate_size
          lowercase_      :    Union[str, Any]       		= num_attention_heads
          lowercase_      :    List[str]       		= attention_head_dim
          lowercase_      :    Optional[Any]       		= max_position_embeddings
          lowercase_      :    Optional[int]       		= layer_norm_eps
          lowercase_      :    Any       		= layerdrop
          lowercase_      :    Tuple       		= hidden_act
          lowercase_      :    List[str]       		= initializer_range
          lowercase_      :    Optional[Any]       		= hidden_dropout_prob
          lowercase_      :    List[Any]       		= attention_probs_dropout_prob
          lowercase_      :    Dict       		= pad_token_id
          lowercase_      :    List[str]       		= bos_token_id
          lowercase_      :    Dict       		= eos_token_id
          lowercase_      :    Optional[int]       		= conv_glu_dim
          lowercase_      :    int       		= conv_dropout
          lowercase_      :    Dict       		= num_conv_layers
          lowercase_      :    List[str]       		= input_feat_per_channel
          lowercase_      :    int       		= input_channels
          lowercase_      :    Optional[Any]       		= conv_channels
          lowercase_      :    List[str]       		= ctc_loss_reduction
          lowercase_      :    int       		= ctc_zero_infinity

          # prevents config testing fail with exporting to json
          lowercase_      :    Union[str, Any]       		= list(lowerCAmelCase_					)
          lowercase_      :    List[Any]       		= 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 __future__ import annotations




def 							lowerCamelCase			(   UpperCAmelCase__ :      list   ,   UpperCAmelCase__ :      int | None = None   ,   UpperCAmelCase__ :      int | None = None				)    ->   None:
							if start is None:
														lowercase_      :    Any       		= 0

							if end is None:
														lowercase_      :    List[Any]       		= len(UpperCAmelCase__				) - 1

							if start >= end:
														return

							lowercase_      :    Optional[int]       		= (start + end) // 2

							slowsort(UpperCAmelCase__   ,   UpperCAmelCase__   ,   UpperCAmelCase__				)
							slowsort(UpperCAmelCase__   ,   mid + 1   ,   UpperCAmelCase__				)

							if sequence[end] < sequence[mid]:
														lowercase_		,		lowercase_      :    Dict       		= sequence[mid], sequence[end]

							slowsort(UpperCAmelCase__   ,   UpperCAmelCase__   ,   end - 1				)


if __name__ == "__main__":
						from doctest import testmod

						testmod()





