


import math

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


lowerCamelCase__							:						str							     =   logging.get_logger(__name__)

lowerCamelCase__							:						int							     =   {
    """facebook/data2vec-base-960h""": """https://huggingface.co/facebook/data2vec-audio-base-960h/resolve/main/config.json""",
    # See all Data2VecAudio models at https://huggingface.co/models?filter=data2vec-audio
}
class 		__magic_name__						(snake_case_				):





     '''simple docstring'''



     __lowercase				:							str	   =       'data2vec-audio'

     def __init__(					self:Optional[int]     ,		_a:str=32     ,		_a:Tuple=7_68     ,		_a:List[str]=12     ,		_a:int=12     ,		_a:List[str]=30_72     ,		_a:int="gelu"     ,		_a:Dict=0.1     ,		_a:int=0.1     ,		_a:int=0.1     ,		_a:int=0.0     ,		_a:Optional[Any]=0.1     ,		_a:List[Any]=0.1     ,		_a:Union[str, Any]=0.02     ,		_a:List[str]=1e-5     ,		_a:Any="gelu"     ,		_a:Tuple=(5_12, 5_12, 5_12, 5_12, 5_12, 5_12, 5_12)     ,		_a:Union[str, Any]=(5, 2, 2, 2, 2, 2, 2)     ,		_a:List[Any]=(10, 3, 3, 3, 3, 2, 2)     ,		_a:Any=False     ,		_a:Dict=16     ,		_a:Dict=19     ,		_a:Optional[int]=5     ,		_a:Union[str, Any]=0.05     ,		_a:Any=10     ,		_a:Tuple=2     ,		_a:Tuple=0.0     ,		_a:List[str]=10     ,		_a:int=0     ,		_a:Tuple="sum"     ,		_a:Any=False     ,		_a:List[Any]=False     ,		_a:str=2_56     ,		_a:Dict=(5_12, 5_12, 5_12, 5_12, 15_00)     ,		_a:str=(5, 3, 3, 1, 1)     ,		_a:List[str]=(1, 2, 3, 1, 1)     ,		_a:List[Any]=5_12     ,		_a:Union[str, Any]=0     ,		_a:Optional[Any]=1     ,		_a:Tuple=2     ,		_a:int=False     ,		_a:Any=3     ,		_a:int=2     ,		_a:Optional[Any]=3     ,		_a:Any=None     ,		**_a:Optional[Any]     ,		):
       super().__init__(**_a     ,		pad_token_id=_a     ,		bos_token_id=_a     ,		eos_token_id=_a   )
       snake_case__						= hidden_size
       snake_case__						= feat_extract_activation
       snake_case__						= list(_a   )
       snake_case__						= list(_a   )
       snake_case__						= list(_a   )
       snake_case__						= conv_bias
       snake_case__						= num_conv_pos_embeddings
       snake_case__						= num_conv_pos_embedding_groups
       snake_case__						= conv_pos_kernel_size
       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__						= vocab_size
       snake_case__						= 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
       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
       snake_case__						= mask_feature_min_masks

       # 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(_a   )
       snake_case__						= list(_a   )
       snake_case__						= list(_a   )
       snake_case__						= xvector_output_dim







     @property
     def 	SCREAMING_SNAKE_CASE__						(					self:Optional[Any]   ):
       return math.prod(self.conv_stride   )


'''simple docstring'''


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


__snake_case						  =		logging.get_logger(__name__)

__snake_case						  =		{
    """uw-madison/mra-base-512-4""": """https://huggingface.co/uw-madison/mra-base-512-4/resolve/main/config.json""",
}





class       _a    (		__a      ):


  """simple docstring"""

  A_    							=						'''mra'''




  def __init__(		self      :       Any   ,				lowercase_      :       List[str]=50_265   ,				lowercase_      :       Tuple=768   ,				lowercase_      :       Optional[Any]=12   ,				lowercase_      :       str=12   ,				lowercase_      :       Optional[int]=3_072   ,				lowercase_      :       Union[str, Any]="gelu"   ,				lowercase_      :       str=0.1   ,				lowercase_      :       Tuple=0.1   ,				lowercase_      :       str=512   ,				lowercase_      :       Optional[int]=1   ,				lowercase_      :       Tuple=0.0_2   ,				lowercase_      :       List[Any]=1e-5   ,				lowercase_      :       Optional[Any]="absolute"   ,				lowercase_      :       int=4   ,				lowercase_      :       int="full"   ,				lowercase_      :       Tuple=0   ,				lowercase_      :       str=0   ,				lowercase_      :       List[str]=1   ,				lowercase_      :       Tuple=0   ,				lowercase_      :       Optional[Any]=2   ,				**lowercase_      :       List[str]   ,				):







    '''simple docstring'''


    super().__init__(pad_token_id=lowercase_   ,				bos_token_id=lowercase_   ,				eos_token_id=lowercase_   ,				**lowercase_      )

    lowercase_     =       vocab_size
    lowercase_     =       max_position_embeddings
    lowercase_     =       hidden_size
    lowercase_     =       num_hidden_layers
    lowercase_     =       num_attention_heads
    lowercase_     =       intermediate_size
    lowercase_     =       hidden_act
    lowercase_     =       hidden_dropout_prob
    lowercase_     =       attention_probs_dropout_prob
    lowercase_     =       initializer_range
    lowercase_     =       type_vocab_size
    lowercase_     =       layer_norm_eps
    lowercase_     =       position_embedding_type
    lowercase_     =       block_per_row
    lowercase_     =       approx_mode
    lowercase_     =       initial_prior_first_n_blocks
    lowercase_     =       initial_prior_diagonal_n_blocks

