






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


_UpperCamelCase			:	str								=logging.get_logger(__name__)

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






class 						UpperCAmelCase__ (							__snake_case							):
		__snake_case      :       str     =   "open-llama"







		def __init__(					self       ,A__=100000       ,A__=4096       ,A__=11008       ,A__=32       ,A__=32       ,A__="silu"       ,A__=2048       ,A__=0.02       ,A__=1E-6       ,A__=True       ,A__=0       ,A__=1       ,A__=2       ,A__=False       ,A__=True       ,A__=0.1       ,A__=0.1       ,A__=True       ,A__=True       ,A__=None       ,**A__       ,):
						_A	:				Optional[Any]   =      vocab_size
						_A	:				List[Any]   =      max_position_embeddings
						_A	:				Dict   =      hidden_size
						_A	:				str   =      intermediate_size
						_A	:				Any   =      num_hidden_layers
						_A	:				Tuple   =      num_attention_heads
						_A	:				Union[str, Any]   =      hidden_act
						_A	:				List[str]   =      initializer_range
						_A	:				Optional[int]   =      rms_norm_eps
						_A	:				List[str]   =      use_cache
						_A	:				str   =      kwargs.pop(
						    '''use_memorry_efficient_attention'''       ,A__		)
						_A	:				str   =      hidden_dropout_prob
						_A	:				Dict   =      attention_dropout_prob
						_A	:				Optional[int]   =      use_stable_embedding
						_A	:				Any   =      shared_input_output_embedding
						_A	:				Optional[int]   =      rope_scaling
						self._rope_scaling_validation()

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







		def  A__      (					self		):
						if self.rope_scaling is None:
										return

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











def  a__ (__lowercase							:int					,  __lowercase							:int   )		-> int:
				return abs(__lowercase   ) if a == 0 else greatest_common_divisor(b % a					,  __lowercase   )



def  a__ (__lowercase							:int					,  __lowercase							:int   )		-> int:
				while y:  # --> when y=0 then loop will terminate and return x as final GCD.
								_A  ,				_A	:				Union[str, Any]   =      y, x % y
				return abs(__lowercase   )



def  a__ ()		-> Optional[Any]:
				try:
								_A	:				Optional[Any]   =      input('''Enter two integers separated by comma (,): '''   ).split(''','''   )
								_A	:				List[Any]   =      int(nums[0]   )
								_A	:				Optional[int]   =      int(nums[1]   )
								print(
								    f"""greatest_common_divisor({num_a}, {num_a}) = """
								    f"""{greatest_common_divisor(__lowercase					,  __lowercase   )}"""   )
								print(f"""By iterative gcd({num_a}, {num_a}) = {gcd_by_iterative(__lowercase					,  __lowercase   )}"""   )
				except (IndexError, UnboundLocalError, ValueError):
								print('''Wrong input'''   )


if __name__ == "__main__":
	main()



