






import functools
import operator

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


__UpperCamelCase					:		Union[str, Any]	  =						logging.get_logger(__name__)

__UpperCamelCase					:		Optional[Any]	  =						{
    """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   __SCREAMING_SNAKE_CASE(	__A	):
							_UpperCAmelCase     =       "wavlm"
							def __init__(     self:      Any       ,	UpperCamelCase:      int=32       ,	UpperCamelCase:      List[Any]=7_68       ,	UpperCamelCase:      Any=12       ,	UpperCamelCase:      Optional[int]=12       ,	UpperCamelCase:      List[Any]=30_72       ,	UpperCamelCase:      Tuple="gelu"       ,	UpperCamelCase:      Dict=0.1       ,	UpperCamelCase:      int=0.1       ,	UpperCamelCase:      Optional[Any]=0.1       ,	UpperCamelCase:      Optional[Any]=0.0       ,	UpperCamelCase:      Union[str, Any]=0.1       ,	UpperCamelCase:      Union[str, Any]=0.1       ,	UpperCamelCase:      Any=0.02       ,	UpperCamelCase:      int=1e-5       ,	UpperCamelCase:      List[Any]="group"       ,	UpperCamelCase:      Optional[int]="gelu"       ,	UpperCamelCase:      Dict=(5_12, 5_12, 5_12, 5_12, 5_12, 5_12, 5_12)       ,	UpperCamelCase:      Optional[Any]=(5, 2, 2, 2, 2, 2, 2)       ,	UpperCamelCase:      List[Any]=(10, 3, 3, 3, 3, 2, 2)       ,	UpperCamelCase:      str=False       ,	UpperCamelCase:      Optional[Any]=1_28       ,	UpperCamelCase:      Optional[int]=16       ,	UpperCamelCase:      int=3_20       ,	UpperCamelCase:      Union[str, Any]=8_00       ,	UpperCamelCase:      Union[str, Any]=False       ,	UpperCamelCase:      int=True       ,	UpperCamelCase:      List[str]=0.05       ,	UpperCamelCase:      Optional[Any]=10       ,	UpperCamelCase:      str=2       ,	UpperCamelCase:      List[Any]=0.0       ,	UpperCamelCase:      int=10       ,	UpperCamelCase:      Tuple=3_20       ,	UpperCamelCase:      Any=2       ,	UpperCamelCase:      Union[str, Any]=0.1       ,	UpperCamelCase:      List[str]=1_00       ,	UpperCamelCase:      Optional[Any]=2_56       ,	UpperCamelCase:      Optional[int]=2_56       ,	UpperCamelCase:      Optional[int]=0.1       ,	UpperCamelCase:      Union[str, Any]="mean"       ,	UpperCamelCase:      List[Any]=False       ,	UpperCamelCase:      Tuple=False       ,	UpperCamelCase:      List[str]=2_56       ,	UpperCamelCase:      Optional[Any]=(5_12, 5_12, 5_12, 5_12, 15_00)       ,	UpperCamelCase:      Union[str, Any]=(5, 3, 3, 1, 1)       ,	UpperCamelCase:      Union[str, Any]=(1, 2, 3, 1, 1)       ,	UpperCamelCase:      List[str]=5_12       ,	UpperCamelCase:      List[str]=80       ,	UpperCamelCase:      List[Any]=0       ,	UpperCamelCase:      Union[str, Any]=1       ,	UpperCamelCase:      Optional[Any]=2       ,	UpperCamelCase:      str=False       ,	UpperCamelCase:      int=3       ,	UpperCamelCase:      List[str]=2       ,	UpperCamelCase:      Dict=3       ,	UpperCamelCase:      Optional[Any]=None       ,	**UpperCamelCase:      Any       ,	)		->		str:
											super().__init__(**UpperCamelCase       ,	pad_token_id=UpperCamelCase       ,	bos_token_id=UpperCamelCase       ,	eos_token_id=UpperCamelCase						)
											snake_case__									=     hidden_size
											snake_case__									=     feat_extract_norm
											snake_case__									=     feat_extract_activation
											snake_case__									=     list(UpperCamelCase						)
											snake_case__									=     list(UpperCamelCase						)
											snake_case__									=     list(UpperCamelCase						)
											snake_case__									=     conv_bias
											snake_case__									=     num_buckets
											snake_case__									=     max_bucket_distance
											snake_case__									=     num_conv_pos_embeddings
											snake_case__									=     num_conv_pos_embedding_groups
											snake_case__									=     len(self.conv_dim						)
											snake_case__									=     num_hidden_layers
											snake_case__									=     intermediate_size
											snake_case__									=     hidden_act
											snake_case__									=     num_attention_heads
											snake_case__									=     hidden_dropout
											snake_case__									=     attention_dropout
											snake_case__									=     activation_dropout
											snake_case__									=     feat_proj_dropout
											snake_case__									=     final_dropout
											snake_case__									=     layerdrop
											snake_case__									=     layer_norm_eps
											snake_case__									=     initializer_range
											snake_case__									=     num_ctc_classes
											snake_case__									=     vocab_size
											snake_case__									=     do_stable_layer_norm
											snake_case__									=     use_weighted_layer_sum
											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
											snake_case__									=     apply_spec_augment
											snake_case__									=     mask_time_prob
											snake_case__									=     mask_time_length
											snake_case__									=     mask_time_min_masks
											snake_case__									=     mask_feature_prob
											snake_case__									=     mask_feature_length

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

											# ctc loss
											snake_case__									=     ctc_loss_reduction
											snake_case__									=     ctc_zero_infinity

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

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

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


							@property
							def lowerCAmelCase_ (     self:      Optional[int]						)		->		Union[str, Any]:
											return functools.reduce(operator.mul       ,	self.conv_stride       ,	1						)








from argparse import ArgumentParser

from .env import EnvironmentCommand
def      a_ (      )			->			Optional[Any]:







				"""simple docstring"""
				snake_case__									=     ArgumentParser('Diffusers CLI tool'      ,   usage='diffusers-cli <command> [<args>]'  )
				snake_case__									=     parser.add_subparsers(help='diffusers-cli command helpers'  )

				# Register commands
				EnvironmentCommand.register_subcommand(_A  )

				# Let's go
				snake_case__									=     parser.parse_args()

				if not hasattr(_A      ,   'func'  ):
								parser.print_help()
								exit(1  )

				# Run
				snake_case__									=     args.func(_A  )
				service.run()


if __name__ == "__main__":
							main()




