

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


lowerCamelCase      				=     logging.get_logger(__name__)

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





class     snake_case_			(				__lowerCamelCase							):


							"""simple docstring"""





							__UpperCAmelCase       ='pegasus'
							__UpperCAmelCase       =['past_key_values']
							__UpperCAmelCase       ={'num_attention_heads': 'encoder_attention_heads', 'hidden_size': 'd_model'}




							def __init__( self					,						_A=5_0_2_6_5					,						_A=1_0_2_4					,						_A=1_2					,						_A=4_0_9_6					,						_A=1_6					,						_A=1_2					,						_A=4_0_9_6					,						_A=1_6					,						_A=0.0					,						_A=0.0					,						_A=True					,						_A=True					,						_A="gelu"					,						_A=1_0_2_4					,						_A=0.1					,						_A=0.0					,						_A=0.0					,						_A=0.02					,						_A=0					,						_A=False					,						_A=0					,						_A=1					,						_A=1					,						**_A					,						):
												__lowerCAmelCase					=							vocab_size
												__lowerCAmelCase					=							max_position_embeddings
												__lowerCAmelCase					=							d_model
												__lowerCAmelCase					=							encoder_ffn_dim
												__lowerCAmelCase					=							encoder_layers
												__lowerCAmelCase					=							encoder_attention_heads
												__lowerCAmelCase					=							decoder_ffn_dim
												__lowerCAmelCase					=							decoder_layers
												__lowerCAmelCase					=							decoder_attention_heads
												__lowerCAmelCase					=							dropout
												__lowerCAmelCase					=							attention_dropout
												__lowerCAmelCase					=							activation_dropout
												__lowerCAmelCase					=							activation_function
												__lowerCAmelCase					=							init_std
												__lowerCAmelCase					=							encoder_layerdrop
												__lowerCAmelCase					=							decoder_layerdrop
												__lowerCAmelCase					=							use_cache
												__lowerCAmelCase					=							encoder_layers
												__lowerCAmelCase					=							scale_embedding  # scale factor will be sqrt(d_model) if True
												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        A__  ( self							):
												return self.encoder_attention_heads




							@property
							def        A__  ( self							):
												return self.d_model









import warnings

from ...utils import logging
from .image_processing_poolformer import PoolFormerImageProcessor


lowerCamelCase      				=     logging.get_logger(__name__)





class     snake_case_			(				_a							):


							"""simple docstring"""





							def __init__( self					,						*_A					,						**_A							):
												warnings.warn(
												    'The class PoolFormerFeatureExtractor is deprecated and will be removed in version 5 of Transformers.'
												    ' Please use PoolFormerImageProcessor instead.'					,						_A					,						)
												super().__init__(*_A					,						**_A							)






