






'''simple docstring'''





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


_UpperCamelCase		:		Dict            = logging.get_logger(__name__)

_UpperCamelCase		:		List[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__	( UpperCamelCase):
					a_								= "mctct"




					def __init__(   self   :						Tuple							,      _A   :						Optional[Any]=80_65							,      _A   :						Dict=15_36							,      _A   :						Optional[int]=36							,      _A   :						Any=61_44							,      _A   :						Tuple=4							,      _A   :						str=3_84							,      _A   :						Tuple=9_20							,      _A   :						Tuple=1e-5							,      _A   :						Any=0.3							,      _A   :						List[str]="relu"							,      _A   :						Union[str, Any]=0.02							,      _A   :						str=0.3							,      _A   :						Tuple=0.3							,      _A   :						Dict=1							,      _A   :						Tuple=0							,      _A   :						Optional[Any]=2							,      _A   :						int=1							,      _A   :						Optional[int]=0.3							,      _A   :						Dict=1							,      _A   :						Optional[Any]=(7,)							,      _A   :						List[Any]=(3,)							,      _A   :						Union[str, Any]=80							,      _A   :						int=1							,      _A   :						Optional[Any]=None							,      _A   :						Dict="sum"							,      _A   :						Dict=False							,      **_A   :						Optional[int]							,      )  ->				Dict:
								super().__init__(**_A							,      pad_token_id=_A							,      bos_token_id=_A							,      eos_token_id=_A	)
								UpperCAmelCase_	:    List[Any]	  =    vocab_size
								UpperCAmelCase_	:    Dict	  =    hidden_size
								UpperCAmelCase_	:    List[str]	  =    num_hidden_layers
								UpperCAmelCase_	:    str	  =    intermediate_size
								UpperCAmelCase_	:    Optional[Any]	  =    num_attention_heads
								UpperCAmelCase_	:    List[Any]	  =    attention_head_dim
								UpperCAmelCase_	:    Optional[int]	  =    max_position_embeddings
								UpperCAmelCase_	:    int	  =    layer_norm_eps
								UpperCAmelCase_	:    Union[str, Any]	  =    layerdrop
								UpperCAmelCase_	:    Tuple	  =    hidden_act
								UpperCAmelCase_	:    Dict	  =    initializer_range
								UpperCAmelCase_	:    Optional[int]	  =    hidden_dropout_prob
								UpperCAmelCase_	:    Optional[Any]	  =    attention_probs_dropout_prob
								UpperCAmelCase_	:    Optional[Any]	  =    pad_token_id
								UpperCAmelCase_	:    Union[str, Any]	  =    bos_token_id
								UpperCAmelCase_	:    int	  =    eos_token_id
								UpperCAmelCase_	:    List[Any]	  =    conv_glu_dim
								UpperCAmelCase_	:    int	  =    conv_dropout
								UpperCAmelCase_	:    Optional[Any]	  =    num_conv_layers
								UpperCAmelCase_	:    Optional[int]	  =    input_feat_per_channel
								UpperCAmelCase_	:    Tuple	  =    input_channels
								UpperCAmelCase_	:    Tuple	  =    conv_channels
								UpperCAmelCase_	:    Tuple	  =    ctc_loss_reduction
								UpperCAmelCase_	:    Optional[Any]	  =    ctc_zero_infinity

								# prevents config testing fail with exporting to json
								UpperCAmelCase_	:    Optional[Any]	  =    list(_A	)
								UpperCAmelCase_	:    List[str]	  =    list(_A	)

								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_sentencepiece_available,
    is_tf_available,
    is_tokenizers_available,
    is_torch_available,
)


lowercase_									=   {'configuration_xlnet': ['XLNET_PRETRAINED_CONFIG_ARCHIVE_MAP', 'XLNetConfig']}

try:
  if not is_sentencepiece_available():
    raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
  pass
else:
  lowercase_									=   ['XLNetTokenizer']

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

try:
  if not is_torch_available():
    raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
  pass
else:
  lowercase_									=   [
      'XLNET_PRETRAINED_MODEL_ARCHIVE_LIST',
      'XLNetForMultipleChoice',
      'XLNetForQuestionAnswering',
      'XLNetForQuestionAnsweringSimple',
      'XLNetForSequenceClassification',
      'XLNetForTokenClassification',
      'XLNetLMHeadModel',
      'XLNetModel',
      'XLNetPreTrainedModel',
      'load_tf_weights_in_xlnet',
  ]

try:
  if not is_tf_available():
    raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
  pass
else:
  lowercase_									=   [
      'TF_XLNET_PRETRAINED_MODEL_ARCHIVE_LIST',
      'TFXLNetForMultipleChoice',
      'TFXLNetForQuestionAnsweringSimple',
      'TFXLNetForSequenceClassification',
      'TFXLNetForTokenClassification',
      'TFXLNetLMHeadModel',
      'TFXLNetMainLayer',
      'TFXLNetModel',
      'TFXLNetPreTrainedModel',
  ]


if TYPE_CHECKING:
  from .configuration_xlnet import XLNET_PRETRAINED_CONFIG_ARCHIVE_MAP, XLNetConfig

  try:
    if not is_sentencepiece_available():
      raise OptionalDependencyNotAvailable()
  except OptionalDependencyNotAvailable:
    pass
  else:
    from .tokenization_xlnet import XLNetTokenizer

  try:
    if not is_tokenizers_available():
      raise OptionalDependencyNotAvailable()
  except OptionalDependencyNotAvailable:
    pass
  else:
    from .tokenization_xlnet_fast import XLNetTokenizerFast

  try:
    if not is_torch_available():
      raise OptionalDependencyNotAvailable()
  except OptionalDependencyNotAvailable:
    pass
  else:
    from .modeling_xlnet import (
        XLNET_PRETRAINED_MODEL_ARCHIVE_LIST,
        XLNetForMultipleChoice,
        XLNetForQuestionAnswering,
        XLNetForQuestionAnsweringSimple,
        XLNetForSequenceClassification,
        XLNetForTokenClassification,
        XLNetLMHeadModel,
        XLNetModel,
        XLNetPreTrainedModel,
        load_tf_weights_in_xlnet,
    )

  try:
    if not is_tf_available():
      raise OptionalDependencyNotAvailable()
  except OptionalDependencyNotAvailable:
    pass
  else:
    from .modeling_tf_xlnet import (
        TF_XLNET_PRETRAINED_MODEL_ARCHIVE_LIST,
        TFXLNetForMultipleChoice,
        TFXLNetForQuestionAnsweringSimple,
        TFXLNetForSequenceClassification,
        TFXLNetForTokenClassification,
        TFXLNetLMHeadModel,
        TFXLNetMainLayer,
        TFXLNetModel,
        TFXLNetPreTrainedModel,
    )

else:
  import sys

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


