import functools
import operator

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


__lowerCamelCase    :				str							     =	logging.get_logger(__name__)

__lowerCamelCase    :				Any							     =	{
    '''microsoft/unispeech-large-1500h-cv''': (
        '''https://huggingface.co/microsoft/unispeech-large-1500h-cv/resolve/main/config.json'''
    ),
    # See all UniSpeech models at https://huggingface.co/models?filter=unispeech
}







class __snake_case       (		lowerCamelCase_	):
   lowerCAmelCase_														=							"unispeech"




   def __init__(					self    :       Dict ,			_lowercase    :       Optional[int]=32 ,			_lowercase    :       Tuple=7_68 ,			_lowercase    :       Optional[Any]=12 ,			_lowercase    :       Dict=12 ,			_lowercase    :       Tuple=30_72 ,			_lowercase    :       str="gelu" ,			_lowercase    :       str=0.1 ,			_lowercase    :       Any=0.1 ,			_lowercase    :       int=0.1 ,			_lowercase    :       Any=0.0 ,			_lowercase    :       Any=0.0 ,			_lowercase    :       Optional[Any]=0.1 ,			_lowercase    :       Union[str, Any]=0.1 ,			_lowercase    :       List[str]=0.02 ,			_lowercase    :       Tuple=1E-5 ,			_lowercase    :       Optional[Any]="group" ,			_lowercase    :       Any="gelu" ,			_lowercase    :       Optional[int]=(5_12, 5_12, 5_12, 5_12, 5_12, 5_12, 5_12) ,			_lowercase    :       List[str]=(5, 2, 2, 2, 2, 2, 2) ,			_lowercase    :       Optional[int]=(10, 3, 3, 3, 3, 2, 2) ,			_lowercase    :       Optional[Any]=False ,			_lowercase    :       Union[str, Any]=1_28 ,			_lowercase    :       Any=16 ,			_lowercase    :       Any=False ,			_lowercase    :       int=True ,			_lowercase    :       Union[str, Any]=0.05 ,			_lowercase    :       str=10 ,			_lowercase    :       Tuple=2 ,			_lowercase    :       int=0.0 ,			_lowercase    :       List[Any]=10 ,			_lowercase    :       Optional[int]=0 ,			_lowercase    :       Optional[int]=3_20 ,			_lowercase    :       int=2 ,			_lowercase    :       Dict=0.1 ,			_lowercase    :       Dict=1_00 ,			_lowercase    :       Any=2_56 ,			_lowercase    :       Any=2_56 ,			_lowercase    :       Any=0.1 ,			_lowercase    :       int="mean" ,			_lowercase    :       Dict=False ,			_lowercase    :       List[str]=False ,			_lowercase    :       Optional[Any]=2_56 ,			_lowercase    :       Any=80 ,			_lowercase    :       Optional[int]=0 ,			_lowercase    :       Optional[int]=1 ,			_lowercase    :       Tuple=2 ,			_lowercase    :       List[str]=0.5 ,			**_lowercase    :       Optional[Any] ,			):



     """simple docstring"""






     super().__init__(**_lowercase ,			pad_token_id=_lowercase ,			bos_token_id=_lowercase ,			eos_token_id=_lowercase   )
     SCREAMING_SNAKE_CASE__    							=   hidden_size
     SCREAMING_SNAKE_CASE__    							=   feat_extract_norm
     SCREAMING_SNAKE_CASE__    							=   feat_extract_activation
     SCREAMING_SNAKE_CASE__    							=   list(_lowercase   )
     SCREAMING_SNAKE_CASE__    							=   list(_lowercase   )
     SCREAMING_SNAKE_CASE__    							=   list(_lowercase   )
     SCREAMING_SNAKE_CASE__    							=   conv_bias
     SCREAMING_SNAKE_CASE__    							=   num_conv_pos_embeddings
     SCREAMING_SNAKE_CASE__    							=   num_conv_pos_embedding_groups
     SCREAMING_SNAKE_CASE__    							=   len(self.conv_dim   )
     SCREAMING_SNAKE_CASE__    							=   num_hidden_layers
     SCREAMING_SNAKE_CASE__    							=   intermediate_size
     SCREAMING_SNAKE_CASE__    							=   hidden_act
     SCREAMING_SNAKE_CASE__    							=   num_attention_heads
     SCREAMING_SNAKE_CASE__    							=   hidden_dropout
     SCREAMING_SNAKE_CASE__    							=   attention_dropout
     SCREAMING_SNAKE_CASE__    							=   activation_dropout
     SCREAMING_SNAKE_CASE__    							=   feat_proj_dropout
     SCREAMING_SNAKE_CASE__    							=   final_dropout
     SCREAMING_SNAKE_CASE__    							=   layerdrop
     SCREAMING_SNAKE_CASE__    							=   layer_norm_eps
     SCREAMING_SNAKE_CASE__    							=   initializer_range
     SCREAMING_SNAKE_CASE__    							=   num_ctc_classes
     SCREAMING_SNAKE_CASE__    							=   vocab_size
     SCREAMING_SNAKE_CASE__    							=   do_stable_layer_norm
     SCREAMING_SNAKE_CASE__    							=   use_weighted_layer_sum
     SCREAMING_SNAKE_CASE__    							=   classifier_proj_size

     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
     SCREAMING_SNAKE_CASE__    							=   apply_spec_augment
     SCREAMING_SNAKE_CASE__    							=   mask_time_prob
     SCREAMING_SNAKE_CASE__    							=   mask_time_length
     SCREAMING_SNAKE_CASE__    							=   mask_time_min_masks
     SCREAMING_SNAKE_CASE__    							=   mask_feature_prob
     SCREAMING_SNAKE_CASE__    							=   mask_feature_length
     SCREAMING_SNAKE_CASE__    							=   mask_feature_min_masks

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

     # ctc loss
     SCREAMING_SNAKE_CASE__    							=   ctc_loss_reduction
     SCREAMING_SNAKE_CASE__    							=   ctc_zero_infinity

     # pretraining loss
     SCREAMING_SNAKE_CASE__    							=   replace_prob




   @property
   def 			__a		(					self    :       List[str]   ):



     """simple docstring"""






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

from math import isqrt



def 			__SCREAMING_SNAKE_CASE						(      __UpperCamelCase					: int			)							->      bool:







  """simple docstring"""





  return all(number % divisor != 0 for divisor in range(2				,  isqrt(__UpperCamelCase			) + 1			)			)



def 			__SCREAMING_SNAKE_CASE						(      __UpperCamelCase					: int = 10**6			)							->      int:







  """simple docstring"""





  SCREAMING_SNAKE_CASE__    							=   0
  SCREAMING_SNAKE_CASE__    							=   1
  SCREAMING_SNAKE_CASE__    							=   7
  while prime_candidate < max_prime:
    primes_count += is_prime(__UpperCamelCase			)

    cube_index += 1
    prime_candidate += 6 * cube_index

  return primes_count


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