




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


UpperCAmelCase__				     = logging.get_logger(__name__)

UpperCAmelCase__				     = {
    "RWKV/rwkv-4-169m-pile": "https://huggingface.co/RWKV/rwkv-4-169m-pile/resolve/main/config.json",
    "RWKV/rwkv-4-430m-pile": "https://huggingface.co/RWKV/rwkv-4-430m-pile/resolve/main/config.json",
    "RWKV/rwkv-4-1b5-pile": "https://huggingface.co/RWKV/rwkv-4-1b5-pile/resolve/main/config.json",
    "RWKV/rwkv-4-3b-pile": "https://huggingface.co/RWKV/rwkv-4-3b-pile/resolve/main/config.json",
    "RWKV/rwkv-4-7b-pile": "https://huggingface.co/RWKV/rwkv-4-7b-pile/resolve/main/config.json",
    "RWKV/rwkv-4-14b-pile": "https://huggingface.co/RWKV/rwkv-4-14b-pile/resolve/main/config.json",
    "RWKV/rwkv-raven-1b5": "https://huggingface.co/RWKV/rwkv-raven-1b5/resolve/main/config.json",
    "RWKV/rwkv-raven-3b": "https://huggingface.co/RWKV/rwkv-raven-3b/resolve/main/config.json",
    "RWKV/rwkv-raven-7b": "https://huggingface.co/RWKV/rwkv-raven-7b/resolve/main/config.json",
    "RWKV/rwkv-raven-14b": "https://huggingface.co/RWKV/rwkv-raven-14b/resolve/main/config.json",
}







class a (     __SCREAMING_SNAKE_CASE  ):
						"""simple docstring"""

						UpperCamelCase_	:       Dict       	=		'rwkv'
						UpperCamelCase_	:       Any       	=		{'max_position_embeddings': 'context_length'}






						def __init__( self :     Union[str, Any]				,							lowerCamelCase__ :     Optional[int]=50_277				,							lowerCamelCase__ :     List[Any]=1_024				,							lowerCamelCase__ :     str=4_096				,							lowerCamelCase__ :     Union[str, Any]=32				,							lowerCamelCase__ :     Optional[int]=None				,							lowerCamelCase__ :     Any=None				,							lowerCamelCase__ :     Optional[Any]=1e-5				,							lowerCamelCase__ :     str=0				,							lowerCamelCase__ :     Tuple=0				,							lowerCamelCase__ :     List[Any]=6				,							lowerCamelCase__ :     List[Any]=False				,							lowerCamelCase__ :     Optional[Any]=True				,							**lowerCamelCase__ :     Optional[int]				,							)    ->						Optional[Any]:
													"""simple docstring"""


													__lowercase      =    vocab_size
													__lowercase      =    context_length
													__lowercase      =    hidden_size
													__lowercase      =    num_hidden_layers
													__lowercase      =    attention_hidden_size if attention_hidden_size is not None else hidden_size
													__lowercase      =    intermediate_size if intermediate_size is not None else 4 * hidden_size
													__lowercase      =    layer_norm_epsilon
													__lowercase      =    rescale_every
													__lowercase      =    use_cache

													__lowercase      =    bos_token_id
													__lowercase      =    eos_token_id

													super().__init__(
													    tie_word_embeddings=lowerCamelCase__				,							bos_token_id=lowerCamelCase__				,							eos_token_id=lowerCamelCase__				,							**lowerCamelCase__				)












import argparse


UpperCAmelCase__				     = "docs/source/_static/js/custom.js"







def 		_A(       UpperCamelCase__							:			Optional[int]				)    -> Optional[int]:
							'''simple docstring'''


							with open(UpperCamelCase__				,       encoding='''utf-8'''				,       newline='''\n'''				) as f:
														__lowercase      =    f.readlines()
							__lowercase      =    0

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


if __name__ == "__main__":
			UpperCAmelCase__				     = argparse.ArgumentParser()
			parser.add_argument("--version", help="Release version.")
			UpperCAmelCase__				     = parser.parse_args()
			update_custom_js(args.version)






