

'''simple docstring'''
from ...configuration_utils import PretrainedConfig
from ...utils import logging


lowerCamelCase			:				Dict 			=					logging.get_logger(__name__)

lowerCamelCase			:				Tuple 			=					{
    '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__   (	_UpperCamelCase  ):
  A__					=    'rwkv'
  A__					=    {'max_position_embeddings': 'context_length'}





  def __init__(		self				:     Optional[int]							, _a				:     str=5_0277							, _a				:     Optional[Any]=1024							, _a				:     List[str]=4096							, _a				:     Any=32							, _a				:     Tuple=None							, _a				:     Optional[Any]=None							, _a				:     Optional[Any]=1e-5							, _a				:     str=0							, _a				:     Tuple=0							, _a				:     Dict=6							, _a				:     int=False							, _a				:     List[Any]=True							, **_a				:     int							, )     ->   int:





       '''simple docstring'''






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

       _SCREAMING_SNAKE_CASE							   =bos_token_id
       _SCREAMING_SNAKE_CASE							   =eos_token_id

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



'''simple docstring'''
def 	_lowerCAmelCase (						_UpperCamelCase						:					str    )				->      bool:
     """simple docstring"""




     _SCREAMING_SNAKE_CASE							   =0
     for ch in input_str:
          _SCREAMING_SNAKE_CASE							   =ord(_UpperCamelCase    )
          _SCREAMING_SNAKE_CASE							   =pow(2							,			_UpperCamelCase    )

          # If we already turned on bit for current character's unicode
          if bitmap >> ch_unicode & 1 == 1:
               return False
          bitmap |= ch_bit_index_on
     return True


if __name__ == "__main__":
     import doctest

     doctest.testmod()
