




'''simple docstring'''


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


_snake_case      :      Optional[Any]   							=		logging.get_logger(__name__)

_snake_case      :      str   							=		{
    '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    ):
							lowercase_							=				'pegasus_x'
							lowercase_							=				['past_key_values']
							lowercase_							=				{'num_attention_heads': 'encoder_attention_heads', 'hidden_size': 'd_model'}







							def __init__(  self       :  List[str]							,			lowerCAmelCase_       :  Optional[Any]=9_61_03							,			lowerCAmelCase_       :  int=1_63_84							,			lowerCAmelCase_       :  Union[str, Any]=16							,			lowerCAmelCase_       :  List[str]=40_96							,			lowerCAmelCase_       :  Union[str, Any]=16							,			lowerCAmelCase_       :  Tuple=16							,			lowerCAmelCase_       :  Tuple=40_96							,			lowerCAmelCase_       :  Union[str, Any]=16							,			lowerCAmelCase_       :  str=0.0							,			lowerCAmelCase_       :  Optional[int]=0.0							,			lowerCAmelCase_       :  Optional[Any]=True							,			lowerCAmelCase_       :  List[str]=True							,			lowerCAmelCase_       :  Any="gelu"							,			lowerCAmelCase_       :  Any=10_24							,			lowerCAmelCase_       :  Dict=0.1							,			lowerCAmelCase_       :  str=0.0							,			lowerCAmelCase_       :  Dict=0.0							,			lowerCAmelCase_       :  int=0.0_2							,			lowerCAmelCase_       :  Optional[int]=0							,			lowerCAmelCase_       :  Any=True							,			lowerCAmelCase_       :  Tuple=0							,			lowerCAmelCase_       :  str=1							,			lowerCAmelCase_       :  int=1							,			lowerCAmelCase_       :  str=32							,			lowerCAmelCase_       :  List[str]=5_12							,			lowerCAmelCase_       :  List[Any]=True							,			**lowerCAmelCase_       :  Union[str, Any]							,			)			->							List[str]:


														"""simple docstring"""


														_a	     =				vocab_size
														_a	     =				max_position_embeddings
														_a	     =				d_model
														_a	     =				encoder_ffn_dim
														_a	     =				encoder_layers
														_a	     =				encoder_attention_heads
														_a	     =				decoder_ffn_dim
														_a	     =				decoder_layers
														_a	     =				decoder_attention_heads
														_a	     =				dropout
														_a	     =				attention_dropout
														_a	     =				activation_dropout
														_a	     =				activation_function
														_a	     =				init_std
														_a	     =				encoder_layerdrop
														_a	     =				decoder_layerdrop
														_a	     =				use_cache
														_a	     =				encoder_layers
														_a	     =				scale_embedding  # scale factor will be sqrt(d_model) if True

														_a	     =				num_global_tokens
														_a	     =				block_size
														_a	     =				stagger_local_blocks

														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    __lowerCAmelCase			(  self       :  Tuple					)			->							int:


														"""simple docstring"""


														return self.encoder_attention_heads







							@property
							def    __lowerCAmelCase			(  self       :  Tuple					)			->							int:


														"""simple docstring"""


														return self.d_model







'''simple docstring'''


# Copyright 2023 The HuggingFace Team. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
from typing import TYPE_CHECKING

# rely on isort to merge the imports
from ...utils import (
    OptionalDependencyNotAvailable,
    _LazyModule,
    is_torch_available,
)


_snake_case      :      Tuple   							=		{
    'configuration_convnextv2': [
        'CONVNEXTV2_PRETRAINED_CONFIG_ARCHIVE_MAP',
        'ConvNextV2Config',
    ]
}

try:
				if not is_torch_available():
								raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
				pass
else:
				_snake_case      :      Tuple   							=		[
				    'CONVNEXTV2_PRETRAINED_MODEL_ARCHIVE_LIST',
				    'ConvNextV2ForImageClassification',
				    'ConvNextV2Model',
				    'ConvNextV2PreTrainedModel',
				    'ConvNextV2Backbone',
				]


if TYPE_CHECKING:
				from .configuration_convnextva import (
				    CONVNEXTV2_PRETRAINED_CONFIG_ARCHIVE_MAP,
				    ConvNextVaConfig,
				)

				try:
								if not is_torch_available():
												raise OptionalDependencyNotAvailable()
				except OptionalDependencyNotAvailable:
								pass
				else:
								from .modeling_convnextva import (
								    CONVNEXTV2_PRETRAINED_MODEL_ARCHIVE_LIST,
								    ConvNextVaBackbone,
								    ConvNextVaForImageClassification,
								    ConvNextVaModel,
								    ConvNextVaPreTrainedModel,
								)

else:
				import sys

				_snake_case      :      Any   							=		_LazyModule(__name__, globals()['__file__'], _import_structure)

