





import functools
import operator

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


_SCREAMING_SNAKE_CASE 		=						logging.get_logger(__name__)

_SCREAMING_SNAKE_CASE 		=						{
    """microsoft/unispeech-sat-base-100h-libri-ft""": (
        """https://huggingface.co/microsoft/unispeech-sat-base-100h-libri-ft/resolve/main/config.json"""
    ),
    # See all UniSpeechSat models at https://huggingface.co/models?filter=unispeech_sat
}
class SCREAMING_SNAKE_CASE_  (   snake_case_   ):
						__magic_name__:     int	 =    "unispeech-sat"






						def __init__( self : List[str]						,				_A : Optional[int]=32						,				_A : List[Any]=768						,				_A : Any=12						,				_A : Union[str, Any]=12						,				_A : Any=3072						,				_A : Optional[int]="gelu"						,				_A : Dict=0.1						,				_A : Union[str, Any]=0.1						,				_A : Any=0.1						,				_A : Dict=0.0						,				_A : Tuple=0.0						,				_A : Dict=0.1						,				_A : Dict=0.1						,				_A : Union[str, Any]=0.0_2						,				_A : Any=1E-5						,				_A : List[str]="group"						,				_A : Union[str, Any]="gelu"						,				_A : Optional[Any]=(512, 512, 512, 512, 512, 512, 512)						,				_A : Tuple=(5, 2, 2, 2, 2, 2, 2)						,				_A : Any=(10, 3, 3, 3, 3, 2, 2)						,				_A : Optional[Any]=False						,				_A : Optional[Any]=128						,				_A : List[str]=16						,				_A : str=False						,				_A : Union[str, Any]=True						,				_A : List[str]=0.0_5						,				_A : Dict=10						,				_A : List[Any]=2						,				_A : Union[str, Any]=0.0						,				_A : Dict=10						,				_A : Tuple=0						,				_A : Union[str, Any]=320						,				_A : Union[str, Any]=2						,				_A : Tuple=0.1						,				_A : Dict=100						,				_A : List[Any]=256						,				_A : List[str]=256						,				_A : Union[str, Any]=0.1						,				_A : Union[str, Any]="mean"						,				_A : str=False						,				_A : Union[str, Any]=False						,				_A : str=256						,				_A : int=(512, 512, 512, 512, 1500)						,				_A : int=(5, 3, 3, 1, 1)						,				_A : Dict=(1, 2, 3, 1, 1)						,				_A : Any=512						,				_A : List[str]=0						,				_A : List[str]=1						,				_A : Tuple=2						,				_A : str=504						,				**_A : str						,				)							->      Optional[Any]:







							"""simple docstring"""


							super().__init__(**_A						,				pad_token_id=_A						,				bos_token_id=_A						,				eos_token_id=_A		)
							snake_case_						:     Tuple     =		hidden_size
							snake_case_						:     Tuple     =		feat_extract_norm
							snake_case_						:     Optional[Any]     =		feat_extract_activation
							snake_case_						:     Union[str, Any]     =		list(_A		)
							snake_case_						:     int     =		list(_A		)
							snake_case_						:     Optional[Any]     =		list(_A		)
							snake_case_						:     Dict     =		conv_bias
							snake_case_						:     Dict     =		num_conv_pos_embeddings
							snake_case_						:     Dict     =		num_conv_pos_embedding_groups
							snake_case_						:     Optional[Any]     =		len(self.conv_dim		)
							snake_case_						:     int     =		num_hidden_layers
							snake_case_						:     Optional[int]     =		intermediate_size
							snake_case_						:     Any     =		hidden_act
							snake_case_						:     List[str]     =		num_attention_heads
							snake_case_						:     List[Any]     =		hidden_dropout
							snake_case_						:     str     =		attention_dropout
							snake_case_						:     int     =		activation_dropout
							snake_case_						:     Optional[Any]     =		feat_proj_dropout
							snake_case_						:     Optional[int]     =		final_dropout
							snake_case_						:     str     =		layerdrop
							snake_case_						:     int     =		layer_norm_eps
							snake_case_						:     Dict     =		initializer_range
							snake_case_						:     Optional[int]     =		vocab_size
							snake_case_						:     Optional[Any]     =		num_clusters
							snake_case_						:     List[str]     =		do_stable_layer_norm
							snake_case_						:     Dict     =		use_weighted_layer_sum

							if (
							    (len(self.conv_stride		) != self.num_feat_extract_layers)
							    or (len(self.conv_kernel		) != self.num_feat_extract_layers)
							    or (len(self.conv_dim		) != self.num_feat_extract_layers)
							):
								raise ValueError(
								    'Configuration for convolutional layers is incorrect. It is required that `len(config.conv_dim)` =='
								    ' `len(config.conv_stride)` == `len(config.conv_kernel)`, but is `len(config.conv_dim) ='
								    F""" {len(self.conv_dim		)}`, `len(config.conv_stride) = {len(self.conv_stride		)}`,"""
								    F""" `len(config.conv_kernel) = {len(self.conv_kernel		)}`."""		)

							# fine-tuning config parameters for SpecAugment: https://arxiv.org/abs/1904.08779
							snake_case_						:     Tuple     =		apply_spec_augment
							snake_case_						:     Tuple     =		mask_time_prob
							snake_case_						:     str     =		mask_time_length
							snake_case_						:     Union[str, Any]     =		mask_time_min_masks
							snake_case_						:     Any     =		mask_feature_prob
							snake_case_						:     Optional[Any]     =		mask_feature_length
							snake_case_						:     Dict     =		mask_feature_min_masks

							# parameters for pretraining with codevector quantized representations
							snake_case_						:     Dict     =		num_codevectors_per_group
							snake_case_						:     List[str]     =		num_codevector_groups
							snake_case_						:     Union[str, Any]     =		contrastive_logits_temperature
							snake_case_						:     Union[str, Any]     =		feat_quantizer_dropout
							snake_case_						:     Union[str, Any]     =		num_negatives
							snake_case_						:     Optional[Any]     =		codevector_dim
							snake_case_						:     Dict     =		proj_codevector_dim
							snake_case_						:     Optional[Any]     =		diversity_loss_weight

							# ctc loss
							snake_case_						:     Optional[Any]     =		ctc_loss_reduction
							snake_case_						:     Union[str, Any]     =		ctc_zero_infinity

							# SequenceClassification-specific parameter. Feel free to ignore for other classes.
							snake_case_						:     Dict     =		classifier_proj_size

							# XVector-specific parameters. Feel free to ignore for other classes.
							snake_case_						:     Dict     =		list(_A		)
							snake_case_						:     Union[str, Any]     =		list(_A		)
							snake_case_						:     str     =		list(_A		)
							snake_case_						:     Optional[Any]     =		xvector_output_dim






						@property
						def UpperCAmelCase_			( self : str		)							->      Optional[int]:







							"""simple docstring"""


							return functools.reduce(operator.mul						,				self.conv_stride						,				1		)








