'''simple docstring'''




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


__lowercase        =    logging.get_logger(__name__)

__lowercase        =    {
    '''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__(   lowerCAmelCase__      ):


			'''simple docstring'''






			UpperCAmelCase_     :	Tuple						=			'''rwkv'''
			UpperCAmelCase_     :	Dict						=			{'''max_position_embeddings''': '''context_length'''}



			def __init__(  self			,       __lowerCAmelCase=50277			,       __lowerCAmelCase=1024			,       __lowerCAmelCase=4096			,       __lowerCAmelCase=32			,       __lowerCAmelCase=None			,       __lowerCAmelCase=None			,       __lowerCAmelCase=1E-5			,       __lowerCAmelCase=0			,       __lowerCAmelCase=0			,       __lowerCAmelCase=6			,       __lowerCAmelCase=False			,       __lowerCAmelCase=True			,       **__lowerCAmelCase			,       ):




					"""simple docstring"""


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

					lowerCAmelCase     =    bos_token_id
					lowerCAmelCase     =    eos_token_id

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





'''simple docstring'''




from functools import lru_cache






@lru_cache
def 							snake_case__				(     _A:   int					)       ->      int:

		'''simple docstring'''


		if num < 0:
				raise ValueError("""Number should not be negative."""					)

		return 1 if num in (0, 1) else num * factorial(num - 1					)


if __name__ == "__main__":
						import doctest

						doctest.testmod()




