





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


_SCREAMING_SNAKE_CASE					=						logging.get_logger(__name__)

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






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







							"""simple docstring"""


							snake_case_						:     List[Any]     =		vocab_size
							snake_case_						:     Dict     =		max_position_embeddings
							snake_case_						:     Union[str, Any]     =		d_model
							snake_case_						:     List[Any]     =		encoder_ffn_dim
							snake_case_						:     Union[str, Any]     =		encoder_layers
							snake_case_						:     int     =		encoder_attention_heads
							snake_case_						:     Optional[Any]     =		decoder_ffn_dim
							snake_case_						:     List[str]     =		decoder_layers
							snake_case_						:     List[str]     =		decoder_attention_heads
							snake_case_						:     int     =		dropout
							snake_case_						:     List[Any]     =		attention_dropout
							snake_case_						:     Any     =		activation_dropout
							snake_case_						:     Dict     =		activation_function
							snake_case_						:     Optional[int]     =		init_std
							snake_case_						:     int     =		encoder_layerdrop
							snake_case_						:     List[Any]     =		decoder_layerdrop
							snake_case_						:     List[str]     =		use_cache
							snake_case_						:     int     =		encoder_layers
							snake_case_						:     int     =		scale_embedding  # scale factor will be sqrt(d_model) if True
							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 : str		)							->      Union[str, Any]:







							"""simple docstring"""


							return self.encoder_attention_heads






						@property
						def UpperCAmelCase_			( self : Union[str, Any]		)							->      Tuple:







							"""simple docstring"""


							return self.d_model








from typing import TYPE_CHECKING

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


_SCREAMING_SNAKE_CASE 		=						{
    """configuration_xlm""": ["""XLM_PRETRAINED_CONFIG_ARCHIVE_MAP""", """XLMConfig""", """XLMOnnxConfig"""],
    """tokenization_xlm""": ["""XLMTokenizer"""],
}

try:
						if not is_torch_available():
												raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
						pass
else:
						_SCREAMING_SNAKE_CASE 		=						[
						    """XLM_PRETRAINED_MODEL_ARCHIVE_LIST""",
						    """XLMForMultipleChoice""",
						    """XLMForQuestionAnswering""",
						    """XLMForQuestionAnsweringSimple""",
						    """XLMForSequenceClassification""",
						    """XLMForTokenClassification""",
						    """XLMModel""",
						    """XLMPreTrainedModel""",
						    """XLMWithLMHeadModel""",
						]

try:
						if not is_tf_available():
												raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
						pass
else:
						_SCREAMING_SNAKE_CASE 		=						[
						    """TF_XLM_PRETRAINED_MODEL_ARCHIVE_LIST""",
						    """TFXLMForMultipleChoice""",
						    """TFXLMForQuestionAnsweringSimple""",
						    """TFXLMForSequenceClassification""",
						    """TFXLMForTokenClassification""",
						    """TFXLMMainLayer""",
						    """TFXLMModel""",
						    """TFXLMPreTrainedModel""",
						    """TFXLMWithLMHeadModel""",
						]


if TYPE_CHECKING:
						from .configuration_xlm import XLM_PRETRAINED_CONFIG_ARCHIVE_MAP, XLMConfig, XLMOnnxConfig
						from .tokenization_xlm import XLMTokenizer

						try:
												if not is_torch_available():
																		raise OptionalDependencyNotAvailable()
						except OptionalDependencyNotAvailable:
												pass
						else:
												from .modeling_xlm import (
												    XLM_PRETRAINED_MODEL_ARCHIVE_LIST,
												    XLMForMultipleChoice,
												    XLMForQuestionAnswering,
												    XLMForQuestionAnsweringSimple,
												    XLMForSequenceClassification,
												    XLMForTokenClassification,
												    XLMModel,
												    XLMPreTrainedModel,
												    XLMWithLMHeadModel,
												)

						try:
												if not is_tf_available():
																		raise OptionalDependencyNotAvailable()
						except OptionalDependencyNotAvailable:
												pass
						else:
												from .modeling_tf_xlm import (
												    TF_XLM_PRETRAINED_MODEL_ARCHIVE_LIST,
												    TFXLMForMultipleChoice,
												    TFXLMForQuestionAnsweringSimple,
												    TFXLMForSequenceClassification,
												    TFXLMForTokenClassification,
												    TFXLMMainLayer,
												    TFXLMModel,
												    TFXLMPreTrainedModel,
												    TFXLMWithLMHeadModel,
												)

else:
						import sys

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

