



'''simple docstring'''



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


lowerCAmelCase_     :       Optional[int]								=						logging.get_logger(__name__)

lowerCAmelCase_     :       List[str]								=						{
    'facebook/s2t-wav2vec2-large-en-de': (
        'https://huggingface.co/facebook/s2t-wav2vec2-large-en-de/resolve/main/config.json'
    ),
    # See all Speech2Text models at https://huggingface.co/models?filter=speech2text2
}
class 	lowerCamelCase_							(					snake_case_			):
						_lowerCAmelCase     :   Any	     =				'speech_to_text_2'
						_lowerCAmelCase     :   Any	     =				['past_key_values']
						_lowerCAmelCase     :   Optional[int]	     =				{'num_attention_heads': 'decoder_attention_heads', 'hidden_size': 'd_model'}







						def __init__(  self   :      Tuple				,    lowerCAmelCase__   :      List[str]=1_00_00				,    lowerCAmelCase__   :      Tuple=6				,    lowerCAmelCase__   :      List[Any]=20_48				,    lowerCAmelCase__   :      List[Any]=4				,    lowerCAmelCase__   :      Union[str, Any]=0.0				,    lowerCAmelCase__   :      int=True				,    lowerCAmelCase__   :      Union[str, Any]="relu"				,    lowerCAmelCase__   :      int=2_56				,    lowerCAmelCase__   :      List[Any]=0.1				,    lowerCAmelCase__   :      Any=0.0				,    lowerCAmelCase__   :      int=0.0				,    lowerCAmelCase__   :      List[Any]=0.02				,    lowerCAmelCase__   :      int=2				,    lowerCAmelCase__   :      Optional[Any]=True				,    lowerCAmelCase__   :      Tuple=1				,    lowerCAmelCase__   :      Dict=0				,    lowerCAmelCase__   :      List[str]=2				,    lowerCAmelCase__   :      List[str]=10_24				,    **lowerCAmelCase__   :      int				,    ):

													"""simple docstring"""
													SCREAMING_SNAKE_CASE					:      Tuple     					=			vocab_size
													SCREAMING_SNAKE_CASE					:      int     					=			d_model
													SCREAMING_SNAKE_CASE					:      Tuple     					=			decoder_ffn_dim
													SCREAMING_SNAKE_CASE					:      Any     					=			decoder_layers
													SCREAMING_SNAKE_CASE					:      Dict     					=			decoder_attention_heads
													SCREAMING_SNAKE_CASE					:      List[Any]     					=			dropout
													SCREAMING_SNAKE_CASE					:      int     					=			attention_dropout
													SCREAMING_SNAKE_CASE					:      int     					=			activation_dropout
													SCREAMING_SNAKE_CASE					:      int     					=			activation_function
													SCREAMING_SNAKE_CASE					:      Dict     					=			init_std
													SCREAMING_SNAKE_CASE					:      List[str]     					=			decoder_layerdrop
													SCREAMING_SNAKE_CASE					:      Optional[Any]     					=			use_cache
													SCREAMING_SNAKE_CASE					:      Dict     					=			decoder_layers
													SCREAMING_SNAKE_CASE					:      List[Any]     					=			scale_embedding  # scale factor will be sqrt(d_model) if True
													SCREAMING_SNAKE_CASE					:      int     					=			max_target_positions

													super().__init__(
													    pad_token_id=lowerCAmelCase__				,    bos_token_id=lowerCAmelCase__				,    eos_token_id=lowerCAmelCase__				,    decoder_start_token_id=lowerCAmelCase__				,    **lowerCAmelCase__				,    )









'''simple docstring'''



from urllib.parse import quote

import pytest

from datasets.utils.hub import hf_hub_url
@pytest.mark.parametrize('''repo_id'''					,		['''canonical_dataset_name''', '''org-name/dataset-name''']				)
@pytest.mark.parametrize('''path'''					,		['''filename.csv''', '''filename with blanks.csv''']				)
@pytest.mark.parametrize('''revision'''					,		[None, '''v2''']				)
def 					UpperCAmelCase   (						A  :				int					,		A  :				Tuple					,		A  :				Any				):
							SCREAMING_SNAKE_CASE					:      int     					=			hf_hub_url(repo_id=A					,		path=A					,		revision=A				)
							assert url == F"""https://huggingface.co/datasets/{repo_id}/resolve/{revision or "main"}/{quote(A				)}"""




