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


SCREAMING_SNAKE_CASE__							=				logging.get_logger(__name__)

SCREAMING_SNAKE_CASE__							=				{}
class 	A__   (						_A				):
							lowerCAmelCase__		:						Any    			=							"llama"
							lowerCAmelCase__		:						List[str]    			=							["past_key_values"]





							def __init__( self  :   Optional[int]     , _UpperCAmelCase  :   Union[str, Any]=3_20_00     , _UpperCAmelCase  :   Any=40_96     , _UpperCAmelCase  :   Optional[Any]=1_10_08     , _UpperCAmelCase  :   Dict=32     , _UpperCAmelCase  :   List[Any]=32     , _UpperCAmelCase  :   Union[str, Any]=None     , _UpperCAmelCase  :   Optional[int]="silu"     , _UpperCAmelCase  :   List[Any]=20_48     , _UpperCAmelCase  :   Dict=0.02     , _UpperCAmelCase  :   List[Any]=1e-6     , _UpperCAmelCase  :   int=True     , _UpperCAmelCase  :   Dict=0     , _UpperCAmelCase  :   List[str]=1     , _UpperCAmelCase  :   Tuple=2     , _UpperCAmelCase  :   Optional[Any]=1     , _UpperCAmelCase  :   Optional[Any]=False     , _UpperCAmelCase  :   Tuple=None     , **_UpperCAmelCase  :   Optional[Any]     , )						->		List[Any]:



											"""simple docstring"""


											__lowercase								=					vocab_size
											__lowercase								=					max_position_embeddings
											__lowercase								=					hidden_size
											__lowercase								=					intermediate_size
											__lowercase								=					num_hidden_layers
											__lowercase								=					num_attention_heads

											# for backward compatibility
											if num_key_value_heads is None:
															__lowercase								=					num_attention_heads

											__lowercase								=					num_key_value_heads
											__lowercase								=					hidden_act
											__lowercase								=					initializer_range
											__lowercase								=					rms_norm_eps
											__lowercase								=					pretraining_tp
											__lowercase								=					use_cache
											__lowercase								=					rope_scaling
											self._rope_scaling_validation()

											super().__init__(
											    pad_token_id=_UpperCAmelCase     , bos_token_id=_UpperCAmelCase     , eos_token_id=_UpperCAmelCase     , tie_word_embeddings=_UpperCAmelCase     , **_UpperCAmelCase     , )





							def 			a__ ( self  :   Union[str, Any]				)						->		Dict:



											"""simple docstring"""


											if self.rope_scaling is None:
															return

											if not isinstance(self.rope_scaling     , _UpperCAmelCase				) or len(self.rope_scaling				) != 2:
															raise ValueError(
															    '`rope_scaling` must be a dictionary with with two fields, `name` and `factor`, '
															    f"""got {self.rope_scaling}"""				)
											__lowercase								=					self.rope_scaling.get('type'     , _UpperCAmelCase				)
											__lowercase								=					self.rope_scaling.get('factor'     , _UpperCAmelCase				)
											if rope_scaling_type is None or rope_scaling_type not in ["linear", "dynamic"]:
															raise ValueError(
															    f"""`rope_scaling`\'s name field must be one of [\'linear\', \'dynamic\'], got {rope_scaling_type}"""				)
											if rope_scaling_factor is None or not isinstance(_UpperCAmelCase     , _UpperCAmelCase				) or rope_scaling_factor <= 1.0:
															raise ValueError(f"""`rope_scaling`\'s factor field must be an float > 1, got {rope_scaling_factor}"""				)













"""simple docstring"""



def 						lowercase    (				__snake_case				: int	):
		if not isinstance(__snake_case		,					__snake_case	):
				raise ValueError('''Input must be an integer'''	)
		if input_num <= 0:
				raise ValueError('''Input must be positive'''	)
		return sum(
		    divisor for divisor in range(1		,					input_num // 2 + 1	) if input_num % divisor == 0	)


if __name__ == "__main__":
						import doctest

						doctest.testmod()



