


"""simple docstring"""



import functools
import operator

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


lowercase_							=							logging.get_logger(__name__)

lowercase_							=							{
    '''microsoft/wavlm-base''': '''https://huggingface.co/microsoft/wavlm-base/resolve/main/config.json''',
    # See all WavLM models at https://huggingface.co/models?filter=wavlm
}







class    __a						( __lowerCAmelCase							):
				lowerCamelCase     :       int			       ='''wavlm'''







				def __init__( self      ,	UpperCAmelCase=32      ,	UpperCAmelCase=768      ,	UpperCAmelCase=12      ,	UpperCAmelCase=12      ,	UpperCAmelCase=3072      ,	UpperCAmelCase="gelu"      ,	UpperCAmelCase=0.1      ,	UpperCAmelCase=0.1      ,	UpperCAmelCase=0.1      ,	UpperCAmelCase=0.0      ,	UpperCAmelCase=0.1      ,	UpperCAmelCase=0.1      ,	UpperCAmelCase=0.0_2      ,	UpperCAmelCase=1E-5      ,	UpperCAmelCase="group"      ,	UpperCAmelCase="gelu"      ,	UpperCAmelCase=(512, 512, 512, 512, 512, 512, 512)      ,	UpperCAmelCase=(5, 2, 2, 2, 2, 2, 2)      ,	UpperCAmelCase=(10, 3, 3, 3, 3, 2, 2)      ,	UpperCAmelCase=False      ,	UpperCAmelCase=128      ,	UpperCAmelCase=16      ,	UpperCAmelCase=320      ,	UpperCAmelCase=800      ,	UpperCAmelCase=False      ,	UpperCAmelCase=True      ,	UpperCAmelCase=0.0_5      ,	UpperCAmelCase=10      ,	UpperCAmelCase=2      ,	UpperCAmelCase=0.0      ,	UpperCAmelCase=10      ,	UpperCAmelCase=320      ,	UpperCAmelCase=2      ,	UpperCAmelCase=0.1      ,	UpperCAmelCase=100      ,	UpperCAmelCase=256      ,	UpperCAmelCase=256      ,	UpperCAmelCase=0.1      ,	UpperCAmelCase="mean"      ,	UpperCAmelCase=False      ,	UpperCAmelCase=False      ,	UpperCAmelCase=256      ,	UpperCAmelCase=(512, 512, 512, 512, 1500)      ,	UpperCAmelCase=(5, 3, 3, 1, 1)      ,	UpperCAmelCase=(1, 2, 3, 1, 1)      ,	UpperCAmelCase=512      ,	UpperCAmelCase=80      ,	UpperCAmelCase=0      ,	UpperCAmelCase=1      ,	UpperCAmelCase=2      ,	UpperCAmelCase=False      ,	UpperCAmelCase=3      ,	UpperCAmelCase=2      ,	UpperCAmelCase=3      ,	UpperCAmelCase=None      ,	**UpperCAmelCase      ,	):

					'''simple docstring'''






					super().__init__(**__SCREAMING_SNAKE_CASE      ,	pad_token_id=__SCREAMING_SNAKE_CASE      ,	bos_token_id=__SCREAMING_SNAKE_CASE      ,	eos_token_id=__SCREAMING_SNAKE_CASE   )
					lowerCAmelCase_      							=			hidden_size
					lowerCAmelCase_      							=			feat_extract_norm
					lowerCAmelCase_      							=			feat_extract_activation
					lowerCAmelCase_      							=			list(__SCREAMING_SNAKE_CASE   )
					lowerCAmelCase_      							=			list(__SCREAMING_SNAKE_CASE   )
					lowerCAmelCase_      							=			list(__SCREAMING_SNAKE_CASE   )
					lowerCAmelCase_      							=			conv_bias
					lowerCAmelCase_      							=			num_buckets
					lowerCAmelCase_      							=			max_bucket_distance
					lowerCAmelCase_      							=			num_conv_pos_embeddings
					lowerCAmelCase_      							=			num_conv_pos_embedding_groups
					lowerCAmelCase_      							=			len(self.conv_dim   )
					lowerCAmelCase_      							=			num_hidden_layers
					lowerCAmelCase_      							=			intermediate_size
					lowerCAmelCase_      							=			hidden_act
					lowerCAmelCase_      							=			num_attention_heads
					lowerCAmelCase_      							=			hidden_dropout
					lowerCAmelCase_      							=			attention_dropout
					lowerCAmelCase_      							=			activation_dropout
					lowerCAmelCase_      							=			feat_proj_dropout
					lowerCAmelCase_      							=			final_dropout
					lowerCAmelCase_      							=			layerdrop
					lowerCAmelCase_      							=			layer_norm_eps
					lowerCAmelCase_      							=			initializer_range
					lowerCAmelCase_      							=			num_ctc_classes
					lowerCAmelCase_      							=			vocab_size
					lowerCAmelCase_      							=			do_stable_layer_norm
					lowerCAmelCase_      							=			use_weighted_layer_sum
					lowerCAmelCase_      							=			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
					lowerCAmelCase_      							=			apply_spec_augment
					lowerCAmelCase_      							=			mask_time_prob
					lowerCAmelCase_      							=			mask_time_length
					lowerCAmelCase_      							=			mask_time_min_masks
					lowerCAmelCase_      							=			mask_feature_prob
					lowerCAmelCase_      							=			mask_feature_length

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

					# ctc loss
					lowerCAmelCase_      							=			ctc_loss_reduction
					lowerCAmelCase_      							=			ctc_zero_infinity

					# adapter
					lowerCAmelCase_      							=			add_adapter
					lowerCAmelCase_      							=			adapter_kernel_size
					lowerCAmelCase_      							=			adapter_stride
					lowerCAmelCase_      							=			num_adapter_layers
					lowerCAmelCase_      							=			output_hidden_size or hidden_size

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

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







				@property
				def      lowerCamelCase_     ( self   ):

					'''simple docstring'''






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





'''simple docstring'''



def       _UpperCamelCase			(_lowerCamelCase				:  int						)-> int:




     '''simple docstring'''





     if divisor % 5 == 0 or divisor % 2 == 0:
          return 0
     __snake_case            =	1
     __snake_case            =	1
     while repunit:
          __snake_case            =	(10 * repunit + 1) % divisor
          repunit_index += 1
     return repunit_index







def       _UpperCamelCase			(_lowerCamelCase				:  int = 1_00_00_00						)-> int:




     '''simple docstring'''





     __snake_case            =	limit - 1
     if divisor % 2 == 0:
          divisor += 1
     while least_divisible_repunit(_lowerCamelCase						) <= limit:
          divisor += 2
     return divisor


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






