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


_UpperCamelCase				:		Tuple       			=		logging.get_logger(__name__)

_UpperCamelCase				:		Union[str, Any]       			=		{
    "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   _lowercase(     SCREAMING_SNAKE_CASE__				):



   """simple docstring"""





   __lowerCamelCase    =  'pegasus_x'
   __lowerCamelCase    =  ['past_key_values']
   __lowerCamelCase    =  {'num_attention_heads': 'encoder_attention_heads', 'hidden_size': 'd_model'}





   def __init__(							self:    Optional[int]			,a:    Tuple=96103			,a:    Any=16384			,a:    Optional[int]=16			,a:    List[str]=4096			,a:    int=16			,a:    Tuple=16			,a:    Union[str, Any]=4096			,a:    Optional[Any]=16			,a:    int=0.0			,a:    Dict=0.0			,a:    Any=True			,a:    Optional[int]=True			,a:    Tuple="gelu"			,a:    Union[str, Any]=1024			,a:    Optional[Any]=0.1			,a:    int=0.0			,a:    int=0.0			,a:    Optional[int]=0.02			,a:    Union[str, Any]=0			,a:    Optional[int]=True			,a:    str=0			,a:    Tuple=1			,a:    Optional[Any]=1			,a:    Tuple=32			,a:    Dict=512			,a:    Tuple=True			,**a:    Tuple			,):
    __UpperCAmelCase         =					vocab_size
    __UpperCAmelCase         =					max_position_embeddings
    __UpperCAmelCase         =					d_model
    __UpperCAmelCase         =					encoder_ffn_dim
    __UpperCAmelCase         =					encoder_layers
    __UpperCAmelCase         =					encoder_attention_heads
    __UpperCAmelCase         =					decoder_ffn_dim
    __UpperCAmelCase         =					decoder_layers
    __UpperCAmelCase         =					decoder_attention_heads
    __UpperCAmelCase         =					dropout
    __UpperCAmelCase         =					attention_dropout
    __UpperCAmelCase         =					activation_dropout
    __UpperCAmelCase         =					activation_function
    __UpperCAmelCase         =					init_std
    __UpperCAmelCase         =					encoder_layerdrop
    __UpperCAmelCase         =					decoder_layerdrop
    __UpperCAmelCase         =					use_cache
    __UpperCAmelCase         =					encoder_layers
    __UpperCAmelCase         =					scale_embedding  # scale factor will be sqrt(d_model) if True

    __UpperCAmelCase         =					num_global_tokens
    __UpperCAmelCase         =					block_size
    __UpperCAmelCase         =					stagger_local_blocks

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





   @property
   def 			snake_case	(							self:    Dict	):
    return self.encoder_attention_heads





   @property
   def 			snake_case	(							self:    List[str]	):
    return self.d_model




'''simple docstring'''




def 						__snake_case (       lowerCAmelCase       :     str			):
 __UpperCAmelCase         =					5381
 for x in s:
  __UpperCAmelCase         =					((hash_value << 5) + hash_value) + ord(lowerCAmelCase			)
 return hash_value & 0Xffff_ffff



