import functools
import operator

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


_lowerCAmelCase       =		logging.get_logger(__name__)

_lowerCAmelCase       =		{
    "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     lowerCAmelCase_     (       __lowercase ):
							UpperCAmelCase				   =     "unispeech-sat"







							def __init__(   self      :     List[Any] ,			_A      :     Dict=32 ,			_A      :     int=768 ,			_A      :     str=12 ,			_A      :     str=12 ,			_A      :     Any=3072 ,			_A      :     List[str]="gelu" ,			_A      :     Any=0.1 ,			_A      :     Union[str, Any]=0.1 ,			_A      :     Optional[int]=0.1 ,			_A      :     Optional[Any]=0.0 ,			_A      :     List[str]=0.0 ,			_A      :     Optional[Any]=0.1 ,			_A      :     str=0.1 ,			_A      :     List[str]=0.02 ,			_A      :     Optional[int]=1e-5 ,			_A      :     Dict="group" ,			_A      :     str="gelu" ,			_A      :     List[str]=(512, 512, 512, 512, 512, 512, 512) ,			_A      :     Any=(5, 2, 2, 2, 2, 2, 2) ,			_A      :     Dict=(10, 3, 3, 3, 3, 2, 2) ,			_A      :     Union[str, Any]=False ,			_A      :     str=128 ,			_A      :     Tuple=16 ,			_A      :     Optional[int]=False ,			_A      :     Dict=True ,			_A      :     Optional[Any]=0.05 ,			_A      :     Any=10 ,			_A      :     str=2 ,			_A      :     Dict=0.0 ,			_A      :     List[str]=10 ,			_A      :     Union[str, Any]=0 ,			_A      :     List[str]=320 ,			_A      :     List[Any]=2 ,			_A      :     Optional[Any]=0.1 ,			_A      :     Optional[Any]=100 ,			_A      :     List[str]=256 ,			_A      :     Any=256 ,			_A      :     List[Any]=0.1 ,			_A      :     Dict="mean" ,			_A      :     Dict=False ,			_A      :     List[str]=False ,			_A      :     List[Any]=256 ,			_A      :     Any=(512, 512, 512, 512, 1500) ,			_A      :     Any=(5, 3, 3, 1, 1) ,			_A      :     Dict=(1, 2, 3, 1, 1) ,			_A      :     str=512 ,			_A      :     Dict=0 ,			_A      :     List[str]=1 ,			_A      :     Tuple=2 ,			_A      :     Optional[Any]=504 ,			**_A      :     int ,			):
												super().__init__(**_A ,			pad_token_id=_A ,			bos_token_id=_A ,			eos_token_id=_A		)
												_UpperCamelCase			     =     hidden_size
												_UpperCamelCase			     =     feat_extract_norm
												_UpperCamelCase			     =     feat_extract_activation
												_UpperCamelCase			     =     list(_A		)
												_UpperCamelCase			     =     list(_A		)
												_UpperCamelCase			     =     list(_A		)
												_UpperCamelCase			     =     conv_bias
												_UpperCamelCase			     =     num_conv_pos_embeddings
												_UpperCamelCase			     =     num_conv_pos_embedding_groups
												_UpperCamelCase			     =     len(self.conv_dim		)
												_UpperCamelCase			     =     num_hidden_layers
												_UpperCamelCase			     =     intermediate_size
												_UpperCamelCase			     =     hidden_act
												_UpperCamelCase			     =     num_attention_heads
												_UpperCamelCase			     =     hidden_dropout
												_UpperCamelCase			     =     attention_dropout
												_UpperCamelCase			     =     activation_dropout
												_UpperCamelCase			     =     feat_proj_dropout
												_UpperCamelCase			     =     final_dropout
												_UpperCamelCase			     =     layerdrop
												_UpperCamelCase			     =     layer_norm_eps
												_UpperCamelCase			     =     initializer_range
												_UpperCamelCase			     =     vocab_size
												_UpperCamelCase			     =     num_clusters
												_UpperCamelCase			     =     do_stable_layer_norm
												_UpperCamelCase			     =     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
												_UpperCamelCase			     =     apply_spec_augment
												_UpperCamelCase			     =     mask_time_prob
												_UpperCamelCase			     =     mask_time_length
												_UpperCamelCase			     =     mask_time_min_masks
												_UpperCamelCase			     =     mask_feature_prob
												_UpperCamelCase			     =     mask_feature_length
												_UpperCamelCase			     =     mask_feature_min_masks

												# parameters for pretraining with codevector quantized representations
												_UpperCamelCase			     =     num_codevectors_per_group
												_UpperCamelCase			     =     num_codevector_groups
												_UpperCamelCase			     =     contrastive_logits_temperature
												_UpperCamelCase			     =     feat_quantizer_dropout
												_UpperCamelCase			     =     num_negatives
												_UpperCamelCase			     =     codevector_dim
												_UpperCamelCase			     =     proj_codevector_dim
												_UpperCamelCase			     =     diversity_loss_weight

												# ctc loss
												_UpperCamelCase			     =     ctc_loss_reduction
												_UpperCamelCase			     =     ctc_zero_infinity

												# SequenceClassification-specific parameter. Feel free to ignore for other classes.
												_UpperCamelCase			     =     classifier_proj_size

												# XVector-specific parameters. Feel free to ignore for other classes.
												_UpperCamelCase			     =     list(_A		)
												_UpperCamelCase			     =     list(_A		)
												_UpperCamelCase			     =     list(_A		)
												_UpperCamelCase			     =     xvector_output_dim







							@property
							def  UpperCamelCase_						(   self      :     List[str]		):
												return functools.reduce(operator.mul ,			self.conv_stride ,			1		)

def 					_snake_case	(  __snake_case = 100						):
					_UpperCamelCase			     =     (n * (n + 1) // 2) ** 2
					_UpperCamelCase			     =     n * (n + 1) * (2 * n + 1) // 6
					return sum_cubes - sum_squares


if __name__ == "__main__":
					print(f'{solution() = }')
