





import functools
import operator

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


UpperCAmelCase	:	Any		     =       logging.get_logger(__name__)

UpperCAmelCase	:	Any		     =       {
    """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       (    UpperCamelCase__):
      _lowercase				:					Optional[Any]						=			"""unispeech-sat"""







      def __init__(    self		,      lowerCAmelCase__=3_2		,      lowerCAmelCase__=7_6_8		,      lowerCAmelCase__=1_2		,      lowerCAmelCase__=1_2		,      lowerCAmelCase__=3_0_7_2		,      lowerCAmelCase__="gelu"		,      lowerCAmelCase__=0.1		,      lowerCAmelCase__=0.1		,      lowerCAmelCase__=0.1		,      lowerCAmelCase__=0.0		,      lowerCAmelCase__=0.0		,      lowerCAmelCase__=0.1		,      lowerCAmelCase__=0.1		,      lowerCAmelCase__=0.02		,      lowerCAmelCase__=1E-5		,      lowerCAmelCase__="group"		,      lowerCAmelCase__="gelu"		,      lowerCAmelCase__=(5_1_2, 5_1_2, 5_1_2, 5_1_2, 5_1_2, 5_1_2, 5_1_2)		,      lowerCAmelCase__=(5, 2, 2, 2, 2, 2, 2)		,      lowerCAmelCase__=(1_0, 3, 3, 3, 3, 2, 2)		,      lowerCAmelCase__=False		,      lowerCAmelCase__=1_2_8		,      lowerCAmelCase__=1_6		,      lowerCAmelCase__=False		,      lowerCAmelCase__=True		,      lowerCAmelCase__=0.05		,      lowerCAmelCase__=1_0		,      lowerCAmelCase__=2		,      lowerCAmelCase__=0.0		,      lowerCAmelCase__=1_0		,      lowerCAmelCase__=0		,      lowerCAmelCase__=3_2_0		,      lowerCAmelCase__=2		,      lowerCAmelCase__=0.1		,      lowerCAmelCase__=1_0_0		,      lowerCAmelCase__=2_5_6		,      lowerCAmelCase__=2_5_6		,      lowerCAmelCase__=0.1		,      lowerCAmelCase__="mean"		,      lowerCAmelCase__=False		,      lowerCAmelCase__=False		,      lowerCAmelCase__=2_5_6		,      lowerCAmelCase__=(5_1_2, 5_1_2, 5_1_2, 5_1_2, 1_5_0_0)		,      lowerCAmelCase__=(5, 3, 3, 1, 1)		,      lowerCAmelCase__=(1, 2, 3, 1, 1)		,      lowerCAmelCase__=5_1_2		,      lowerCAmelCase__=0		,      lowerCAmelCase__=1		,      lowerCAmelCase__=2		,      lowerCAmelCase__=5_0_4		,      **lowerCAmelCase__		,      )   ->						List[str]:



        '''simple docstring'''




        super().__init__(**lowerCAmelCase__		,      pad_token_id=lowerCAmelCase__		,      bos_token_id=lowerCAmelCase__		,      eos_token_id=lowerCAmelCase__							)
        a__	:					Optional[Any]										=hidden_size
        a__	:					str										=feat_extract_norm
        a__	:					List[Any]										=feat_extract_activation
        a__	:					Tuple										=list(lowerCAmelCase__							)
        a__	:					Any										=list(lowerCAmelCase__							)
        a__	:					int										=list(lowerCAmelCase__							)
        a__	:					Tuple										=conv_bias
        a__	:					Optional[int]										=num_conv_pos_embeddings
        a__	:					str										=num_conv_pos_embedding_groups
        a__	:					Any										=len(self.conv_dim							)
        a__	:					Optional[Any]										=num_hidden_layers
        a__	:					Any										=intermediate_size
        a__	:					Optional[int]										=hidden_act
        a__	:					Tuple										=num_attention_heads
        a__	:					Any										=hidden_dropout
        a__	:					List[Any]										=attention_dropout
        a__	:					Any										=activation_dropout
        a__	:					str										=feat_proj_dropout
        a__	:					Optional[Any]										=final_dropout
        a__	:					Union[str, Any]										=layerdrop
        a__	:					str										=layer_norm_eps
        a__	:					Any										=initializer_range
        a__	:					Optional[int]										=vocab_size
        a__	:					Any										=num_clusters
        a__	:					Any										=do_stable_layer_norm
        a__	:					List[Any]										=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
        a__	:					List[str]										=apply_spec_augment
        a__	:					str										=mask_time_prob
        a__	:					Dict										=mask_time_length
        a__	:					Tuple										=mask_time_min_masks
        a__	:					Dict										=mask_feature_prob
        a__	:					Tuple										=mask_feature_length
        a__	:					List[Any]										=mask_feature_min_masks

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

        # ctc loss
        a__	:					Optional[int]										=ctc_loss_reduction
        a__	:					int										=ctc_zero_infinity

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

        # XVector-specific parameters. Feel free to ignore for other classes.
        a__	:					List[str]										=list(lowerCAmelCase__							)
        a__	:					Any										=list(lowerCAmelCase__							)
        a__	:					Dict										=list(lowerCAmelCase__							)
        a__	:					str										=xvector_output_dim







      @property
      def    _lowercase  (    self							)   ->						Optional[Any]:



        '''simple docstring'''




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













from __future__ import annotations
def      _A       (		SCREAMING_SNAKE_CASE     :   list						):





  """simple docstring"""



  if len(SCREAMING_SNAKE_CASE						) == 0:
    return []
  a__					,							a__	:					int										=min(SCREAMING_SNAKE_CASE						), max(SCREAMING_SNAKE_CASE						)
  a__	:					Optional[int]										=int(max_value - min_value						) + 1
  a__	:					list[list]										=[[] for _ in range(SCREAMING_SNAKE_CASE						)]

  for i in my_list:
    buckets[int(i - min_value						)].append(SCREAMING_SNAKE_CASE						)

  return [v for bucket in buckets for v in sorted(SCREAMING_SNAKE_CASE						)]


if __name__ == "__main__":
     from doctest import testmod

     testmod()
     assert bucket_sort([4, 5, 3, 2, 1]) == [1, 2, 3, 4, 5]
     assert bucket_sort([0, 1, -10, 15, 2, -2]) == [-10, -2, 0, 1, 2, 15]






