






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


UpperCAmelCase__			 =	logging.get_logger(__name__)

UpperCAmelCase__			 =	{
    '''google/pegasus-x-base''': '''https://huggingface.co/google/pegasus-x-base/resolve/main/config.json''',
    '''google/pegasus-x-large''': '''https://huggingface.co/google/pegasus-x-large/resolve/main/config.json''',
    # See all PEGASUS-X models at https://huggingface.co/models?filter=pegasus-x
}




class        snake_case_					(						__UpperCamelCase			):

						"""simple docstring"""



						snake_case__   					=			"""pegasus_x"""
						snake_case__   					=			["""past_key_values"""]
						snake_case__   					=			{"""num_attention_heads""": """encoder_attention_heads""", """hidden_size""": """d_model"""}



						def __init__(self:				Optional[int]   ,				__UpperCAmelCase:				Union[str, Any]=96103   ,				__UpperCAmelCase:				Union[str, Any]=16384   ,				__UpperCAmelCase:				Any=16   ,				__UpperCAmelCase:				Dict=4096   ,				__UpperCAmelCase:				List[Any]=16   ,				__UpperCAmelCase:				Dict=16   ,				__UpperCAmelCase:				List[str]=4096   ,				__UpperCAmelCase:				Tuple=16   ,				__UpperCAmelCase:				Tuple=0.0   ,				__UpperCAmelCase:				Union[str, Any]=0.0   ,				__UpperCAmelCase:				List[Any]=True   ,				__UpperCAmelCase:				Union[str, Any]=True   ,				__UpperCAmelCase:				Union[str, Any]="gelu"   ,				__UpperCAmelCase:				str=1024   ,				__UpperCAmelCase:				Optional[Any]=0.1   ,				__UpperCAmelCase:				int=0.0   ,				__UpperCAmelCase:				List[str]=0.0   ,				__UpperCAmelCase:				str=0.02   ,				__UpperCAmelCase:				List[Any]=0   ,				__UpperCAmelCase:				Optional[int]=True   ,				__UpperCAmelCase:				List[str]=0   ,				__UpperCAmelCase:				List[str]=1   ,				__UpperCAmelCase:				Optional[int]=1   ,				__UpperCAmelCase:				int=32   ,				__UpperCAmelCase:				Any=512   ,				__UpperCAmelCase:				Optional[int]=True   ,				**__UpperCAmelCase:				Dict   ,				)						->    List[Any]:




											'''simple docstring'''



											__a				:	Union[str, Any]			=				vocab_size
											__a				:	List[str]			=				max_position_embeddings
											__a				:	Optional[int]			=				d_model
											__a				:	List[Any]			=				encoder_ffn_dim
											__a				:	Optional[Any]			=				encoder_layers
											__a				:	List[Any]			=				encoder_attention_heads
											__a				:	Optional[Any]			=				decoder_ffn_dim
											__a				:	Tuple			=				decoder_layers
											__a				:	Tuple			=				decoder_attention_heads
											__a				:	List[Any]			=				dropout
											__a				:	List[Any]			=				attention_dropout
											__a				:	Optional[Any]			=				activation_dropout
											__a				:	Optional[int]			=				activation_function
											__a				:	Optional[int]			=				init_std
											__a				:	Union[str, Any]			=				encoder_layerdrop
											__a				:	Dict			=				decoder_layerdrop
											__a				:	str			=				use_cache
											__a				:	Tuple			=				encoder_layers
											__a				:	Union[str, Any]			=				scale_embedding  # scale factor will be sqrt(d_model) if True

											__a				:	int			=				num_global_tokens
											__a				:	Optional[int]			=				block_size
											__a				:	List[Any]			=				stagger_local_blocks

											super().__init__(
											    pad_token_id=__UpperCAmelCase   ,				eos_token_id=__UpperCAmelCase   ,				is_encoder_decoder=__UpperCAmelCase   ,				decoder_start_token_id=__UpperCAmelCase   ,				forced_eos_token_id=__UpperCAmelCase   ,				**__UpperCAmelCase   ,				)



						@property
						def 					UpperCAmelCase__				(self:				Optional[int]      )						->    int:




											'''simple docstring'''



											return self.encoder_attention_heads



						@property
						def 					UpperCAmelCase__				(self:				Optional[int]      )						->    int:




											'''simple docstring'''



											return self.d_model













import warnings

from .generation import GenerationMixin




class        snake_case_					(						__UpperCamelCase			):

						"""simple docstring"""



						warnings.warn(
						    """Importing `GenerationMixin` from `src/transformers/generation_utils.py` is deprecated and will """
						    """be removed in Transformers v5. Import as `from transformers import GenerationMixin` instead."""		,       __UpperCamelCase		,       )





