

"""simple docstring"""






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


snake_case_   :   int        =       logging.get_logger(__name__)

snake_case_   :   Union[str, Any]        =       {
    """uw-madison/mra-base-512-4""": """https://huggingface.co/uw-madison/mra-base-512-4/resolve/main/config.json""",
}







class       snake_case__  ( lowerCAmelCase_     ):
			SCREAMING_SNAKE_CASE__     				=						'''mra'''







			def __init__(			self			: int			,  lowercase			: int=5_02_65			,  lowercase			: List[Any]=7_68			,  lowercase			: Dict=12			,  lowercase			: int=12			,  lowercase			: Dict=30_72			,  lowercase			: List[str]="gelu"			,  lowercase			: List[str]=0.1			,  lowercase			: Union[str, Any]=0.1			,  lowercase			: Any=5_12			,  lowercase			: Optional[Any]=1			,  lowercase			: Any=0.0_2			,  lowercase			: Optional[int]=1E-5			,  lowercase			: List[Any]="absolute"			,  lowercase			: List[Any]=4			,  lowercase			: str="full"			,  lowercase			: Optional[Any]=0			,  lowercase			: List[Any]=0			,  lowercase			: Tuple=1			,  lowercase			: Optional[int]=0			,  lowercase			: Any=2			,  **lowercase			: Tuple			,  ):





								'''simple docstring'''



								super().__init__(pad_token_id=lowercase			,  bos_token_id=lowercase			,  eos_token_id=lowercase			,  **lowercase  )

								UpperCAmelCase			:   List[Any]      =				vocab_size
								UpperCAmelCase			:   int      =				max_position_embeddings
								UpperCAmelCase			:   Optional[int]      =				hidden_size
								UpperCAmelCase			:   Optional[Any]      =				num_hidden_layers
								UpperCAmelCase			:   Optional[Any]      =				num_attention_heads
								UpperCAmelCase			:   str      =				intermediate_size
								UpperCAmelCase			:   Union[str, Any]      =				hidden_act
								UpperCAmelCase			:   Tuple      =				hidden_dropout_prob
								UpperCAmelCase			:   List[Any]      =				attention_probs_dropout_prob
								UpperCAmelCase			:   str      =				initializer_range
								UpperCAmelCase			:   Optional[Any]      =				type_vocab_size
								UpperCAmelCase			:   int      =				layer_norm_eps
								UpperCAmelCase			:   Optional[int]      =				position_embedding_type
								UpperCAmelCase			:   Union[str, Any]      =				block_per_row
								UpperCAmelCase			:   Optional[int]      =				approx_mode
								UpperCAmelCase			:   int      =				initial_prior_first_n_blocks
								UpperCAmelCase			:   Tuple      =				initial_prior_diagonal_n_blocks





"""simple docstring"""






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


snake_case_   :   List[Any]        =       logging.get_logger(__name__)

snake_case_   :   List[Any]        =       {
    """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       snake_case__  ( lowerCAmelCase_     ):
			SCREAMING_SNAKE_CASE__     				=						'''rwkv'''
			SCREAMING_SNAKE_CASE__     				=						{'''max_position_embeddings''': '''context_length'''}







			def __init__(			self			: int			,  lowercase			: Optional[Any]=5_02_77			,  lowercase			: Union[str, Any]=10_24			,  lowercase			: Union[str, Any]=40_96			,  lowercase			: List[str]=32			,  lowercase			: str=None			,  lowercase			: Tuple=None			,  lowercase			: Dict=1E-5			,  lowercase			: Any=0			,  lowercase			: List[Any]=0			,  lowercase			: int=6			,  lowercase			: Dict=False			,  lowercase			: Dict=True			,  **lowercase			: Optional[Any]			,  ):





								'''simple docstring'''



								UpperCAmelCase			:   Optional[int]      =				vocab_size
								UpperCAmelCase			:   List[str]      =				context_length
								UpperCAmelCase			:   Optional[Any]      =				hidden_size
								UpperCAmelCase			:   List[Any]      =				num_hidden_layers
								UpperCAmelCase			:   Union[str, Any]      =				attention_hidden_size if attention_hidden_size is not None else hidden_size
								UpperCAmelCase			:   List[Any]      =				intermediate_size if intermediate_size is not None else 4 * hidden_size
								UpperCAmelCase			:   Tuple      =				layer_norm_epsilon
								UpperCAmelCase			:   Optional[int]      =				rescale_every
								UpperCAmelCase			:   Tuple      =				use_cache

								UpperCAmelCase			:   Union[str, Any]      =				bos_token_id
								UpperCAmelCase			:   Optional[int]      =				eos_token_id

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


