





'''simple docstring'''



from __future__ import annotations

import math




def 				_lowerCAmelCase  (			lowerCamelCase_     :					int			):

			if 1 < number < 4:
						# 2 and 3 are primes
						return True
			elif number < 2 or number % 2 == 0 or number % 3 == 0:
						# Negatives, 0, 1, all even numbers, all multiples of 3 are not primes
						return False

			# All primes number are in format of 6k +/- 1
			for i in range(5						,    int(math.sqrt(lowerCamelCase_			) + 1			)						,    6			):
						if number % i == 0 or number % (i + 2) == 0:
									return False
			return True




def 				_lowerCAmelCase  (			lowerCamelCase_     :					int			):
			__lowercase			  =							str(lowerCamelCase_			)
			__lowercase			  =							[n]
			for i in range(1						,    len(lowerCamelCase_			)			):
						list_nums.append(int(str_num[i:]			)			)
						list_nums.append(int(str_num[:-i]			)			)
			return list_nums




def 				_lowerCAmelCase  (			lowerCamelCase_     :					int			):
			if len(str(lowerCamelCase_			)			) > 3:
						if not is_prime(int(str(lowerCamelCase_			)[-3:]			)			) or not is_prime(int(str(lowerCamelCase_			)[:3]			)			):
									return False
			return True




def 				_lowerCAmelCase  (			lowerCamelCase_     :					int = 1_1			):
			__lowercase			  =							[]
			__lowercase			  =							1_3
			while len(lowerCamelCase_			) != count:
						if validate(lowerCamelCase_			):
									__lowercase			  =							list_truncated_nums(lowerCamelCase_			)
									if all(is_prime(lowerCamelCase_			) for i in list_nums			):
												list_truncated_primes.append(lowerCamelCase_			)
						num += 2
			return list_truncated_primes




def 				_lowerCAmelCase  (			):
			return sum(compute_truncated_primes(1_1			)			)


if __name__ == "__main__":
						print(f'''{sum(compute_truncated_primes(1_1)) = }''')












'''simple docstring'''



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


_SCREAMING_SNAKE_CASE   =      logging.get_logger(__name__)

_SCREAMING_SNAKE_CASE   =      {
    '''s-JoL/Open-Llama-V1''': '''https://huggingface.co/s-JoL/Open-Llama-V1/blob/main/config.json''',
}






class 							__lowercase    ( lowerCAmelCase__  ):







	'''simple docstring'''

	a      :			Dict     =    "open-llama"


	def __init__(self       ,_lowerCamelCase=100000       ,_lowerCamelCase=4096       ,_lowerCamelCase=11008       ,_lowerCamelCase=32       ,_lowerCamelCase=32       ,_lowerCamelCase="silu"       ,_lowerCamelCase=2048       ,_lowerCamelCase=0.0_2       ,_lowerCamelCase=1E-6       ,_lowerCamelCase=True       ,_lowerCamelCase=0       ,_lowerCamelCase=1       ,_lowerCamelCase=2       ,_lowerCamelCase=False       ,_lowerCamelCase=True       ,_lowerCamelCase=0.1       ,_lowerCamelCase=0.1       ,_lowerCamelCase=True       ,_lowerCamelCase=True       ,_lowerCamelCase=None       ,**_lowerCamelCase       ,)							->							Union[str, Any]:







				'''simple docstring'''





				__lowercase			  =							vocab_size
				__lowercase			  =							max_position_embeddings
				__lowercase			  =							hidden_size
				__lowercase			  =							intermediate_size
				__lowercase			  =							num_hidden_layers
				__lowercase			  =							num_attention_heads
				__lowercase			  =							hidden_act
				__lowercase			  =							initializer_range
				__lowercase			  =							rms_norm_eps
				__lowercase			  =							use_cache
				__lowercase			  =							kwargs.pop(
				    '''use_memorry_efficient_attention'''       ,_lowerCamelCase	)
				__lowercase			  =							hidden_dropout_prob
				__lowercase			  =							attention_dropout_prob
				__lowercase			  =							use_stable_embedding
				__lowercase			  =							shared_input_output_embedding
				__lowercase			  =							rope_scaling
				self._rope_scaling_validation()

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


	def   _UpperCAmelCase       (self	)							->							List[Any]:







				'''simple docstring'''





				if self.rope_scaling is None:
							return

				if not isinstance(self.rope_scaling       ,_lowerCamelCase	) 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'''       ,_lowerCamelCase	)
				__lowercase			  =							self.rope_scaling.get('''factor'''       ,_lowerCamelCase	)
				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(_lowerCamelCase       ,_lowerCamelCase	) or rope_scaling_factor <= 1.0:
							raise ValueError(f"`rope_scaling`'s factor field must be an float > 1, got {rope_scaling_factor}"	)