_SCREAMING_SNAKE_CASE 		=						{
    """Pillow""": """Pillow""",
    """accelerate""": """accelerate>=0.11.0""",
    """compel""": """compel==0.1.8""",
    """black""": """black~=23.1""",
    """datasets""": """datasets""",
    """filelock""": """filelock""",
    """flax""": """flax>=0.4.1""",
    """hf-doc-builder""": """hf-doc-builder>=0.3.0""",
    """huggingface-hub""": """huggingface-hub>=0.13.2""",
    """requests-mock""": """requests-mock==1.10.0""",
    """importlib_metadata""": """importlib_metadata""",
    """invisible-watermark""": """invisible-watermark""",
    """isort""": """isort>=5.5.4""",
    """jax""": """jax>=0.2.8,!=0.3.2""",
    """jaxlib""": """jaxlib>=0.1.65""",
    """Jinja2""": """Jinja2""",
    """k-diffusion""": """k-diffusion>=0.0.12""",
    """torchsde""": """torchsde""",
    """note_seq""": """note_seq""",
    """librosa""": """librosa""",
    """numpy""": """numpy""",
    """omegaconf""": """omegaconf""",
    """parameterized""": """parameterized""",
    """protobuf""": """protobuf>=3.20.3,<4""",
    """pytest""": """pytest""",
    """pytest-timeout""": """pytest-timeout""",
    """pytest-xdist""": """pytest-xdist""",
    """ruff""": """ruff>=0.0.241""",
    """safetensors""": """safetensors""",
    """sentencepiece""": """sentencepiece>=0.1.91,!=0.1.92""",
    """scipy""": """scipy""",
    """onnx""": """onnx""",
    """regex""": """regex!=2019.12.17""",
    """requests""": """requests""",
    """tensorboard""": """tensorboard""",
    """torch""": """torch>=1.4""",
    """torchvision""": """torchvision""",
    """transformers""": """transformers>=4.25.1""",
    """urllib3""": """urllib3<=2.0.0""",
}

