






'''simple docstring'''

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


A:      str  				=				logging.get_logger(__name__)

A:      Optional[int]  				=				{
    "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__     (	UpperCAmelCase_				):







	"""simple docstring"""



	SCREAMING_SNAKE_CASE_					:      Dict        =  'pegasus'
	SCREAMING_SNAKE_CASE_					:      str        =  ['past_key_values']
	SCREAMING_SNAKE_CASE_					:      Any        =  {'num_attention_heads': 'encoder_attention_heads', 'hidden_size': 'd_model'}
	def __init__(							self  ,      _lowercase=5_0265  ,      _lowercase=1024  ,      _lowercase=12  ,      _lowercase=4096  ,      _lowercase=16  ,      _lowercase=12  ,      _lowercase=4096  ,      _lowercase=16  ,      _lowercase=0.0  ,      _lowercase=0.0  ,      _lowercase=True  ,      _lowercase=True  ,      _lowercase="gelu"  ,      _lowercase=1024  ,      _lowercase=0.1  ,      _lowercase=0.0  ,      _lowercase=0.0  ,      _lowercase=0.02  ,      _lowercase=0  ,      _lowercase=False  ,      _lowercase=0  ,      _lowercase=1  ,      _lowercase=1  ,      **_lowercase  ,      )						->  Tuple:
							lowercase_      :   int        =			vocab_size
							lowercase_      :   Optional[Any]        =			max_position_embeddings
							lowercase_      :   List[Any]        =			d_model
							lowercase_      :   int        =			encoder_ffn_dim
							lowercase_      :   Any        =			encoder_layers
							lowercase_      :   List[str]        =			encoder_attention_heads
							lowercase_      :   List[str]        =			decoder_ffn_dim
							lowercase_      :   int        =			decoder_layers
							lowercase_      :   List[Any]        =			decoder_attention_heads
							lowercase_      :   List[str]        =			dropout
							lowercase_      :   Any        =			attention_dropout
							lowercase_      :   Optional[Any]        =			activation_dropout
							lowercase_      :   List[Any]        =			activation_function
							lowercase_      :   Union[str, Any]        =			init_std
							lowercase_      :   Union[str, Any]        =			encoder_layerdrop
							lowercase_      :   Tuple        =			decoder_layerdrop
							lowercase_      :   Dict        =			use_cache
							lowercase_      :   List[Any]        =			encoder_layers
							lowercase_      :   str        =			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        lowerCamelCase__		(							self       )						->  int:
							return self.encoder_attention_heads







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








'''simple docstring'''

import argparse


A:      List[Any]  				=				"docs/source/_static/js/custom.js"






def 	_UpperCAmelCase    (  a		:	Optional[Any]							)			->			Optional[Any]:





						"""simple docstring"""
						with open(a						,			encoding='utf-8'						,			newline='\n'							) as f:
												lowercase_      :   List[Any]        =			f.readlines()
						lowercase_      :   Dict        =			0

						# First let's put the right version
						while not lines[index].startswith('const stableVersion ='							):
												index += 1
						lowercase_      :   Dict        =			f"const stableVersion = \"v{version}\"\n"

						# Then update the dictionary
						while not lines[index].startswith('const versionMapping = {'							):
												index += 1

						# We go until the end
						while not lines[index].startswith('}'							):
												index += 1
						# We add the new version at the end
						lines[index - 1] += f"    \"v{version}\": \"v{version}\",\n"

						with open(a						,			'w'						,			encoding='utf-8'						,			newline='\n'							) as f:
												f.writelines(a							)


if __name__ == "__main__":
						A:      str  				=				argparse.ArgumentParser()
						parser.add_argument("--version", help="Release version.")
						A:      List[str]  				=				parser.parse_args()
						update_custom_js(args.version)
