


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


__UpperCamelCase       :       Dict						       =				logging.get_logger(__name__)

__UpperCamelCase       :       str						       =				{
    "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       __magic_name__	(     __lowerCAmelCase):
     A:		List[Any]			=      "pegasus"
     A:		int			=      ["past_key_values"]
     A:		Union[str, Any]			=      {"num_attention_heads": "encoder_attention_heads", "hidden_size": "d_model"}


     def __init__(      self							:     int							,	lowerCamelCase__							:     Dict=50265							,	lowerCamelCase__							:     Tuple=1024							,	lowerCamelCase__							:     str=12							,	lowerCamelCase__							:     Dict=4096							,	lowerCamelCase__							:     Optional[Any]=16							,	lowerCamelCase__							:     Union[str, Any]=12							,	lowerCamelCase__							:     str=4096							,	lowerCamelCase__							:     str=16							,	lowerCamelCase__							:     Dict=0.0							,	lowerCamelCase__							:     Any=0.0							,	lowerCamelCase__							:     Dict=True							,	lowerCamelCase__							:     Union[str, Any]=True							,	lowerCamelCase__							:     Dict="gelu"							,	lowerCamelCase__							:     int=1024							,	lowerCamelCase__							:     Dict=0.1							,	lowerCamelCase__							:     Any=0.0							,	lowerCamelCase__							:     int=0.0							,	lowerCamelCase__							:     Optional[int]=0.02							,	lowerCamelCase__							:     List[str]=0							,	lowerCamelCase__							:     Tuple=False							,	lowerCamelCase__							:     List[Any]=0							,	lowerCamelCase__							:     List[str]=1							,	lowerCamelCase__							:     Tuple=1							,	**lowerCamelCase__							:     List[Any]							,	)  ->      Optional[Any]:





      '''simple docstring'''






      UpperCamelCase__					:    Tuple          =   vocab_size
      UpperCamelCase__					:    int          =   max_position_embeddings
      UpperCamelCase__					:    Optional[int]          =   d_model
      UpperCamelCase__					:    Dict          =   encoder_ffn_dim
      UpperCamelCase__					:    str          =   encoder_layers
      UpperCamelCase__					:    Union[str, Any]          =   encoder_attention_heads
      UpperCamelCase__					:    Any          =   decoder_ffn_dim
      UpperCamelCase__					:    Union[str, Any]          =   decoder_layers
      UpperCamelCase__					:    Optional[int]          =   decoder_attention_heads
      UpperCamelCase__					:    Any          =   dropout
      UpperCamelCase__					:    Any          =   attention_dropout
      UpperCamelCase__					:    Optional[int]          =   activation_dropout
      UpperCamelCase__					:    Union[str, Any]          =   activation_function
      UpperCamelCase__					:    Union[str, Any]          =   init_std
      UpperCamelCase__					:    Any          =   encoder_layerdrop
      UpperCamelCase__					:    int          =   decoder_layerdrop
      UpperCamelCase__					:    Optional[Any]          =   use_cache
      UpperCamelCase__					:    str          =   encoder_layers
      UpperCamelCase__					:    Union[str, Any]          =   scale_embedding  # scale factor will be sqrt(d_model) if True
      super().__init__(
          pad_token_id=lowerCamelCase__							,	eos_token_id=lowerCamelCase__							,	is_encoder_decoder=lowerCamelCase__							,	decoder_start_token_id=lowerCamelCase__							,	forced_eos_token_id=lowerCamelCase__							,	**lowerCamelCase__							,	)


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





      '''simple docstring'''






      return self.encoder_attention_heads


     @property
     def      UpperCAmelCase__	(      self							:     Any			)  ->      int:





      '''simple docstring'''






      return self.d_model






from typing import TYPE_CHECKING

from ..utils import _LazyModule


__UpperCamelCase       :       int						       =				{
    "config": [
        "EXTERNAL_DATA_FORMAT_SIZE_LIMIT",
        "OnnxConfig",
        "OnnxConfigWithPast",
        "OnnxSeq2SeqConfigWithPast",
        "PatchingSpec",
    ],
    "convert": ["export", "validate_model_outputs"],
    "features": ["FeaturesManager"],
    "utils": ["ParameterFormat", "compute_serialized_parameters_size"],
}


if TYPE_CHECKING:
       from .config import (
           EXTERNAL_DATA_FORMAT_SIZE_LIMIT,
           OnnxConfig,
           OnnxConfigWithPast,
           OnnxSeqaSeqConfigWithPast,
           PatchingSpec,
       )
       from .convert import export, validate_model_outputs
       from .features import FeaturesManager
       from .utils import ParameterFormat, compute_serialized_parameters_size

else:
       import sys

       __UpperCamelCase       :       List[str]						       =				_LazyModule(__name__, globals()["__file__"], _import_structure, module_spec=__spec__)


