
import math

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


lowerCamelCase_  :	Dict 				=					logging.get_logger(__name__)

lowerCamelCase_  :	str 				=					{
    """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     _UpperCamelCase			(   _A					):






			'''simple docstring'''

			__UpperCamelCase :  Tuple    =	"""data2vec-audio"""

			def __init__(    self	:    Union[str, Any]  ,		snake_case_	:    Any=32  ,		snake_case_	:    Optional[Any]=768  ,		snake_case_	:    List[str]=12  ,		snake_case_	:    Optional[Any]=12  ,		snake_case_	:    Optional[Any]=3072  ,		snake_case_	:    List[Any]="gelu"  ,		snake_case_	:    Optional[Any]=0.1  ,		snake_case_	:    Any=0.1  ,		snake_case_	:    Any=0.1  ,		snake_case_	:    Dict=0.0  ,		snake_case_	:    Tuple=0.1  ,		snake_case_	:    Any=0.1  ,		snake_case_	:    str=0.02  ,		snake_case_	:    Dict=1e-5  ,		snake_case_	:    Optional[int]="gelu"  ,		snake_case_	:    List[str]=(512, 512, 512, 512, 512, 512, 512)  ,		snake_case_	:    Union[str, Any]=(5, 2, 2, 2, 2, 2, 2)  ,		snake_case_	:    Dict=(10, 3, 3, 3, 3, 2, 2)  ,		snake_case_	:    Tuple=False  ,		snake_case_	:    Dict=16  ,		snake_case_	:    Optional[int]=19  ,		snake_case_	:    str=5  ,		snake_case_	:    Optional[Any]=0.05  ,		snake_case_	:    str=10  ,		snake_case_	:    str=2  ,		snake_case_	:    str=0.0  ,		snake_case_	:    str=10  ,		snake_case_	:    int=0  ,		snake_case_	:    Any="sum"  ,		snake_case_	:    List[Any]=False  ,		snake_case_	:    Optional[int]=False  ,		snake_case_	:    Tuple=256  ,		snake_case_	:    Optional[int]=(512, 512, 512, 512, 1500)  ,		snake_case_	:    str=(5, 3, 3, 1, 1)  ,		snake_case_	:    Optional[Any]=(1, 2, 3, 1, 1)  ,		snake_case_	:    List[str]=512  ,		snake_case_	:    Optional[int]=0  ,		snake_case_	:    int=1  ,		snake_case_	:    List[Any]=2  ,		snake_case_	:    Tuple=False  ,		snake_case_	:    int=3  ,		snake_case_	:    List[str]=2  ,		snake_case_	:    Any=3  ,		snake_case_	:    Optional[Any]=None  ,		**snake_case_	:    List[str]  ,		):
							super().__init__(**snake_case_  ,		pad_token_id=snake_case_  ,		bos_token_id=snake_case_  ,		eos_token_id=snake_case_ )
							UpperCamelCase_:							str		=  hidden_size
							UpperCamelCase_:							Any		=  feat_extract_activation
							UpperCamelCase_:							Any		=  list(snake_case_ )
							UpperCamelCase_:							Union[str, Any]		=  list(snake_case_ )
							UpperCamelCase_:							List[str]		=  list(snake_case_ )
							UpperCamelCase_:							List[Any]		=  conv_bias
							UpperCamelCase_:							List[str]		=  num_conv_pos_embeddings
							UpperCamelCase_:							Tuple		=  num_conv_pos_embedding_groups
							UpperCamelCase_:							Any		=  conv_pos_kernel_size
							UpperCamelCase_:							Any		=  len(self.conv_dim )
							UpperCamelCase_:							Optional[Any]		=  num_hidden_layers
							UpperCamelCase_:							List[Any]		=  intermediate_size
							UpperCamelCase_:							Dict		=  hidden_act
							UpperCamelCase_:							Dict		=  num_attention_heads
							UpperCamelCase_:							Optional[Any]		=  hidden_dropout
							UpperCamelCase_:							Union[str, Any]		=  attention_dropout
							UpperCamelCase_:							List[Any]		=  activation_dropout
							UpperCamelCase_:							Optional[Any]		=  feat_proj_dropout
							UpperCamelCase_:							List[Any]		=  final_dropout
							UpperCamelCase_:							str		=  layerdrop
							UpperCamelCase_:							List[str]		=  layer_norm_eps
							UpperCamelCase_:							List[Any]		=  initializer_range
							UpperCamelCase_:							List[str]		=  vocab_size
							UpperCamelCase_:							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
							UpperCamelCase_:							Optional[int]		=  mask_time_prob
							UpperCamelCase_:							str		=  mask_time_length
							UpperCamelCase_:							List[Any]		=  mask_time_min_masks
							UpperCamelCase_:							Optional[Any]		=  mask_feature_prob
							UpperCamelCase_:							Union[str, Any]		=  mask_feature_length
							UpperCamelCase_:							Union[str, Any]		=  mask_feature_min_masks

							# ctc loss
							UpperCamelCase_:							Union[str, Any]		=  ctc_loss_reduction
							UpperCamelCase_:							Any		=  ctc_zero_infinity

							# adapter
							UpperCamelCase_:							List[str]		=  add_adapter
							UpperCamelCase_:							Optional[Any]		=  adapter_kernel_size
							UpperCamelCase_:							int		=  adapter_stride
							UpperCamelCase_:							str		=  num_adapter_layers
							UpperCamelCase_:							Any		=  output_hidden_size or hidden_size

							# SequenceClassification-specific parameter. Feel free to ignore for other classes.
							UpperCamelCase_:							List[Any]		=  classifier_proj_size

							# XVector-specific parameters. Feel free to ignore for other classes.
							UpperCamelCase_:							str		=  list(snake_case_ )
							UpperCamelCase_:							int		=  list(snake_case_ )
							UpperCamelCase_:							int		=  list(snake_case_ )
							UpperCamelCase_:							str		=  xvector_output_dim




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








from typing import TYPE_CHECKING

from ...utils import _LazyModule


lowerCamelCase_  :	Dict 				=					{"""tokenization_byt5""": ["""ByT5Tokenizer"""]}


if TYPE_CHECKING:
							from .tokenization_byta import ByTaTokenizer
else:
							import sys

							lowerCamelCase_  :	Any 				=					_LazyModule(__name__, globals()["""__file__"""], _import_structure, module_spec=__spec__)






