"""simple docstring"""







from typing import Callable, Optional, Union

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


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

UpperCamelCase_							:							List[str]				 =		{
    """microsoft/prophetnet-large-uncased""": (
        """https://huggingface.co/microsoft/prophetnet-large-uncased/resolve/main/config.json"""
    ),
}


class       _lowercase		( __lowerCamelCase	):
				lowerCamelCase__							=							'prophetnet'
				lowerCamelCase__							=							['past_key_values']
				lowerCamelCase__							=							{
				    'num_attention_heads': 'num_encoder_attention_heads',
				}

				def __init__(  self							:     Union[str, Any]							,     _lowercase							:     Optional[float] = 0.1							,     _lowercase							:     Optional[Union[str, Callable]] = "gelu"							,     _lowercase							:     Optional[int] = 3_0_5_2_2							,     _lowercase							:     Optional[int] = 1_0_2_4							,     _lowercase							:     Optional[int] = 4_0_9_6							,     _lowercase							:     Optional[int] = 1_2							,     _lowercase							:     Optional[int] = 1_6							,     _lowercase							:     Optional[int] = 4_0_9_6							,     _lowercase							:     Optional[int] = 1_2							,     _lowercase							:     Optional[int] = 1_6							,     _lowercase							:     Optional[float] = 0.1							,     _lowercase							:     Optional[float] = 0.1							,     _lowercase							:     Optional[int] = 5_1_2							,     _lowercase							:     Optional[float] = 0.02							,     _lowercase							:     Optional[bool] = True							,     _lowercase							:     Optional[bool] = True							,     _lowercase							:     Optional[int] = 0							,     _lowercase							:     Optional[int] = 2							,     _lowercase							:     Optional[int] = 3_2							,     _lowercase							:     Optional[int] = 1_2_8							,     _lowercase							:     Optional[bool] = False							,     _lowercase							:     Optional[float] = 0.0							,     _lowercase							:     Optional[bool] = True							,     _lowercase							:     Optional[int] = 0							,     _lowercase							:     Optional[int] = 1							,     _lowercase							:     Optional[int] = 2							,     **_lowercase							:     str							,     ):


										'''simple docstring'''
										UpperCAmelCase__       						=		vocab_size
										UpperCAmelCase__       						=		hidden_size
										UpperCAmelCase__       						=		encoder_ffn_dim
										UpperCAmelCase__       						=		num_encoder_layers
										UpperCAmelCase__       						=		num_encoder_attention_heads
										UpperCAmelCase__       						=		decoder_ffn_dim
										UpperCAmelCase__       						=		num_decoder_layers
										UpperCAmelCase__       						=		num_decoder_attention_heads
										UpperCAmelCase__       						=		max_position_embeddings
										UpperCAmelCase__       						=		init_std  # Normal(0, this parameter)
										UpperCAmelCase__       						=		activation_function

										# parameters for prophetnet
										UpperCAmelCase__       						=		ngram
										UpperCAmelCase__       						=		num_buckets
										UpperCAmelCase__       						=		relative_max_distance
										UpperCAmelCase__       						=		disable_ngram_loss
										UpperCAmelCase__       						=		eps

										# 3 Types of Dropout
										UpperCAmelCase__       						=		attention_dropout
										UpperCAmelCase__       						=		activation_dropout
										UpperCAmelCase__       						=		dropout

										UpperCAmelCase__       						=		use_cache

										super().__init__(
										    pad_token_id=_lowercase							,     bos_token_id=_lowercase							,     eos_token_id=_lowercase							,     is_encoder_decoder=_lowercase							,     add_cross_attention=_lowercase							,     decoder_start_token_id=_lowercase							,     **_lowercase							,     )

				@property
				def 							A			(  self							:     Any  ):


										'''simple docstring'''
										return self.num_encoder_layers + self.num_decoder_layers

				@num_hidden_layers.setter
				def 							A			(  self							:     Any							,     _lowercase							:     List[Any]  ):


										'''simple docstring'''
										raise NotImplementedError(
										    """This model does not support the setting of `num_hidden_layers`. Please set `num_encoder_layers` and"""
										    """ `num_decoder_layers`."""  )


"""simple docstring"""







from ...utils import (
    OptionalDependencyNotAvailable,
    is_torch_available,
    is_transformers_available,
    is_transformers_version,
)


try:
						if not (is_transformers_available() and is_torch_available() and is_transformers_version(""">=""", """4.27.0""")):
												raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
						from ...utils.dummy_torch_and_transformers_objects import (
						    AudioLDMPipeline,
						)
else:
						from .pipeline_audioldm import AudioLDMPipeline

