

"""simple docstring"""




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


_lowercase   :	List[str]												=						logging.get_logger(__name__)

_lowercase   :	Any												=						{
    '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      _UpperCAmelCase   (							_lowerCAmelCase       ):
	a__		: Union[str, Any]					=					"pegasus"
	a__		: Optional[int]					=					["past_key_values"]
	a__		: str					=					{"num_attention_heads": "encoder_attention_heads", "hidden_size": "d_model"}



	def __init__(  self     :       Optional[int]			,    _lowercase     :       Tuple=5_02_65			,    _lowercase     :       Dict=10_24			,    _lowercase     :       int=12			,    _lowercase     :       Any=40_96			,    _lowercase     :       Tuple=16			,    _lowercase     :       List[str]=12			,    _lowercase     :       List[Any]=40_96			,    _lowercase     :       List[str]=16			,    _lowercase     :       Any=0.0			,    _lowercase     :       int=0.0			,    _lowercase     :       str=True			,    _lowercase     :       Union[str, Any]=True			,    _lowercase     :       Tuple="gelu"			,    _lowercase     :       Any=10_24			,    _lowercase     :       Optional[int]=0.1			,    _lowercase     :       Tuple=0.0			,    _lowercase     :       Tuple=0.0			,    _lowercase     :       Union[str, Any]=0.02			,    _lowercase     :       Tuple=0			,    _lowercase     :       str=False			,    _lowercase     :       Tuple=0			,    _lowercase     :       Any=1			,    _lowercase     :       List[Any]=1			,    **_lowercase     :       Dict			,    ):
		__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
		super().__init__(
		    pad_token_id=_lowercase			,    eos_token_id=_lowercase			,    is_encoder_decoder=_lowercase			,    decoder_start_token_id=_lowercase			,    forced_eos_token_id=_lowercase			,    **_lowercase			,    )



	@property
	def        a  (  self     :       Any						):
		return self.encoder_attention_heads



	@property
	def        a  (  self     :       List[Any]						):
		return self.d_model






'''simple docstring'''


from typing import TYPE_CHECKING

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


_lowercase  =			{
    """configuration_biogpt""": ["""BIOGPT_PRETRAINED_CONFIG_ARCHIVE_MAP""", """BioGptConfig"""],
    """tokenization_biogpt""": ["""BioGptTokenizer"""],
}

try:
	if not is_torch_available():
		raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
	pass
else:
	_lowercase  =			[
	    """BIOGPT_PRETRAINED_MODEL_ARCHIVE_LIST""",
	    """BioGptForCausalLM""",
	    """BioGptForTokenClassification""",
	    """BioGptForSequenceClassification""",
	    """BioGptModel""",
	    """BioGptPreTrainedModel""",
	]


if TYPE_CHECKING:
	from .configuration_biogpt import BIOGPT_PRETRAINED_CONFIG_ARCHIVE_MAP, BioGptConfig
	from .tokenization_biogpt import BioGptTokenizer

	try:
		if not is_torch_available():
			raise OptionalDependencyNotAvailable()
	except OptionalDependencyNotAvailable:
		pass
	else:
		from .modeling_biogpt import (
		    BIOGPT_PRETRAINED_MODEL_ARCHIVE_LIST,
		    BioGptForCausalLM,
		    BioGptForSequenceClassification,
		    BioGptForTokenClassification,
		    BioGptModel,
		    BioGptPreTrainedModel,
		)


else:
	import sys

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

