


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


lowerCAmelCase__  :Any   			=							logging.get_logger(__name__)

lowerCAmelCase__  :Optional[Any]   			=							{
    '''EleutherAI/gpt-neox-20b''': '''https://huggingface.co/EleutherAI/gpt-neox-20b/resolve/main/config.json''',
    # See all GPTNeoX models at https://huggingface.co/models?filter=gpt_neox
}

class 		__a      (				snake_case_			):
		_a	:  Dict				=	'gpt_neox'
		def __init__(			self			,    _SCREAMING_SNAKE_CASE=50432			,    _SCREAMING_SNAKE_CASE=6144			,    _SCREAMING_SNAKE_CASE=44			,    _SCREAMING_SNAKE_CASE=64			,    _SCREAMING_SNAKE_CASE=24576			,    _SCREAMING_SNAKE_CASE="gelu"			,    _SCREAMING_SNAKE_CASE=0.25			,    _SCREAMING_SNAKE_CASE=10000			,    _SCREAMING_SNAKE_CASE=0.0			,    _SCREAMING_SNAKE_CASE=0.0			,    _SCREAMING_SNAKE_CASE=0.1			,    _SCREAMING_SNAKE_CASE=2048			,    _SCREAMING_SNAKE_CASE=0.02			,    _SCREAMING_SNAKE_CASE=1e-5			,    _SCREAMING_SNAKE_CASE=True			,    _SCREAMING_SNAKE_CASE=0			,    _SCREAMING_SNAKE_CASE=2			,    _SCREAMING_SNAKE_CASE=False			,    _SCREAMING_SNAKE_CASE=True			,    _SCREAMING_SNAKE_CASE=None			,    **_SCREAMING_SNAKE_CASE			,    ) ->       Any:




									"""simple docstring"""





									super().__init__(bos_token_id=_SCREAMING_SNAKE_CASE			,    eos_token_id=_SCREAMING_SNAKE_CASE			,    **_SCREAMING_SNAKE_CASE						)
									_UpperCAmelCase 		=			vocab_size
									_UpperCAmelCase 		=			max_position_embeddings
									_UpperCAmelCase 		=			hidden_size
									_UpperCAmelCase 		=			num_hidden_layers
									_UpperCAmelCase 		=			num_attention_heads
									_UpperCAmelCase 		=			intermediate_size
									_UpperCAmelCase 		=			hidden_act
									_UpperCAmelCase 		=			rotary_pct
									_UpperCAmelCase 		=			rotary_emb_base
									_UpperCAmelCase 		=			attention_dropout
									_UpperCAmelCase 		=			hidden_dropout
									_UpperCAmelCase 		=			classifier_dropout
									_UpperCAmelCase 		=			initializer_range
									_UpperCAmelCase 		=			layer_norm_eps
									_UpperCAmelCase 		=			use_cache
									_UpperCAmelCase 		=			tie_word_embeddings
									_UpperCAmelCase 		=			use_parallel_residual
									_UpperCAmelCase 		=			rope_scaling
									self._rope_scaling_validation()

									if self.hidden_size % self.num_attention_heads != 0:
																raise ValueError(
																    'The hidden size is not divisble by the number of attention heads! Make sure to update them!'						)






		def 	UpperCAmelCase__				(			self						) ->       int:




									"""simple docstring"""





									if self.rope_scaling is None:
																return

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

from maths.prime_check import is_prime





def    __lowercase     (						lowerCamelCase					:     int	):
 if not isinstance(lowerCamelCase  ,  lowerCamelCase	):
  UpperCamelCase_					:						List[str] =					F"Input value of [number={number}] must be an integer"
  raise TypeError(lowerCamelCase	)
 if is_prime(lowerCamelCase	) and is_prime(number + 2	):
  return number + 2
 else:
  return -1


if __name__ == "__main__":
   import doctest

   doctest.testmod()



