"""simple docstring"""






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


lowerCAmelCase__  :  Any						     =	logging.get_logger(__name__)

lowerCAmelCase__  :  List[Any]						     =	{
    'tanreinama/GPTSAN-2.8B-spout_is_uniform': (
        'https://huggingface.co/tanreinama/GPTSAN-2.8B-spout_is_uniform/resolve/main/config.json'
    ),
}
class 				snake_case       ( __UpperCAmelCase				):




					"""simple docstring"""

					snake_case__				    = "gptsan-japanese"
					snake_case__				    = [
					    "past_key_values",
					]
					snake_case__				    = {
					    "hidden_size": "d_model",
					    "num_attention_heads": "num_heads",
					    "num_hidden_layers": "num_layers",
					}







					def __init__(				self   :	Tuple    ,lowerCamelCase__   :	List[Any]=36_000    ,lowerCamelCase__   :	Optional[int]=1_280    ,lowerCamelCase__   :	int=1_024    ,lowerCamelCase__   :	List[str]=8_192    ,lowerCamelCase__   :	List[str]=4_096    ,lowerCamelCase__   :	Tuple=128    ,lowerCamelCase__   :	List[str]=10    ,lowerCamelCase__   :	int=0    ,lowerCamelCase__   :	Optional[int]=16    ,lowerCamelCase__   :	Any=16    ,lowerCamelCase__   :	int=128    ,lowerCamelCase__   :	int=0.0    ,lowerCamelCase__   :	List[str]=1e-5    ,lowerCamelCase__   :	Union[str, Any]=False    ,lowerCamelCase__   :	Optional[int]=0.0    ,lowerCamelCase__   :	int="float32"    ,lowerCamelCase__   :	int=False    ,lowerCamelCase__   :	List[Any]=False    ,lowerCamelCase__   :	Any=False    ,lowerCamelCase__   :	List[Any]=0.0_0_2    ,lowerCamelCase__   :	str=False    ,lowerCamelCase__   :	Tuple=True    ,lowerCamelCase__   :	Dict=35_998    ,lowerCamelCase__   :	Optional[Any]=35_995    ,lowerCamelCase__   :	Any=35_999    ,**lowerCamelCase__   :	Optional[int]    ,):
									UpperCAmelCase__             =							vocab_size
									UpperCAmelCase__             =							max_position_embeddings
									UpperCAmelCase__             =							d_model
									UpperCAmelCase__             =							d_ff
									UpperCAmelCase__             =							d_ext
									UpperCAmelCase__             =							d_spout
									UpperCAmelCase__             =							num_switch_layers
									UpperCAmelCase__             =							num_ext_layers
									UpperCAmelCase__             =							num_switch_layers + num_ext_layers
									UpperCAmelCase__             =							num_heads
									UpperCAmelCase__             =							num_experts
									UpperCAmelCase__             =							expert_capacity
									UpperCAmelCase__             =							dropout_rate
									UpperCAmelCase__             =							layer_norm_epsilon
									UpperCAmelCase__             =							router_bias
									UpperCAmelCase__             =							router_jitter_noise
									UpperCAmelCase__             =							router_dtype
									UpperCAmelCase__             =							router_ignore_padding_tokens
									UpperCAmelCase__             =							output_hidden_states
									UpperCAmelCase__             =							output_attentions
									UpperCAmelCase__             =							initializer_factor
									UpperCAmelCase__             =							output_router_logits
									UpperCAmelCase__             =							use_cache

									super().__init__(
									    separator_token_id=lowerCamelCase__    ,pad_token_id=lowerCamelCase__    ,eos_token_id=lowerCamelCase__    ,**lowerCamelCase__    ,)




"""simple docstring"""






import argparse


lowerCAmelCase__  :  List[str]						     =	'docs/source/_static/js/custom.js'



def   a_						(					lowerCamelCase       ):
				with open(lowerCamelCase					,			encoding='utf-8'					,			newline='\n'       ) as f:
								UpperCAmelCase__             =							f.readlines()
				UpperCAmelCase__             =							0

				# First let's put the right version
				while not lines[index].startswith('const stableVersion ='       ):
								index += 1
				UpperCAmelCase__             =							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(lowerCamelCase					,			'w'					,			encoding='utf-8'					,			newline='\n'       ) as f:
								f.writelines(lowerCamelCase       )


if __name__ == "__main__":
						lowerCAmelCase__  :  List[Any]						     =	argparse.ArgumentParser()
						parser.add_argument('--version', help='Release version.')
						lowerCAmelCase__  :  Optional[int]						     =	parser.parse_args()
						update_custom_js(args.version)



