


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


_snake_case				=			logging.get_logger(__name__)

_snake_case				=			{
    "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  A_ (			a_  ):







 """simple docstring"""





 _UpperCamelCase					:			str     	=       '''pegasus_x'''
 _UpperCamelCase					:			Union[str, Any]     	=       ['''past_key_values''']
 _UpperCamelCase					:			Union[str, Any]     	=       {'''num_attention_heads''': '''encoder_attention_heads''', '''hidden_size''': '''d_model'''}
 def __init__(      self       :			Tuple							,     _a       :			Tuple=9_6_1_0_3							,     _a       :			str=1_6_3_8_4							,     _a       :			Optional[Any]=1_6							,     _a       :			List[str]=4_0_9_6							,     _a       :			Optional[int]=1_6							,     _a       :			str=1_6							,     _a       :			List[Any]=4_0_9_6							,     _a       :			Optional[int]=1_6							,     _a       :			Any=0.0							,     _a       :			Union[str, Any]=0.0							,     _a       :			Union[str, Any]=True							,     _a       :			Any=True							,     _a       :			Union[str, Any]="gelu"							,     _a       :			Any=1_0_2_4							,     _a       :			Optional[Any]=0.1							,     _a       :			Union[str, Any]=0.0							,     _a       :			Tuple=0.0							,     _a       :			Dict=0.0_2							,     _a       :			int=0							,     _a       :			Any=True							,     _a       :			Tuple=0							,     _a       :			List[Any]=1							,     _a       :			List[Any]=1							,     _a       :			int=3_2							,     _a       :			List[Any]=5_1_2							,     _a       :			Any=True							,     **_a       :			int							,     )     ->      Dict:
      UpperCAmelCase    :					Optional[Any]			=      vocab_size
      UpperCAmelCase    :					Dict			=      max_position_embeddings
      UpperCAmelCase    :					Any			=      d_model
      UpperCAmelCase    :					Optional[int]			=      encoder_ffn_dim
      UpperCAmelCase    :					List[str]			=      encoder_layers
      UpperCAmelCase    :					Optional[int]			=      encoder_attention_heads
      UpperCAmelCase    :					str			=      decoder_ffn_dim
      UpperCAmelCase    :					Union[str, Any]			=      decoder_layers
      UpperCAmelCase    :					List[str]			=      decoder_attention_heads
      UpperCAmelCase    :					Optional[Any]			=      dropout
      UpperCAmelCase    :					Optional[int]			=      attention_dropout
      UpperCAmelCase    :					List[str]			=      activation_dropout
      UpperCAmelCase    :					Any			=      activation_function
      UpperCAmelCase    :					List[str]			=      init_std
      UpperCAmelCase    :					Optional[int]			=      encoder_layerdrop
      UpperCAmelCase    :					List[Any]			=      decoder_layerdrop
      UpperCAmelCase    :					Union[str, Any]			=      use_cache
      UpperCAmelCase    :					Union[str, Any]			=      encoder_layers
      UpperCAmelCase    :					Optional[int]			=      scale_embedding  # scale factor will be sqrt(d_model) if True

      UpperCAmelCase    :					Optional[Any]			=      num_global_tokens
      UpperCAmelCase    :					Tuple			=      block_size
      UpperCAmelCase    :					Optional[int]			=      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 	_UpperCamelCase     (      self       :			Dict					)     ->      int:
      return self.encoder_attention_heads

 @property
 def 	_UpperCamelCase     (      self       :			Dict					)     ->      int:
      return self.d_model







from typing import TYPE_CHECKING

from ...utils import OptionalDependencyNotAvailable, _LazyModule, is_tokenizers_available, is_torch_available


_snake_case				=			{
    "configuration_nystromformer": ["NYSTROMFORMER_PRETRAINED_CONFIG_ARCHIVE_MAP", "NystromformerConfig"],
}

try:
      if not is_torch_available():
            raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
      pass
else:
      _snake_case				=			[
          "NYSTROMFORMER_PRETRAINED_MODEL_ARCHIVE_LIST",
          "NystromformerForMaskedLM",
          "NystromformerForMultipleChoice",
          "NystromformerForQuestionAnswering",
          "NystromformerForSequenceClassification",
          "NystromformerForTokenClassification",
          "NystromformerLayer",
          "NystromformerModel",
          "NystromformerPreTrainedModel",
      ]


if TYPE_CHECKING:
      from .configuration_nystromformer import NYSTROMFORMER_PRETRAINED_CONFIG_ARCHIVE_MAP, NystromformerConfig

      try:
            if not is_torch_available():
                  raise OptionalDependencyNotAvailable()
      except OptionalDependencyNotAvailable:
            pass
      else:
            from .modeling_nystromformer import (
                NYSTROMFORMER_PRETRAINED_MODEL_ARCHIVE_LIST,
                NystromformerForMaskedLM,
                NystromformerForMultipleChoice,
                NystromformerForQuestionAnswering,
                NystromformerForSequenceClassification,
                NystromformerForTokenClassification,
                NystromformerLayer,
                NystromformerModel,
                NystromformerPreTrainedModel,
            )


else:
      import sys

      _snake_case				=			_LazyModule(__name__, globals()["__file__"], _import_structure, module_spec=__spec__)



